How to Create Test Scripts
The following sections describe the most commonly used Squish features and provide examples of using Squish. Especially, Squish's scripting support, the different scripting languages Squish supports, and the script APIs which are available when working with test scripts:
- How to Identify and Access Objects
- How to Use Test Statements
- How to Use Event Handlers
- How to Create and Use Synchronization Points
- How to Test Multiple AUTs from a Single Test Script, Using ApplicationContext
- How to Automate Native Browser Dialogs, ActiveX, and more
- How to Create Semi-Automatic Tests that Query for User Input
- How to Create Automatic Screenshots on Test Failures and Errors
- How to Do Keyword-Driven Testing
- How to Interact with Files and with the Environment in Test Scripts
- How to Access Databases from Squish Test Scripts
- How to Handle Exceptions Raised in Test Scripts
- How to Modify Squish Functions
- How to Edit and Debug Test Scripts
- How to Create and Use Verification Points
- How to Create and Use Shared Data and Shared Scripts
- How to Do Image-Based Testing
- How to Communicate With CAN bus Devices
- How to Do Automated Batch Testing
- How to Create Cross-Platform Tests
- How to Analyze Test Results
For complete references of the Squish APIs, tools, and IDE, see API Reference, Tools Reference, and IDE Reference.
Unicode UTF-8 File Encoding
The Squish IDE loads and saves test scripts (e.g., files with names matching test.*
), as Unicode text using the UTF-8 encoding. All the Squish tools assume that UTF-8 is used for all the scripts they execute. See the Editor view. If you don't edit your test scripts using the Squish IDE, make sure that the editor you use loads and saves the scripts using UTF-8; or, if your editor is not Unicode-capable, then the most sensible alternative is to restrict your code to 7-bit ASCII—which all modern editors support—since this is a subset of UTF-8.
Some characters, most notably double quotes ("
) and backslashes (\
), must be quoted in string literals. For example, "C:\\My Documents"
. This requirement is shared by all the scripting languages that Squish supports.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.