Codeceptjs: Docs for cloud testing

Created on 17 Dec 2015  ·  13Comments  ·  Source: codeceptjs/CodeceptJS

This looks great. Are there any docs for cloud testing using services like Sauce Labs, Browser Stack, & Testling?

If not, there should be. Maintaining your own test lab is prohibitively expensive for most... =)

enhancement

Most helpful comment

Does anyone have a sample code snippet for running on Sauce Labs and using multiple configurations for browser, os, screen size?

All 13 comments

Yes, they will be added soon )

Awesome. =)

+1 for this. Definitely something I'll be using this for.

+1 @DavertMik is it trivial to get this to work with browser stack?

@DavertMik seems like this should be simple since you already support webdriverIO

All they require is the use of webdriverio.remote and passing your browser stack user and key in the configuration.

I would love to get involved and help with documentation on the subject.

Yes, it's simple but I didn't have a chance to try it myself)
29 січ. 2016 06:00, користувач "James R Qualls" [email protected]
написав:

@DavertMik https://github.com/DavertMik seems like this should be
simple since you already support webdriverIO

All they require is the use of webdriverio.remote and passing your
browser stack user and key in the configuration.


Reply to this email directly or view it on GitHub
https://github.com/Codeception/CodeceptJS/issues/27#issuecomment-176562357
.

@DavertMik I've already got it working. I've got some comments on how you're overriding perameters that are passed in the WebDriverIO constructor. I'll be submitting a pull request. WebDriverIO supports this out of the box. I think it would be better to directly support the parameters that webdriverio accepts rather than proxying them through a config wrapper.

@DavertMik pull request submitted.

Some tests will likely need to be updated. I'm already in the gitter channel if you want to chat about the PR.

@therebelrobot @ericelliott

If you want to use codeceptjs for cloud testing set your config like this.
I'm hoping that my pull request will get accepted and any valid WebDriverIO config will work.

For now you can do this in your codecept config.

if you guys need help getting this to work find me in the gitter channel.

{
  "helpers": {
    "WebDriverIO": {
      "url": "http://localhost:3000",
      "browser": "chrome",
      "user": "YOUR_CLOUDSERVICE_USER",
      "key": "YOUR_CLOUDSERVICE_KEY",
      "desiredCapabilities": {
        "browserstack.local": "true",
        "browserstack.debug": "true"
      },
      "logLevel": "warn",
      "coloredLogs": true,
      "waitforTimeout": 10000
    }
  }
}

Hi,

I am subscribed to crossbrowsertesting.com and therefore would like to use it with codecept, can anyone help me with setting up the codecept config?

@trikonasana
We currently start using crossbrowsertesting.com with the following config snippet:

{
  "helpers": {
    "WebDriverIO": {
      "host": "hub.crossbrowsertesting.com",
      "port": 80,
      "path": "/wd/hub",
      "url": "http://www.YOUR-URL.com",
      "browser": "internet explorer",
      "desiredCapabilities": {
        "name" : "YOUR TEST NAME",
        "build" :  "1.0",

        "browser_api_name" : "IE10",
        "os_api_name" : "Win7x64-C2",

        "screen_resolution" : "1280x1024",
        "record_video" : "true",
        "record_network" : "true",

        "browserName" : "internet explorer",

        "username" : "YOUR_LOGIN",
        "password" : "YOUR_KEY"
      }
    }
  }
}

Maybe some parameters can be omitted, we haven't played around with it very much yet

This works for me:

helpers: {
  WebDriverIO: {
    host: 'hub.browserstack.com',
    port: 80,
    path: '/wd/hub',
    url: '<YOU_TEST_URL>',
    restart: false,
    user: '<YOU_BROWSERSTACK_USERNAME>',
    key: '<YOU_BROWSERSTACK_KEY>',
    browser: 'Chrome',
    desiredCapabilities: {
      project: '<SOME_PROJECT_NAME>',
      os: 'Windows',
      os_version: '10',
      browser_version: '65.0',
      resolution: '1920x1080'
    }
  }
}

NOTE: host cannot contain http or https

Does anyone have a sample code snippet for running on Sauce Labs and using multiple configurations for browser, os, screen size?

Was this page helpful?
0 / 5 - 0 ratings