Enhance Squish GUI Testing with AI Assistants Using the New MCP Sample

To help you get started using Qt Group's Quality Assurance tools with AI assistants we are sharing Squish Model Context Protocol (MCP) sample implementation. If you're using Squish for your automated GUI testing, this integration example opens a whole new dimension of possibilities as it could speed up development of test scripts, help in test script maintenance and improve test results analysis in AI assisted workflows in applications such as Cursor and Claude for desktop. 

With the help of Squish MCP an AI assistant has direct access to running test scripts and the results of those test runs for future improvements and analysis. The below video clarifies the benefits and shows how to run two Squish test scripts for the Address book application written in Qt/C++ from the Claude for desktop: 

 

 

New to Squish? Squish is a professional GUI testing framework for test automation for apps on Android (including Android Automotive), macOS, iOS, Linux, and Windows. It can also test native and cross-platform toolkits for embedded targets. See our product page or product documentation for more information or head this page for Qt developers. 

So what exactly is Squish MCP? 

Model Context Protocol (MCP) is a way to expose AI assistants to external tools and information. AI assistants for developers working on test automation often run on desktops so integrating testing tools to the AI assistants is desirable. Squish has a clear architecture and matching command line tools that are used in CI/CD setups. These command line tools can be easily made available to the AI assistants as can be seen in the published MCP sample code. 

Below image explains the Squish MCP setup in a desktop: 

Screenshot 2025-04-17 at 17.12.31

Item 1 and 2 The AI assistant (e.g. Claude for desktop) runs both the MCP client and the MCP Server 

Item 2 MCP server squishrunnermcp.py wraps the Squish command line tool squishrunner  which is invoked when the AI assistant runs a test script or test suite 

Item 3 Squish Runner connects to the Squish Server over socket connection 

Item 4 Squish Server invokes the Application under test (AUT) – in the video this is the Address book application written in Qt/C++ – and passes the test results back to the AI assistant

Note that the same MCP server setup works for all the supported platforms and GUI toolkits by Squish including Windows MFC/WPF, Java Swing, Apple’s UIKit, Android, web and more.

Benefits and example commands 

As shown in the video, there are several benefits of Squish MCP in AI assisted workflows: 

  1. Control: Execute individual Squish test scripts or complete test suites with Squish MCP directly from the AI assistant 
  2. Analyze: Utilize the test results in AI-assisted debugging and test script maintenance 
  3. Create: Rapidly create new Squish test scripts through direct AI assistant access to test outcomes and verify the test scripts without leaving the AI assistant 

Example commands to try out with the Squish MCP include: 

  • “Run tst_general”  
    • For running individual test scripts  
  • “Execute /projects/addressbook/suite_py 
    • For running a full test suite and all test scripts in it 
  • “Analyze and explain the error, see from git logs if there was a change explaining. Suggest changes to the test script and rerun the test script with the suggested changes” 
    • After receiving an error from running a test script 
  • “Create a new test case based on tst_adding and add there 10 names with hangul characters and run it in the end” 
    • Assist in sample data generation 

 

How to get started 

Head to the repository for instructions on how to set up the Squish MCP example for AI assistants. Ensure you have Squish installed and an MCP-compatible AI assistant like Cursor or Claude for desktop. 

For the best output from the AI assistants in Squish test script authoring, make sure the AI assistant has access to the Squish developer documentation. See the instructions on how to index external documentation in Cursor. As is the case with all generated code by LLMs, rely on your expertise for final judgment and audit all generated code before deployment. 

Conclusions and Future Development  

Integrating Squish to AI assistants opens exciting possibilities for more intelligent, flexible, and automated GUI testing workflows. We are keen to see how the provided Squish MCP implementation will be used by our existing customers and teams evaluating Squish for their needs. We also expect Squish MCP to be a good fit for custom AI platforms that our partners are building.  

We invite you to try Squish MCP and see whether it can be useful with your test scripts and whether you can be more efficient with Squish MCP as part of your workflows. We are committed to developing Generative AI and AI enablers for all our testing tools and seek to work together with our customers to improve their testing workflows. 

Need more information?   

Please contact the author Otso Virtanen at @qt.io - Otso is the product lead for the Generative AI/AI initiatives for Qt Group's Quality Assurance tools. For Squish see our product page or product documentation for more information. 

 


Blog Topics:

Comments