Working with multiple Squish Projects

Last edited on

Synopsis

When working on multiple, independent Squish related projects, it may be desirable to be able to start the Squish IDE with project specific configuration for...

Squish supports this through the following functionality:

Example Project

Here is an example project.

It consists of the following:

    project1/
        global_scripts_dir1/
        global_scripts_dir2/
        global_scripts_dir3/
        suite_suite1/
        suite_suite2/
        suite_suite3/
        project1_squishide.bat
        project1_squishide_cfg.py

(This example project has a simple folder/file structure, but the location of the global script and test suite folders can be chosen freely.)

The gist of this is contained in the script project1_squishide.bat (which is a hybrid batch file and Python script for sake of brevity). As it is based on Python, Python must be installed on the desired computer.

project1_squishide.bat has an associated configuration file project1_squishide_cfg.py:

    [...]
    squish_dir = fr'C:\Users\myuser\squish-9.1.1-qt610x-win64-msvc143'

    global_script_folders = [
            fr'{folder_of_this_script}\global_scripts_dir1',
            fr'{folder_of_this_script}\global_scripts_dir2',
            fr'{folder_of_this_script}\global_scripts_dir3',
        ]

    test_suites = [
            fr'{folder_of_this_script}\suite_1',
            fr'{folder_of_this_script}\suite_2',
            fr'{folder_of_this_script}\suite_3',
        ]
    [...]

When launched, project1_squishide.bat uses the Squish directory, global script folders and test suites specified in project1_squishide_cfg.py to change the Squish configuration of the Global Scripts in Squish, and then starts the Squish IDE and instructs it to load the specified test suites.

Use with multiple Projects

To use this with multiple projects, create a copy of (and probably rename) the helper script and its configuration file. Then modify the configuration file as needed.

(Renaming project1_squishide.bat is possible, but its associated configuration file (here project1_squishide_cfg.py) must be renamed accordingly. For example project_xyz_squishide.bat and project_xyz_squishide_cfg.py.)

Then, to change from the currently running Squish IDE, that is configured for project1, just close the Squish IDE, and then launch the .bat file of the desired project (say, project2_squishide.bat).

Limitations