Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Standalone Mode

This example doesn't need Selenium installation locally. See more detail about standalone mode here.

  • Pros: flexibility and better control
  • Cons: can't use synchronous mode (because it's a part of wdio test runner)

Requirements

A cloud testing service account is needed: Saucelabs, BrowserStack or TestingBot. This example uses TestingBot.

  • Node.js is installed to your local system
  • TestingBot account
  • TestingBot key (set to $TESTINGBOT_KEY as an environment variable)
  • TestingBot secret (set to $TESTINGBOT_SECRET as an environment variable)

Usages

At the first, clone or download this dir. Then install dependencies:

$ npm install

This example has devDependencies below:

Run the local test:

$ npm run test-local
phantomjs
  First Test Group
    ✓ gets the title of MDN toppage
  Second Test Group
    ✓ gets the title of GitHub toppage

2 passing (702ms)

Run the cloud test:

$ npm run test-cloud
firefox - latest - WINDOWS
  First Test Group
    ✓ gets the title of MDN toppage
  Second Test Group
    ✓ gets the title of GitHub toppage

chrome - latest - WINDOWS
  First Test Group
    ✓ gets the title of MDN toppage
  Second Test Group
    ✓ gets the title of GitHub toppage

4 passing (46s)

Or run both:

$ npm test

Test files

  • test/
    • e2e/
      • first.js : the first group of tests
      • second.js : the second group of test
    • e2e.js : test runner
    • webdriver.cloud.js : settings for the cloud environment
    • webdriver.local.js : settings for the local environment

Note: basically you don't need to change e2e.js.