This repository has been archived by the owner on Apr 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 412
Testing
Devon Carew edited this page Jan 17, 2014
·
5 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.