The upcoming Squish 6.5 release introduces a small but helpful improvement for automated execution of local tests. It will allow execution of Squish test suites on the same machine using only a single command line invocation.
An earlier article about Synchronized Batch Execution shows what is currently needed for reliable automated execution of a Squish test suite. The major point that is solved in that article is synchronizing the two main processes needed for a Squish test suite execution, squishserver and squishrunner. The resulting procedure takes several steps to execute a Squish test suite:
- Start squishserver
- Wait for squishserver to become available
- Start squishrunner to execute the Squish test suite
- Stop squishserver
- Ensure squishserver has shut down completely to avoid conflicts with later test executions
Beginning with Squish 6.5 it is possible to replace these steps with a single one by adding the --local
switch to the squishrunner command line call. This switch will instruct squishrunner to start and stop a local squishserver automatically, including the needed synchronization with squishserver as well as configuring the network connection between squishrunner and squishserver automatically. Finally, using --local
also ensures that squishserver will only accept local connections which avoids firewall dialogs on some operating systems.
A full command line for executing a Squish test suite on the same machine can look as simple as:
$SQUISH_PREFIX/bin/squishrunner --testsuite "/path/to/suite_test" --local
Additional steps for starting, synchronizing and stopping squishserver are now no longer necessary. For more complex setups, especially when remote-testing across multiple machines is needed, it may still be beneficial to control squishserver and squishrunner separately but the common case of executing tests locally does not need this anymore.