froglogic / All / How can I run Squish from the command-line interface?

How can I run Squish from the command-line interface?

Interested in scheduling your test suite or scripts to run? Or want to execute your scripts from the command-line interface (CLI)?

While scripts can be run unmanned using 3rd-party integrations, they can also be executed using Squish’s CLI. To record or execute your tests from the CLI, you’ll need to know the following:

  1. squishserver location and IP address (if different than squishrunner)
  2. squishrunner location (default location: <SQUISH_PACKAGE>/bin)
  3. Test suite path

For the squishrunner to communicate with the squishserver, squishserver must be running. If squishserver is on a separate machine than squishrunner, a squishserverrc file must exist specifying allowed hosts, or reconnections from other locations (more information).

Example 1
Execute the following command from <SQUISH_PACKAGE>/bin:

  1. Unix: ./squishserver
  2. Windows: squishserver.exe

Notice: The default, or first available Squish port, 4322, displays.

Instruct squishrunner to run a test suite using the running squishserver by executing:

  1. Unix: ./squishrunner --host <IP_AddressOfSquishServer> --port 4322 --testsuite <PathToTestSuite>
  2. Windows: squishrunner --host <IP_AddressOfSquishServer> --port 4322 --testsuite <PathToTestSuite>

Note: The –port parameter can be omitted when default port is used.

Example 2
Wish to create something simple you can reuse, and easily modify to point to different squishrunner, squishserver and testsuite combinations? How about producing xml execute results and generating an HTML report? Try creating a shell or batch script:

2a: Simple Unix Shell Script
./squishrunner --host $SQUISH_SERVER_HOST --port $SQUISH_SERVER_PORT --testsuite $TESTSUITE --reportgen xml2.1,$REPORTPATH/report.xml
cd <SQUISH_PACKAGE>/examples/regressiontesting/
./ --dir $REPORTPATH/HTMLReports $REPORTPATH/*.xml
open $REPORTPATH/HTMLReports/index.html

2b: Simple Windows Batch Script

NOTE: This script requires python installed to convert the report from XML to HTML. PYTHONPATH must reflect local machine python directory.

set SQUISH_SERVER_HOST=<IP_AddressOfSquishServer>
set TESTSUITE=<PathToTestSuite>
set REPORTPATH=<PathToOutputReport>
set PYTHONPATH=C:\python27\
squishrunner --host %SQUISH_SERVER_HOST% --port %SQUISH_SERVER_PORT% --testsuite %TESTSUITE% --reportgen xml2.1,%REPORTPATH%/report.xml
%PYTHONPATH%\python.exe %SQUISHPATH%\examples\regressiontesting\ --dir HTMLReports *.xml

Example 3
Take your script to the next level. The following script, when executed from the squishrunner directory (<SQUISH_PACKAGE>/bin), determines the squishserver path, report path, and in this case the path of a sample test suite:

echo "This script runs a Test Suite and generates an HTML report"
echo "Squish Server must be running in advance"
echo "Script assumes executed from <SQUISH_DIR>"
echo "Press Ctrl+C at any time to terminate script"
read -p "Press any key to begin"
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolute and normalized
if [ -z "$MY_PATH" ] ; then
# error; path is not accessible
exit 1 # fail
echo "$MY_PATH"
./squishrunner --host $SQUISH_SERVER_HOST --port $SQUISH_SERVER_PORT --testsuite $TESTSUITE --reportgen xml2.1,$REPORTPATH/report.xml
cd $MY_PATH/examples/regressiontesting/
./ --dir $REPORTPATH/HTMLReports $REPORTPATH/*.xml
open $REPORTPATH/HTMLReports/index.html

For more information, read:

Command-line Tools For Image Comparisons
Automated Batch Testing
KB: Automated, Nightly, Batch Testing
CLI Reference Guide


Do we execute the squish runner commands directly from Squish IDE or is there any path where we can find squishserver or squishrunner command line?

We are using Squish for web ? I am pretty munch confused what is Squish server or Squish runner? and where can we execute these Squishrunner Commands?


You can execute tests from the IDE manually, but if you’d like to schedule or run tests unmanned, you can use the Squish command-line interface, or one of our integrations.

More information about the Squish command-line interface, including squishrunner and squishserver can be found here:

The Automated Batch Testing link (above) as well as the example above also demonstrate where and how to execute the commands.

If you need more details, please contact for support

Hi Amanda

I have used the addAttachableAUT to specify the AUTs to attach,To verify whether this has really worked,Is there any command to see the currently attached AUTs?

Hello Tom.

The registered Mapped AUTs and Attachable AUTs are registered in “server.ini”, which by default resides in $HOME/.squish/ver1 (Unix) and %APPDATA%/froglogic/Squish/ver1 (Windows). So looking at that file you can check the registered AUTs.

You can also ask squishrunner to contact a running squishserver to get that info via “squishserver –info attachableApplications” (see “squishrunner –help” for supported options).

Please do not hesitate to contact for technical supports requests like this.

i am unable to start the aut from command line

squishrunner –config addAUT “my application” “C:\my application””
squishrunner –testsuite “E:\MYTests\UIAutomationTests” –aut “my application”

Warning: runApplication: AUT my does not exist

    Another thing:
    there is a space in my application name. Even if its in double quotes its not working

Hello shibani rout.

The commands that you have pasted above contain different types of double quotes.

Unfortunately operating systems and related software are a bit narrow minded about the types of double quotes they like to use, therefore can you please try again, but this time use “normal” double quotes (this is a normal double quote: ” and these are not normal double quotes: ” “).

Then, after registering the Mapped AUT, please double check the corresponding Mapped AUT entry in the server.ini file (which by default resides in $HOME/.squish/ver1 (Unix) and %APPDATA%/froglogic/Squish/ver1 (Windows).

If it still does not work please copy and paste the complete commands that you used and their original output, as well as the server.ini file contents here.

Thank you.

With best regards

Clemens Anhuth

    I need some Help on Squish Runner , any one having idea , plz help
    I am trying to execute the scripts using the commands using the squish runner without using the Squish Plugin. But, I am the issues

    I am using the below command to execute the scripts

    cd /Applications/Squish for Mac/bin
    ./squishrunner –testcase /Users/vijay/testcase1
    application is opening and then immedialty closing the jenkin logs I am seeing error as startApplication() failed
    In the Mapped AUTs, AUT Paths , applications is available
    under server settings

squish IDE 6.3.0 is not able to find the Andriod emulator running from andriod stuidio 2.3.3 Can you please tell me what issue might be there ?

    Hello Tahir. Can you please contact our technical support regarding your technical problem? Thank you!

Is there a way to trigger or start suishserver remotely in windows/Linux before starting to execute test cases. Do you have any command line interface for it?

    Hello Arunkumar Vikram.

    Yes, there is a mechanism:

    Step 1: Set up your computer to log in automatically.
    Step 2: Make it so that a squishserver instance is being started automatically after log in.
    Step 3: Use that automatically started squishserver instance via the RemoteSystem API to execute arbitrary commands:

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap