Automated Software Testing (6) -- building a central window in automated testing

Source: Internet
Author: User

In automated testing of the software GUI, you can run multiple test cases in batches only once .. To run this task in batches, each test case should be independent of each other in Gui operations. For example, the second test case in test suite cannot depend on the GUI result of the first test case. Similarly, the third test case does not depend on the second test case. We 'd better break the GUI context between test cases. But how can we achieve this? One way is to use the central window. Each test case must start running from a central window and be sure to run it after it is completed (if not, stop the execution of test suite, throw exception ...) Return to the central window. In this way, the initial GUI scenario of each test case is fixed, breaking the context of test case in GUI.

Select and divide the central window? Selecting the right central window from an aut should follow the following principles: 1) It is a public portal 2) It can quickly enter 3) you can also quickly enter other test scenarios. Such as the main interface of the program. There may be multiple central windows. In practice, all test cases correspond to only one central window, which is the simplest case. However, different test cases correspond to different central windows.

 

How to control the central window? In fact, we have to do two things here. First, let all test cases know how to start from the central window, and then test case know how to return to the central window after the execution is completed or an execution accident occurs midway through. The question is, should these two jobs be completed in test case? Or is there a central window controller? In my opinion, the former should not be put in test case, but should be done independently outside test case. Test Case should only contain the logic of this test case business field. Once you enter test case, the GUI scenario for testing should be created. Return to the central window, which can be considered as restoring the site. To ensure that all data can be restored to the original state, it is a little harsh for test case, especially when the test process occurs, such as the failure to find the GUI object. A central window controller should be able to help it restore to central window.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.