Skip to content

Commit

Permalink
updated to include working links
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 24, 2017
1 parent ceca95d commit 4f896c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

### Long version
**About**
Because the Narrative Interface is built on both the front and back ends of the Jupyter Notebook, there's two sides to Narrative testing. The front end tests are in JavaScript, and make use of Karma[link] as a test runner, and Jasmine [link] as a testing language. The back end tests are written in Python using the unittest framework, and run with nose [link].
Because the Narrative Interface is built on both the front and back ends of the Jupyter Notebook, there's two sides to Narrative testing. The front end tests are in JavaScript, and make use of [Karma](http://karma-runner.github.io/1.0/index.html) as a test runner, and [Jasmine](https://jasmine.github.io/2.0/introduction.html) as a testing language. The back end tests are written in Python using the unittest framework, and run with [nose](http://nose.readthedocs.io/en/latest/).

**How to run tests**
We aren't testing the underlying Jupyter code, but we are making use of it, so a test run requires a Narrative install as described in the installation [link] docs. If you're installing in a Virtualenv, make sure it's activated. You don't need to run the narrative yourself for tests to work, it just needs to be installed.
We aren't testing the underlying Jupyter code, but we are making use of it, so a test run requires a Narrative install as described in the [installation](../install/local_install.md) docs. If you're installing in a Virtualenv, make sure it's activated. You don't need to run the narrative yourself for tests to work, it just needs to be installed.

Then, simply run (from the narrative root directory) `make test`.

Expand All @@ -21,9 +21,9 @@ This calls a few subcommands, and those can be run independently for specific us
* `make test-backend` will run only the backend Python tests.

**Add credentials for tests**
The Narrative Interface is one of the hubs of KBase - it touches several different services, all of which need real authentication. Some of those have been mocked in various tests (like running apps), but others (the Workspace service) still require a real Auth token. See [link] for creating KBase Developer tokens.
The Narrative Interface is one of the hubs of KBase - it touches several different services, all of which need real authentication. Some of those have been mocked in various tests (like running apps), but others (the Workspace service) still require a real Auth token. If you have a KBase Developer account, you can create a Developer Token in the Account tab of the main KBase interface.

You can create auth token files in test/. These are single line files, containing only the Auth token used for testing a single user. For example, `test/narrativetest.tok` would be for the narrativetest user, and would only contain that user's Auth token.
You can store auth token files in test/. These are single line files, containing only the Auth token used for testing a single user. For example, `test/narrativetest.tok` would be for the narrativetest user, and would only contain that user's Auth token. DO NOT CHECK THESE IN TO GITHUB.

Next, these credentials need to be referenced for both the back and front end. This version requires two configs - one for Python, and one for JavaScript.

Expand All @@ -38,7 +38,7 @@ This just needs the path to the token file (with pre-pended slash), such as `"/t
* *TODO (10/24/2017): Unify these token configs!*

**Testing with Travis-CI / Coveralls**
These tests are run (without credentials) automatically on a pull request to the Narrative Github repo. These are currently run through Travis-CI [link] and the coverage reported with Coveralls [link]. There should be nothing you need to do to make this work.
These tests are run (without credentials) automatically on a pull request to the Narrative Github repo. These are currently run through [Travis-CI](https://travis-ci.org/) and the coverage reported with [Coveralls](https://coveralls.io/). There should be nothing you need to do to make this work.

**Adding your own tests**
* **Python**
Expand Down

0 comments on commit 4f896c5

Please sign in to comment.