aboutsummaryrefslogtreecommitdiffstats
path: root/docs/install/testing.md
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
committerMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
commit377bd96aab7cad3434185c30eb908c9da447fe40 (patch)
tree7ec5527e205d5b62caaa862a7de8cd25199c8bf0 /docs/install/testing.md
parent56f61b1441070aa0b9ddcfc74aca46c20313609f (diff)
parent92b253904062edd533e55c22824de6fd01e2f7c1 (diff)
Merge tag 'v2.6' into fiksgatami-dev
Diffstat (limited to 'docs/install/testing.md')
-rw-r--r--docs/install/testing.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/install/testing.md b/docs/install/testing.md
new file mode 100644
index 000000000..b63dfffcc
--- /dev/null
+++ b/docs/install/testing.md
@@ -0,0 +1,47 @@
+---
+layout: page
+title: Testing
+---
+
+# Testing
+
+<p class="lead">
+ This page describes how to run FixMyStreet’s test suite.
+</p>
+
+## Server testing
+
+You can run the test suite for the backend codebase by running the following
+command in the `fixmystreet` directory:
+
+{% highlight bash %}
+$ script/test
+{% endhighlight %}
+
+The `master` branch of the repository should always be passing all tests for
+our developers and on mySociety's servers.
+
+## Client testing
+
+To run the front-end tests, you will need to install
+[Cypress](https://cypress.io) using `npm` (not direct download), and the
+`cypress` command needs to be on your `PATH`. Then you can run the front-end
+tests headlessly using:
+
+{% highlight bash %}
+$ bin/browser-tests run
+{% endhighlight %}
+
+This uses its own test server and database, not affecting your development
+database. If you wish to run the tests interactively for debugging, use:
+
+{% highlight bash %}
+$ bin/browser-tests open
+{% endhighlight %}
+
+If you're running FixMyStreet in a Vagrant box, you can use this script to run
+the test server in the VM and Cypress outside of it:
+
+{% highlight bash %}
+$ bin/browser-tests --vagrant run
+{% endhighlight %}