saucelabs

How to run your test your application behind VPN on SauceLabs cloud?

天涯浪子 提交于 2019-12-25 14:14:24
问题 I want to run UI tests on my application behind VPN on SauceLabs cloud. How can I connect to VPN on SauceLabs cloud? Tests are written using Selenium Webdriver and Python 2.7. 回答1: You need to use "sauce connect" to provide a tunnel for Sauce tests to get into your local network. 来源: https://stackoverflow.com/questions/29354697/how-to-run-your-test-your-application-behind-vpn-on-saucelabs-cloud

Pushing Test Names to Sauce Labs with CodeceptJS

♀尐吖头ヾ 提交于 2019-12-24 22:09:49
问题 I have been trying to get Sauce Labs to report the names of the tests that are being run with CodeceptJS, but so far I've only been able to report success/failure. I followed the following thread as a guide to help with reporting anything to Sauce Labs in general: https://github.com/Codeception/CodeceptJS/issues/371 The snippet I found is as follows: _after() { if (process.env.SAUCE_USERNAME) { var sessionId = this.helpers['WebDriverIO'].browser.requestHandler.sessionID; var sauce_url = "Test

Disable flash in saucelabs/selenium webdriver?

[亡魂溺海] 提交于 2019-12-23 17:17:37
问题 I am trying to use saucelabs to automate taking screenshots of several sites to make sure that changing code doesn't break things. I'm programming using webdriver for python and need to disable flash on chrome, firefox and IE. I've tried to find the answers online but none of them seem to be for disabling flash, only interacting with flash objects. 回答1: The below code will work for chrome, it disables the flash and sets the default download directory to a different folder. from selenium

Concourse CI and Build number

瘦欲@ 提交于 2019-12-23 15:23:01
问题 I'm moving from Jenkins to using using Concourse CI to run my Sauce labs e2e tests. Sauce labs groups tests together that have the same build number string: name: 'Chrome XS', browserName: 'chrome', tunnelIdentifier: process.env.TUNNEL_IDENTIFIER, build: process.env.JENKINS_BUILD_NUMBER, platform: 'Windows 10', shardTestFiles: true, maxInstances: 20, How can I pass the build number to my script using an environment variable as shown above. The Concourse GUI uses name #number . Is there any

Getting the Angular Content to load in protractor tests

一世执手 提交于 2019-12-22 17:55:14
问题 I have an angular application that I am writing e2e test for using protractor. Following is my conf.js file setup var project = require('./package.json'); var HtmlReporter = require('protractor-jasmine2-screenshot-reporter'); var multiCapabilities = [{ 'browserName': 'chrome' }]; multiCapabilities = [{ 'browserName': 'chrome', "platform": "Windows 7", 'build': 'Testing', 'name': project.name + ' tests' }] exports.config = { framework: 'jasmine2', sauceUser: 'blahblhablah', sauceKey:

HTTP basic authentication URL with “@” in password

梦想的初衷 提交于 2019-12-20 10:19:05
问题 I'm trying to set up some selenium tests to our staging server using Sauce Labs. It's behind a basic http auth, so theoretically I could set the selenium URL to http://user:password@www.stagesite.com . However, the password contains a "@", causing all sorts of problems as you can imagine. I tried escaping it with a backslash but that did nothing from what I can tell. So, is there an alternative way to do http authentication using selenium, i.e., not via the URL. Or, is there a way to use URL

What is a non-deprecated way to do `new.classobj(name, (base_class,), my_dict)`

风格不统一 提交于 2019-12-20 04:22:44
问题 I found in saucelabs example.py file the following code snippet using the import new module. import new # .. snip .. def on_platforms(platforms): def decorator(base_class): module = sys.modules[base_class.__module__].__dict__ for i, platform in enumerate(platforms): d = dict(base_class.__dict__) d['desired_capabilities'] = platform name = "%s_%s" % (base_class.__name__, i + 1) module[name] = new.classobj(name, (base_class,), d) return decorator However reading the help(new) shows that that

Configure saucelabs for jenkins

女生的网名这么多〃 提交于 2019-12-12 10:14:53
问题 I am trying to run my protractor tests on my Jenkins server which happens to be a Linux box (Red Hat Enterprise Linux Server release 6.6) which has no browser. So i did some research and realized I would have to use saucelabs. I do have saucelab account. So i was confused on how to edit my conf.js file and also how i will communicate with saucelabs from my box. This is my current conf.js file var HtmlReporter = require('protractor-html-screenshot-reporter'); var reporter=new HtmlReporter({

Running e2e tests on Sauce Labs from Protractor on Travis

对着背影说爱祢 提交于 2019-12-12 08:22:30
问题 So I have my open source project (https://github.com/ahmednuaman/radian) and I have some e2e tests that run fine locally using Protractor. I've followed the Sauce Labs docs and set up my .travis.yml accordingly. The tests run right to the point where Protractor tries to connect to selenium server on Sauce Labs, this is a brief snapshot of the error: Running "exec:e2e" (exec) task Using the selenium server at ahmednuaman-radian:06dd4e07-0f52-4fdf-be5e-389f2117bbf5@localhost:4445 >> >> timers

Mono “Hello World” example working, but Java is not

[亡魂溺海] 提交于 2019-12-12 03:44:00
问题 I'm running the Getting Started Examples from the Sauce Labs homepage both with Java and C# Mono. The Mono example works like a charm, but the Java one reports that Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. I've tried re-writing the Java example to be similar to the Mono example as such: public class WebDriverTest { private WebDriver driver; @Before public void setUp() throws Exception { DesiredCapabilities