Automating Test Cases using Squish Framework with Python
This section introduces you to the Squish automation framework, guiding you through the process of creating, managing, executing, and maintaining test case scenarios leveraging the algoQA automation process.
Prerequisites
Squish Installation
About the Squish framework
Applicable for: Desktop, mobile and embedded systems automation types
Squish serves as an automation tool designed for executing test scripts in the regression stage of software testing for user interfaces. algoQA with its extended capability supports Squish and helps you to generate Squish scripts.
To install the Squish framework, see Squish Installation Guide.
Python Installation
If you need a different Python version or have specific requirements that the bundled Python version cannot meet, then download the compatible version or the latest version from here. If you need to install Python packages, then refer to the Installation steps for Python section.
Use case
This use case demonstrates the automation of updating a patient's demographic details by integrating algoQA with the Squish framework using the in-built Python scripting language. The example showcases an in-sprint automation process, automating the steps of updating a patient's demographic details and viewing it in the Patient details screen.
Test Design the Application
You can leverage algoQA and perform the following:
Profiling is creating an offline model of an application under test (AUT), which involves mimicking a UI model of an AUT using nodes, features and UI elements. For more information, see Profiling.
Pick an object and inspect it using Squish
Squish allows you to "pick" GUI objects of the currently running application. Once picked, the following can be done with the object:
- Inspect the properties
- Insert the methods
- Create verification points for property values (property verification points)
- If you have a test script already, perform the following:
- In the Application Objects, look for the icon to activate Squish in "pick" mode.
- Return to the Application Under Test (AUT) by clicking its window title bar once to give it focus.
- Mouse over the required object to inspect the element, and the selected element will be highlighted. All the properties will be displayed in the Properties tab. Choose the required attribute to locate the element.
- Navigate to the Control List Panel window to update the locator. You can update the locator fetched from the Object Spy tool and save it. Similarly, update all the locators required for the objects.
Record the scenarios using Offline Recorder
The Record Scenario feature is used to record and save the workflow or scenario or use case. The scenario will be saved in the same sequence it has been recorded.
Note: Recording for the Record Scenario feature is done in an offline model. It doesn't interact with the live application.
You can record scenarios by following the steps described in the 'Record Scenario' section of the profiling article, using the use case steps provided in the Use Case section.
Test Design
Navigate to Scenario List. All the scenarios corresponding to the project are listed here. Click on the scenario.

The Scenario Steps List appears:

- You can add and list controls within the test steps.
- Easily track the sequence of scenarios.
- Use draggable functionality to rearrange test steps. For more information on editing the scenarios, refer to Managing Test Cases using Edit Scenario Workflow.
Generate Test Cases and Test Scripts
This section helps you generate test cases and test scripts using the Squish framework. Refer Generate Test Cases and Test Scripts.
Execution of the Test Scripts
When using Squish with algoQA, the generated test scripts will be stored in the same folder. You can choose to either download these test scripts to your local machine or import them into the Squish tool, depending on whether you are accessing the Squish tool on your local machine or a virtual machine.
After opening the scripts in Squish, you can edit, review, and fix any issues, then rerun them.
Execution Options
You can execute scripts in two ways:
- Using Feature Files: Open the respective Feature File you want to execute in Squish. You can either execute a single scenario or an individual step by right-clicking on the corresponding scenario outline or an individual step. You can execute the entire Feature File by right-clicking on the respective file without opening it.
- Using Command Prompt: Alternatively, you can execute scripts using the command prompt, providing command-line instructions to run your tests.