def _video_html(session): flash_vars = 'config={{\ "clip":{{\ "url":"https://assets.saucelabs.com/jobs/{session}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}},\ "play": {{\ "opacity":1,\ "label":null,\ "replayLabel":null}},\ "plugins":{{\ "streamer":{{\ "url":"https://cdn1.saucelabs.com/sauce_skin_deprecated\ /lib/flowplayer/flowplayer.pseudostreaming-3.2.13.swf",\ "queryString":"%%3Fstart%%3D%%24%%7Bstart%%7D"}},\ "controls":{{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0,0,0,0.7)"}}}},\ "playerId":"player{session}",\ "playlist":[{{\ "url":"https://assets.saucelabs.com/jobs/{session}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}}]}}'.format( session=session ) return str( html.div( html.object( html.param(value="true", name="allowfullscreen"), html.param(value="always", name="allowscriptaccess"), html.param(value="high", name="quality"), html.param(value="#000000", name="bgcolor"), html.param(value=flash_vars.replace(" ", ""), name="flashvars"), width="100%", height="100%", type="application/x-shockwave-flash", data="https://cdn1.saucelabs.com/sauce_skin_deprecated/lib/" "flowplayer/flowplayer-3.2.17.swf", name="player_api", id="player_api", ), id="player{session}".format(session=session), style="border:1px solid #e6e6e6; float:right; height:240px;" "margin-left:5px; overflow:hidden; width:320px", ) )
def _video_html(self, session): flash_vars = 'config={{\ "clip":{{\ "url":"https://assets.saucelabs.com/jobs/{0}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}},\ "play": {{\ "opacity":1,\ "label":null,\ "replayLabel":null}},\ "plugins":{{\ "streamer":{{\ "url":"https://cdn1.saucelabs.com/sauce_skin_deprecated\ /lib/flowplayer/flowplayer.pseudostreaming-3.2.13.swf",\ "queryString":"%%3Fstart%%3D%%24%%7Bstart%%7D"}},\ "controls":{{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0,0,0,0.7)"}}}},\ "playerId":"player{0}",\ "playlist":[{{\ "url":"https://assets.saucelabs.com/jobs/{0}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}}]}}'.format(session) return str( html. div(html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='#000000', name='bgcolor'), html.param(value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='https://cdn1.saucelabs.com/sauce_skin_deprecated/lib/' 'flowplayer/flowplayer-3.2.17.swf', name='player_api', id='player_api'), id='player{0}'.format(session), style='border:1px solid #e6e6e6; float:right; height:240px;' 'margin-left:5px; overflow:hidden; width:320px'))
def _video_html(self, session): flash_vars = 'config={{\ "clip":{{\ "url":"https://assets.saucelabs.com/jobs/{0}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}},\ "play": {{\ "opacity":1,\ "label":null,\ "replayLabel":null}},\ "plugins":{{\ "streamer":{{\ "url":"https://cdn1.saucelabs.com/sauce_skin_deprecated\ /lib/flowplayer/flowplayer.pseudostreaming-3.2.13.swf",\ "queryString":"%%3Fstart%%3D%%24%%7Bstart%%7D"}},\ "controls":{{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0,0,0,0.7)"}}}},\ "playerId":"player{0}",\ "playlist":[{{\ "url":"https://assets.saucelabs.com/jobs/{0}/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}}]}}'.format(session) return str(html.div(html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='#000000', name='bgcolor'), html.param( value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='https://cdn1.saucelabs.com/sauce_skin_deprecated/lib/' 'flowplayer/flowplayer-3.2.17.swf', name='player_api', id='player_api'), id='player{0}'.format(session), style='border:1px solid #e6e6e6; float:right; height:240px;' 'margin-left:5px; overflow:hidden; width:320px'))
def _video_html(session): flash_vars = 'config={{\ "clip":{{\ "url":"{session}",\ "provider":"rtmp"}},\ "plugins":{{\ "controls":{{\ "url":"http://testingbot.com/assets/\ flowplayer.controls-3.2.14.swf",\ "mute":null,\ "volume":null}},\ "rtmp":{{\ "url":"http://testingbot.com/assets/\ flowplayer.rtmp-3.2.11.swf",\ "netConnectionUrl":"rtmp://s2tuay45tyrz3f.cloudfront.net/\ cfx/st"}}}},\ "playerId":"mediaplayer{session}",\ "playlist":[{{\ "url":"{session}",\ "provider":"rtmp"}}]}}'.format(session=session) return str( html.div( html.object( html.param(value="true", name="allowfullscreen"), html.param(value="always", name="allowscriptaccess"), html.param(value="high", name="quality"), html.param(value="#000000", name="bgcolor"), html.param(value="opaque", name="wmode"), html.param(value=flash_vars.replace(" ", ""), name="flashvars"), width="100%", height="100%", type="application/x-shockwave-flash", data="http://testingbot.com/assets/flowplayer-3.2.14.swf", name="mediaplayer_api", id="mediaplayer_api", ), id="mediaplayer{session}".format(session=session), style="border:1px solid #e6e6e6; float:right; height:240px;" "margin-left:5px; overflow:hidden; width:320px", ))
def _video_html(self, session): flash_vars = 'config={{\ "clip":{{\ "url":"{0}",\ "provider":"rtmp"}},\ "plugins":{{\ "controls":{{\ "url":"http://testingbot.com/assets/\ flowplayer.controls-3.2.14.swf",\ "mute":null,\ "volume":null}},\ "rtmp":{{\ "url":"http://testingbot.com/assets/\ flowplayer.rtmp-3.2.11.swf",\ "netConnectionUrl":"rtmp://s2tuay45tyrz3f.cloudfront.net/\ cfx/st"}}}},\ "playerId":"mediaplayer{0}",\ "playlist":[{{\ "url":"{0}",\ "provider":"rtmp"}}]}}'.format(session) return str( html.div( html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='#000000', name='bgcolor'), html.param(value='opaque', name='wmode'), html.param(value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='http://testingbot.com/assets/flowplayer-3.2.14.swf', name='mediaplayer_api', id='mediaplayer_api'), id='mediaplayer{0}'.format(session), style='border:1px solid #e6e6e6; float:right; height:240px;' 'margin-left:5px; overflow:hidden; width:320px'))
def _video_html(session): flash_vars = 'config={{\ "clip":{{\ "url":"{session}",\ "provider":"rtmp"}},\ "plugins":{{\ "controls":{{\ "url":"http://testingbot.com/assets/\ flowplayer.controls-3.2.14.swf",\ "mute":null,\ "volume":null}},\ "rtmp":{{\ "url":"http://testingbot.com/assets/\ flowplayer.rtmp-3.2.11.swf",\ "netConnectionUrl":"rtmp://s2tuay45tyrz3f.cloudfront.net/\ cfx/st"}}}},\ "playerId":"mediaplayer{session}",\ "playlist":[{{\ "url":"{session}",\ "provider":"rtmp"}}]}}'.format(session=session) return str(html.div(html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='#000000', name='bgcolor'), html.param(value='opaque', name='wmode'), html.param( value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='http://testingbot.com/assets/flowplayer-3.2.14.swf', name='mediaplayer_api', id='mediaplayer_api'), id='mediaplayer{session}'.format(session=session), style='border:1px solid #e6e6e6; float:right; height:240px;' 'margin-left:5px; overflow:hidden; width:320px'))
def video_html(self): flash_vars = 'config={\ "clip":{\ "url":"https%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true},\ "plugins":{\ "streamer":{\ "url":"https://saucelabs.com/flowplayer/flowplayer.pseudostreaming-3.2.5.swf"},\ "controls":{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0, 0, 0, 0.7)"}},\ "playerId":"player%(session_id)s",\ "playlist":[{\ "url":"https%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}]}' % { 'session_id': self.session_id } return html.div(html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='true', name='cachebusting'), html.param(value='#000000', name='bgcolor'), html.param(value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data= 'https://saucelabs.com/flowplayer/flowplayer-3.2.5.swf?0.2930636672245027', name='player_api', id='player_api'), id='player%s' % self.session_id, class_='video')
def video_html(self): flash_vars = 'config={\ "clip":{\ "url":"https%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true},\ "plugins":{\ "streamer":{\ "url":"https://saucelabs.com/flowplayer/flowplayer.pseudostreaming-3.2.5.swf"},\ "controls":{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0, 0, 0, 0.7)"}},\ "playerId":"player%(session_id)s",\ "playlist":[{\ "url":"https%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}]}' % {'session_id': self.session_id} return html.div(html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='true', name='cachebusting'), html.param(value='#000000', name='bgcolor'), html.param( value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='https://saucelabs.com/flowplayer/flowplayer-3.2.5.swf?0.2930636672245027', name='player_api', id='player_api'), id='player%s' % self.session_id, class_='video')
def _appendrow(self, result, report): import pytest_mozwebqa (testclass, testmethod) = pytest_mozwebqa.split_class_and_test_names(report.nodeid) time = getattr(report, 'duration', 0.0) links = {} if hasattr(report, 'debug') and any(report.debug.values()): (relative_path, full_path) = self._debug_paths(testclass, testmethod) if report.debug['screenshots']: filename = 'screenshot.png' f = open(os.path.join(full_path, filename), 'wb') f.write(base64.decodestring(report.debug['screenshots'][-1])) links.update({'Screenshot': os.path.join(relative_path, filename)}) if report.debug['html']: filename = 'html.txt' f = open(os.path.join(full_path, filename), 'wb') f.write(report.debug['html'][-1]) links.update({'HTML': os.path.join(relative_path, filename)}) # Log may contain passwords, etc so we only capture it for tests marked as public if report.debug['logs'] and 'public' in report.keywords: filename = 'log.txt' f = open(os.path.join(full_path, filename), 'wb') f.write(report.debug['logs'][-1]) links.update({'Log': os.path.join(relative_path, filename)}) if report.debug['network_traffic']: filename = 'networktraffic.json' f = open(os.path.join(full_path, filename), 'wb') f.write(report.debug['network_traffic'][-1]) links.update({'Network Traffic': os.path.join(relative_path, filename)}) if report.debug['urls']: links.update({'Failing URL': report.debug['urls'][-1]}) if self.config.option.sauce_labs_credentials_file and hasattr(report, 'session_id'): links['Sauce Labs Job'] = 'http://saucelabs.com/jobs/%s' % report.session_id links_html = [] for name, path in links.iteritems(): links_html.append(html.a(name, href=path)) links_html.append(' ') self.test_logs.append( html.tr(html.td(result, class_=result.lower()), html.td(testclass), html.td(testmethod), html.td(round(time)), html.td(*links_html), class_=result.lower())) if not 'Passed' in result: additional_html = [] if self.config.option.sauce_labs_credentials_file and hasattr(report, 'session_id'): flash_vars = 'config={\ "clip":{\ "url":"http%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true},\ "plugins":{\ "streamer":{\ "url":"http://saucelabs.com/flowplayer/flowplayer.pseudostreaming-3.2.5.swf"},\ "controls":{\ "mute":false,\ "volume":false,\ "backgroundColor":"rgba(0, 0, 0, 0.7)"}},\ "playerId":"player%(session_id)s",\ "playlist":[{\ "url":"http%%3A//saucelabs.com/jobs/%(session_id)s/video.flv",\ "provider":"streamer",\ "autoPlay":false,\ "autoBuffering":true}]}' % {'session_id': report.session_id} additional_html.append( html.div( html.object( html.param(value='true', name='allowfullscreen'), html.param(value='always', name='allowscriptaccess'), html.param(value='high', name='quality'), html.param(value='true', name='cachebusting'), html.param(value='#000000', name='bgcolor'), html.param(value=flash_vars.replace(' ', ''), name='flashvars'), width='100%', height='100%', type='application/x-shockwave-flash', data='http://saucelabs.com/flowplayer/flowplayer-3.2.5.swf?0.2566397726976729', name='player_api', id='player_api'), id='player%s' % report.session_id, class_='video')) if 'Screenshot' in links: additional_html.append( html.div( html.a(html.img(src=links['Screenshot']), href=links['Screenshot']), class_='screenshot')) if report.longrepr: log = html.div(class_='log') for line in str(report.longrepr).splitlines(): separator = line.startswith('_ ' * 10) if separator: log.append(line[:80]) else: exception = line.startswith("E ") if exception: log.append(html.span(raw(cgi.escape(line)), class_='error')) else: log.append(raw(cgi.escape(line))) log.append(html.br()) additional_html.append(log) self.test_logs.append( html.tr( html.td(*additional_html, colspan='5')))