Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matteosb committed Apr 28, 2020
1 parent 415970e commit 99698c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 101 deletions.
68 changes: 0 additions & 68 deletions docs/EXPLANATION-end-to-end-tests.md

This file was deleted.

41 changes: 8 additions & 33 deletions docs/HOWTO-run_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,17 @@ GRANT ALL PRIVILEGES ON DATABASE spoke_test TO spoke_test;
## SQLite Testing (simpler)

1) Run `yarn run test-sqlite`

## Test Redis Cache

Redis is used for caching and is separate from the backend DB so can be used with sqlite *or* postgres. Redis cache testing defaults to postgres and functions like an 'addon' to the DB for improved speed/scalability.

1) Run `yarn test-rediscache`

## End-To-End (Interactive Browser) Testing

1. Remember to set `NODE_ENV=dev`
2. **Start DB** and **Start Spoke Server** as described in the [Getting Started](
https://github.com/MoveOnOrg/Spoke/blob/main/README.md#getting-started) section.
1. Install browser driver(s)

* Installing chromedriver on MacOS
```
brew tap homebrew/cask
brew cask install chromedriver
```
* References
* [Selenium HQ - JavaScript Docs](http://seleniumhq.github.io/selenium/docs/api/javascript/)
* [Homebrew - Casks - chromedriver](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/chromedriver.rb)
1. Running tests...
* ... using your local browser
```
yarn run test-e2e
```
* ... individually
```
yarn run test-e2e <test name>
```
* ... using Sauce Labs browser with your local host

**Note:** You must first setup [Sauce Labs](https://github.com/MoveOnOrg/Spoke/blob/main/docs/EXPLANATION-end-to-end-tests.md#saucelabs)
```
export SAUCE_USERNAME=<Sauce Labs user name>
export SAUCE_ACCESS_KEY=<Sauce Labs access key>
yarn run test-e2e <optional test name> --saucelabs
```
## End-To-End Testing

1. Run your local development environment with DEFAULT_SERVICE=fakeservice.
2. Run `yarn run cypress open` for the interactive test runner. For non-interactive
run `yarn run cypress run --browser <browser>`.

See [the Cypress documentation](https://docs.cypress.io/guides/guides/command-line.html) for more info.

0 comments on commit 99698c3

Please sign in to comment.