forked from googlearchive/chromedeveditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Devon Carew edited this page Oct 2, 2013
·
3 revisions
The tests run in Spark itself. They have access to everything Spark does; we don't have to have a separate application to run the unit tests. This will allow us to do integration level testing on Spark in addition to unit testing.
From the command-line, run:
./grind mode-test
The next time you run Spark, a Run Tests
button will show up in the UI. Hit that to run the tests; test output will go to the console.
On a build bot, the story's a bit different:
- a test listener (
tools/test_runner.dart
) starts up and binds to a known port (~5210) - it spawns a Chrome process with Spark specified via the --load-and-launch-app flag
- when Spark starts, it tries to connect to port 5120
- if it succeeds, it starts running all the tests and piping the test results to the test listener service
- when the tests finish, Spark closes its window
- the test listener service listens for one of process exit, test completion, or test timeout, and kills the child process as necessary
- the service also logs all test results to stdout, and returns an exit code based on the tests passing or failing
The continuous build and testing happens on drone.io.