Functional Tests

  • Execute Tests in Bamboo (Unless you are updating the functional tests and want to test your changes, the functional tests should be executed from our CI pipeline in Bamboo)
  • view all of the jobs that have been run against Sauce Labs
  • Using Selenium Execute the following command which will open up the browser window(s) and execute the functional tests.

    yarn functional-browser
    

    Passing in the environment flag to the functional and functional-browser scripts determines which environment the functional tests will be executed against. The local value assumes you have the application running on localhost:8080.

    yarn functional -- --environment uat --cat releaseSmoke
    
    Problem running yarn functional-browser?

    You may get an error reporting a missing fibers binary of win32-x64-51 if you do, get a copy of the latest binaries e.g. npm install fibers

Configuration

Configuration is mainly done in wdio.core.js, with additional config settings for local and sauce scenarios in wdio.browser.js and wdio.sauce.js. If you want to override the core settings locally without affecting your git workspace, create a wdio.override.js file and override any object params there. This file should export an object:

 exports.config = {
     specs: [
         './src/tests/**/auto.js'
     ],
     maxInstances: 1
 };
Using Sauce Labs
  1. You can access your Sauce Labs account here: http://saucelab.com
  2. You will need to have your proxy configured properly.
  3. You will need the following environment variables set:
    • SAUCE_USERNAME
    • SAUCE_ACCESS_KEY
  4. Execute the following command:
    yarn functional
    
  5. Passing in the environment flag to the functional and functional-browser scripts. You'll notice that yarn requires -- before any arguments are passed.
  6. To test local code with Sauce Labs, you need to add a localURL attribute to the wdio.override.js file

    exports.config = {
        localURL: 'http://<YOUR IP AND PORT>'
    };
    

results matching ""

    No results matching ""