The basic components of a software test automation framework

  

The so-called automated test framework, which can be interpreted as a total solution for automated testing, is a collection of assumptions, concepts, and systems that support automated testing and their best practices. The framework of automated testing has different components for different application areas or different test levels, but we must understand how to meet the basic requirements of automated testing, understand the basic components of automated testing frameworks, and based on this, based on their own organization The actual situation is expanded to construct an adaptive test framework that is more adaptable, more efficient, and more powerful.

In order to carry out automated testing, infrastructure is first required to support the running of test tools, including web servers, mail servers, FTP servers, and more. The second is to perform automated testing, there must be a mechanism to ensure the execution of the test script. Specifically, the test environment is created, the test suite is created and executed, and the execution status is obtained and a test result report is given. Based on this analysis, a prototype of an automated test framework can be described, as shown in Figure 2-11.

Figure 2-11 in the prototype
Software test automation framework 2-11 prototype gives the basic elements of automated testing framework, including the implementation, script manager, report generator, etc., The relationship between these elements is also clearly described. However, this framework does not give other necessary information, for example:
Test script hierarchy, how to separate business logic and system basic operations?
How to implement the interface of automated test tools?
How to implement object mapping of the system under test?
How to arrange test tasks in advance?
How to manage effective test resources?
If you want to separate business logic and system basic operations on test scripts, you must encapsulate various basic operations into specific keywords, each keyword corresponds to a function, and business logic can be described by keywords and parameters. That is, the script structure can be described by using FIG. 2-12.

Figure 2-12 keyword-driven scripting framework
prior arrangement diagram of the test tasks, is also very important. For example, the tester schedules the test task before leaving work, and the actual test execution can start automatically after 9 o'clock in the evening or after a new package is obtained. In this way, the tester can get a test report before going to work the next day. After scheduling the task, you also need to develop an engine (Engine/Cron Job) with the corresponding trigger mechanism to perform the test task. It is responsible for completing the automatic deployment of packages, distributing scripts to various remote test machines, and launching test tools. For this part, you can use Figure 2-13 to describe, where the underlying infrastructure can be implemented by STAX. 2-13 automated testing tasks

map arrange and execute

Copyright © Windows knowledge All Rights Reserved