scratch-www/test/integration
2018-05-08 16:29:35 -04:00
..
smoke-testing Split integration test test_signing_in_and_my_stuff into test-login-failures and test-my-stuff 2018-05-08 16:29:35 -04:00
teacher-registration Revert "Merge pull request #1787 from LLK/revert-1786-hotfix/es6-upgrade" 2018-01-30 10:33:15 -05:00
package.json Update selenium-webdriver and chromedriver versions to match gui. 2018-05-08 16:19:56 -04:00
README.md Remove references to Saucelabs 2017-12-14 17:36:15 -05:00
selenium-helpers.js Move Selenium-Helpers file and point integration tests to it 2018-05-08 16:26:48 -04:00

Requirements

  • Selenium
    • See this directory's package.json
  • TAP
    • In the scratch-www repo's package.json
  • Chromedriver

Running the tests

  • By default, tests run against our Staging instance, but you can pass in a different location if you want to run the tests against e.g. your local build

Using tap

  • Run all tests in the smoke-testing directory from the command-line: $ SMOKE_USERNAME=username SMOKE_PASSWORD=password ROOT_URL=https://scratch.mit.edu make smoke
  • To run a single file from the command-line: $ SMOKE_USERNAME=username SMOKE_PASSWORD=password ROOT_URL=https://scratch.mit.edu node_modules/.bin/tap ./test/integration/smoke-testing/filename.js --timeout=3600
    • The timeout var is for the length of the entire tap test-suite; if you are getting a timeout error, you may need to adjust this value (some of the Selenium tests take a while to run)

Configuration

Variable Default Description
ROOT_URL scratch.ly Location you want to run the tests against
SMOKE_USERNAME None Username for Scratch user you're signing in with to test
SMOKE_PASSWORD None Password for Scratch user you're signing in with to test