It is possible to execute parallel Squish for Web tests using Firefox and Internet Explorer, providing some initial preparation is made.
Preparations for Internet Explorer¶
For Internet Explorer no extra steps are required.
Preparations for Firefox¶
Step #1 - Create profile¶
For Firefox you must use separate profiles for each Firefox instance. This means creating an additional profile using the Firefox ProfileManager and then choosing a particular Firefox profile using a command line option.
Managing Firefox profiles is described here: Use the Profile Manager to create and remove Firefox profiles.
Step #2 - Register the Squish Firefox Extension for each Firefox Profile¶
The Squish Firefox extension must be registered separately for each Firefox profile that should be used with Squish.
To register the Firefox extension for a new profile execute the following:
(Please replace “mysquishtests” and the path in the
file: URL according to your local setup.)
Specifying which Firefox Profile to use¶
Squish will use the default Firefox profile when no extra steps are done.
To use the a different Firefox profile pass the
--webbrowserargsparameter to squishrunner (not available when using the Squish IDE):
(Replace “mysquishtests” with the name of your profile.)
Note: You can change the default Firefox profile by (first closing Firefox; check in process list to make sure) starting Firefox with the “
-P” parameter and double clicking on the profile that should become the default.
Running parallel Squish for Web tests using the Squish Hudson Plugin¶
Support for passing the
--webbrowserargs options has been added in the Squish Hudson Plugin version 1.13 (and higher).
It is possible to specify a particular browser and browser command line arguments by filling in the “Extra options” field of the Squish build step. Here is an example that says to use Firefox with the profile “mysquishtests”:
Don’t get confused by the escaping of the browser arguments. The complete arguments must be enclosed within double quotes and each browser option must be enclosed within double quotes too. To keep the inner double quotes they must be escaped by a backslash.
Using a separate
One restriction the Squish Hudson Plugin has is that a separate
squishserver must be used. By default the plugin starts the
squishserver automatically if no arguments for Host and Port are given. This approach fails when executing parallel Squish builds in Hudson.
To use a separate squishserver just start the
squishserver, e.g., on port 4711 like this on Windows:
To use this
squishserver inside the Squish build step use 127.0.0.1 as the Host and 4711 as the Port.
Schedule Hudson jobs¶
Hudson jobs can be built in parallel by using the Hudson job’s Build Triggers section’s Build periodically feature. The syntax is similar to that used by the Unix cron tool. Further details are provided in the Hudson documentation.
Increasing allowed parallel builds¶
How many builds will be executed in parallel by Hudson can be configured using
Manage Hudson >
Configure System >
# of executors. This is set to 2 by default.