简体   繁体   中英

guidelines for test scripts in squish GUI testing

我需要有关 GUI 应用程序自动化测试的测试脚本方面的帮助,我选择了 javascript 来设计脚本,但据我所知,测试脚本示例与 javascript 完全不同。

Use Squish's record feature to record tests based on your GUI interaction.

In my experience, this is the most robust and flexible way to write test suites. As soon as you start refactoring or writing custom functions, your Squish code becomes tightly coupled with the application under test (AUT). This makes it hard to maintain the tests through changes to the AUT.

It is useful to work to have a flexible objects.map, so that as the AUT evolves, your tests retain meaning. It's also useful to write AUT-specific analysis and reporting code.

First of all.. It would be better to use another language then javascript. I prefered python because you can easily add third party modules and use oop.

If you are starting to write test automation scripts for a large software it would be better to create an architecture. In my last project I included abstraction layer classes which manage / control the gui of the aut (application under test).

The benefit of these structure is a quick respond of modification (new buttons etc). Furthermore other test developers needn't to know how to interact with buttons, checkboxes etc because they have to use your methods from the abstraction layer.

The best way to learn how a squish test script works, is to record a simple example (login). There you can see which functions to use. If the script works fine replace your text inputs with entries from a local tsv file and add a loop to create a bundle of test executions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM