Five common automated testing frameworks

The use of framework design in the implementation of automated software testing system can minimize the maintenance of test scripts. However, a large number of automated testing tools use the traditional "record-playback" model

type, resulting in a high amount of script maintenance, because the test data is implemented in a hard-coded way in the test script program. In addition, in addition to testing the graphical user interface of the application, the built-in test cases of the tool actually

There is no other use for it. Therefore, how to choose an appropriate test automation framework is a top priority for an automated test team to start.

         An automated testing framework is a collection of assumptions, concepts, and practices that support automated testing. Five basic automated testing frameworks are described below: modular test script framework, test library structure

framework, keyword-driven/table-driven testing framework, data-driven testing framework, and hybrid testing framework. You can consider adopting one of the test frameworks according to actual needs instead of just relying on a simple

capture tool. At the same time, these frameworks are the basis for understanding the automatic testing framework and designing the automatic testing framework according to one's own needs and experience.

1. Modular Test Framework

       Modular test script framework (TEST MODulARITY FRAMEWORK) needs to create small and independent modules, fragments and scripts of the application under test that can be described. These tree-structured small scripts can be combined to form scripts that can be used for specific test cases.

         Of the five frameworks, the modular framework is the easiest to grasp and use. Building an abstraction layer on top of a component to hide it from the rest of the application is a well-known programming technique. This isolates the application from modifications in the components, providing the modular nature of the program design. Modular test scripting frameworks use this principle of abstraction or encapsulation to improve the maintainability and upgradeability of automated test suites.

2. Test library framework

 The Test Library Architecture is very similar to the Modular Test Script Framework and has the same advantages. The difference is that the test library framework decomposes the application under test into procedures and functions instead of scripts. This framework requires the creation of library files describing the modules, fragments, and functionality of the application under test.

3. Keyword-driven or table-driven testing framework

For an application-independent automation framework, keyword-driven (KEYWORD DRIVEN) test and table-driven (TABLE DRIVEN) test are interchangeable terms. This framework requires data tables and keywords to be developed. These data tables and keywords are independent of the test automation tools that execute them, and can be used to "drive" the test script code of the application and data under test. The key-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of the application under test is written to a table along with the execution steps of each test.

This test framework can generate a large number of test cases with very little code. The same code is reused while using the data table to generate each test case.

4. Data Driven Testing Framework

Data-driven (DATA DRIVEN), LJ test is a framework. The input and output data tested here are read from data files (data pool, ODBC source, CSV file, EXCEL file, ADO object, etc.) and loaded into variables by capture tool generated or manually generated code scripts. In this framework, variables are used not only to store input values ​​but also to store output validation values. Throughout the program, the test script reads the value file and records the test status and information. This is similar to table-driven testing, where test cases are contained in data files rather than scripts, and the script is merely a "driver", or delivery mechanism, for the data. However, data-driven testing differs from table-driven testing, even though the navigation data is not contained within the table structure. In data-driven testing, the data files contain only test data.

This framework intends to reduce the total number of test scripts required to execute all test cases. Data-driven requires very little code to generate a large number of test cases, which is very similar to table-driven.

    5. Hybrid Test Automation Framework

    The most common implementation framework is a combination of all the techniques described above, taking its strengths and making up for its shortcomings. This hybrid testing framework is an evolution of most of the frameworks over time and through several projects

[A full 200 episodes] Ultra-detailed advanced tutorials on automated testing of Python interfaces, truly simulating the actual combat of enterprise projects! !

Guess you like

Origin blog.csdn.net/xiao1542/article/details/132049627