Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
More test running examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-roemer committed Apr 22, 2015
1 parent 505e13b commit 42f7889
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Expand Up @@ -64,6 +64,12 @@ For each of these
Server-side (aka "backend") tests have two real flavors -- *unit* and *REST*
tests. To run all the server-side tests, try:

```sh
$ npm run-script test-backend
```

*OR*

```sh
# Mac/Linux
$ node_modules/.bin/mocha --opts test/server/mocha.opts test/server
Expand Down Expand Up @@ -126,9 +132,17 @@ files in isolation. Some aspects of these tests:
* Mock out real browser network requests / time.
* Typically test some aspect of the UI from the user perspective.
* Run tests in the [browser][fst_test] or from command line.
* May need to be bundled like your application code.

Build, then run the tests from the command line with:

```sh
$ npm run-script build-test
$ npm run-script test-frontend
```

*OR*

```sh
# Mac/Linux
$ node_modules/.bin/webpack --config webpack.config.test.js
Expand All @@ -153,6 +167,12 @@ instance of the entire web application. These tests typically:

Run the tests with:

```sh
$ npm run-script test-func
```

*OR*

```sh
# Mac/Linux
$ node_modules/.bin/mocha --opts test/func/mocha.opts test/func/spec
Expand All @@ -161,6 +181,41 @@ $ node_modules/.bin/mocha --opts test/func/mocha.opts test/func/spec
$ node_modules\.bin\mocha --opts test\func\mocha.opts test\func\spec
```

#### Alternate Browser / Options

Our functional tests are configured via
[rowdy](https://github.com/FormidableLabs/rowdy) which has various logging
and browser options in its
[config file](https://github.com/FormidableLabs/rowdy/blob/master/config.js).

For example, on **Mac/Linux**:

```sh
# Chrome Tests
$ ROWDY_SETTINGS="local.firefox" npm run-script test-func

# Additional Logging
$ ROWDY_OPTIONS='{ "clientLogger": true, "serverLogger": true }' \
npm run-script test-func

# Initiate a Sauce Labs remote test
$ ROWDY_OPTIONS='{ "clientLogger": true }' \
ROWDY_SETTINGS="sauceLabs.safari7-mac" \
SAUCE_USERNAME=<INSERT> \
SAUCE_ACCESS_KEY=<INSERT> \
npm run-script test-func
```

and similarly on **Windows**:

```sh
# Internet Explorer Tests
$ cmd /C "set ROWDY_SETTINGS=local.ie && npm run-script test-func"

# Additional Logging
$ cmd /C "set ROWDY_OPTIONS={ "clientLogger": true, "serverLogger": true } && npm run-script test-func"
```

## Sample Web App

The "Converter" is a simple utility to camel/dash/snake case a string by way
Expand Down

0 comments on commit 42f7889

Please sign in to comment.