Merge pull request #237 from kberg/closure
[dygraphs.git] / auto_tests / README
... / ...
CommitLineData
1These tests are run with js-test-driver
2(http://code.google.com/p/js-test-driver/).
3
4Running tests
5-------------
6
7With phantomjs:
8
9- Install phantomjs (http://www.phantomjs.org).
10
11- Start a terminal window at the dygraphs root directory (one
12 directory up from here.)
13
14- Run "./test.sh". This will tell you whether the tests passed.
15
16
17With a real browser:
18
19- Start a terminal window at the dygraphs root directory (one
20 directory up from here.)
21
22- From there, you start the test server and capture at least one slave
23 browser:
24
25 Run:
26 $ java -jar ./auto_tests/lib/JsTestDriver-1.3.3c.jar --port 9876
27
28 Open
29 http://localhost:9876/capture
30 in the browser you want to use for your test.
31
32- Run the tests with:
33
34 $ java -jar ./auto_tests/lib/JsTestDriver-1.3.3c.jar --tests all
35
36
37Debugging tests
38---------------
39
40This is a bit of a hack, but you can also run tests manually inside the browser
41using auto_tests/misc/local.html.
42
43Once you've opened that page, open up the JavaScript console and run something
44like:
45
46 new SimpleDrawingTestCase().runTest("testDrawSimpleRangePlusOne")
47
48to run just one test. This is useful for seeing the dygraph that the test
49creates, setting breakpoints, etc.
50
51Please don't rely on it as proof that your tests pass; the command-line is the
52reference for ensuring Dygraphs automated tests pass.
53
54
55(This is a specialized version of the instructions found at
56http://code.google.com/p/js-test-driver/wiki/GettingStarted.
57They're listed as a courtesy, but you really should get to understand
58js-test-driver, which has lots of powerful features.)