Merge pull request #1953 from BryceLTaylor/Update-Integration-README

Update integration readme with Sauce Labs information
This commit is contained in:
Bryce Taylor 2018-07-09 10:51:45 -04:00 committed by GitHub
commit d251a73672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -7,8 +7,8 @@
"stop": "make stop", "stop": "make stop",
"test": "make test", "test": "make test",
"smoke": "tap ./test/integration/smoke-testing/*.js --timeout=3600", "smoke": "tap ./test/integration/smoke-testing/*.js --timeout=3600",
"smoke-verbose": "make smoke-verbose", "smoke-verbose": "tap ./test/integration/smoke-testing/*.js --timeout=3600 -R spec",
"smoke-sauce": "tap ./test/integration/smoke-testing/*.js --timeout=60000", "smoke-sauce": "SMOKE_REMOTE=true tap ./test/integration/smoke-testing/*.js --timeout=60000",
"watch": "make watch", "watch": "make watch",
"build": "make build", "build": "make build",
"dev": "make watch && make start &" "dev": "make watch && make start &"

View file

@ -9,16 +9,27 @@
# Running the tests # 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 * 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
* Tests can be run using Saucelabs, an online service that can test browser/os combinations remotely. Currently all tests are written for use for chrome on mac.
## Using tap ## 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` * Run all tests in the smoke-testing directory from the command-line: `$ SMOKE_USERNAME=username SMOKE_PASSWORD=password ROOT_URL=https://scratch.mit.edu npm run 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` * 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) * 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)
* To run tests using saucelabs run this command `$ SMOKE_USERNAME=username SMOKE_PASSWORD=password SAUCE_USERNAME=saucelabsUsername SAUCE_ACCESS_KEY=saucelabsAccessKey ROOT_URL=https://scratch.mit.edu npm run smoke-sauce`
### Configuration ### Configuration
| Variable | Default | Description | | Variable | Default | Description |
| --------------------- | --------------------- | --------------------------------------------------------- | | --------------------- | --------------------- | --------------------------------------------------------- |
| `ROOT_URL` | `scratch.ly` | Location you want to run the tests against | `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_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 | | `SMOKE_PASSWORD` | `None` | Password for Scratch user you're signing in with to test |
| `SMOKE_REMOTE` | `false` | Tests with Sauce Labs or not. True if running smoke-sauce |
| `SMOKE_HEADLESS` | `false` | Run browser in headless mode. Flaky at the moment |
| `SAUCE_USERNAME` | `None` | Username for your Sauce Labs account |
| `SAUCE_ACCESS_KEY` | `None` | Access Key for Sauce Labs found under User Settings |
## Using Saucelabs
* You will need a Saucelabs account in order to use it for testing. To find the Access Key, click your username and select User Settings from the dropdown menu. Near the bottom of the page is your access key that you can copy and use in the command line.