How to Create Semi-Automatic Tests that Query for User Input
The most common use case for Squish tests is full automation—Squish is used to record a test (or we write a test manually), and then plays the test back and reports the results. But in some situations we might want to create a semi-automatic test that requires the tester to provide some input. For example, when testing some software with a hardware device we might want to ask the user who is running the test if the device's state has been changed in the expected way.
For example, imagine that we want to write tests for some printer-related software. The tests exercise the software, and one of the results should be that the printer prints a page with the text "This is a test".
Since Squish can't verify a physical occurrence such as a page coming out of the printer with some specific text on it, any test that has such a requirement must rely on the tester to inform Squish whether the test passed or failed. Squish offers the Functions. for such purposes.
© 2022 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.