aboutsummaryrefslogtreecommitdiff
path: root/doc/testing.org
diff options
context:
space:
mode:
authorPjotr Prins2016-10-05 06:39:09 +0000
committerPjotr Prins2016-10-05 06:39:09 +0000
commitbd35fd6430e5b8b88fd3a7b8afa933d2b0f20b4e (patch)
tree61740f41b784fae7a970342665c11c6cf76bb300 /doc/testing.org
parent8f1b5b86a843ee2d17b427e2318eb13b29093d5d (diff)
downloadgenenetwork2-bd35fd6430e5b8b88fd3a7b8afa933d2b0f20b4e.tar.gz
Doc: on testing with Mechanical Rob
Diffstat (limited to 'doc/testing.org')
-rw-r--r--doc/testing.org43
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/testing.org b/doc/testing.org
new file mode 100644
index 00000000..1d5cc8b8
--- /dev/null
+++ b/doc/testing.org
@@ -0,0 +1,43 @@
+#+TITLE: Testing GN2
+
+* Table of Contents :TOC:
+ - [[#introduction][Introduction]]
+ - [[#run-tests][Run tests]]
+ - [[#setup][Setup]]
+ - [[#running][Running]]
+
+* Introduction
+
+For integration testing we currently use the brilliant Ruby Mechanize
+gem against the small database; a setup we call mechanical Rob because
+it emulates someone clicking through the website and checking results.
+
+These scripts invoke calls to a running webserver and test the
+response. If a page changes or is broken tests will break and we are
+informed. In principle, Mechanical Rob is run before code merges are
+committed to the main server.
+
+In the future we may move to Python mechanize - it'll be easy to mix
+the Ruby and Python versions.
+
+* Run tests
+
+** Setup
+
+Mechanize is not yet included in Guix deployment.
+
+
+** Running
+
+Run the tests from the root of the genenetwork2 source tree as, for
+example,
+
+: ./bin/test-website http://localhost:5003/ (default)
+
+If you are using the small deployment database you can use
+
+: ./bin/test-website --skip -n
+
+To run individual tests on localhost you can do
+
+: ruby -Itest -Itest/lib test/lib/mapping.rb --name="/Mapping/"