The idea of automated testing framework

1, so-called modularization is that several different test points in one test and a test step of splitting a single point of the package, a module is formed.

For example: a test case to test the login procedure, including: Enter the user name, password, and identification and registration;

Then you can input a user name, password, identification and registration, four cancel the login operation are encapsulated in four different modules. When testing, you can simply call that module. In this case, when a module changes, you only need to maintain a separate module that can be can be a different test cases based on different combinations of modules.

2, the so-called test library idea is to sublimate modular thinking, which is to create a test application library files (can be APIs, DLLs, etc.), these libraries is a collection of functions. Its modular thinking different is that it expands the interface to the idea that you can go to pass parameters through the interface, rather than a sealed module can be said to be a more of a "door" of interactive modules.

For example: or above the test case, just enter a user name, password, identification and registration, cancel the login packaged into a library that contains a function Login, the Login function accepts two parameters "user name, password", input different user names and passwords can be different test cases. Another function may be Cancle.

3, the so-called data-driven ideas , different opinions, many people feel alone EXCLE different data table read only a high level of parameterization, in fact, how to understand it does not matter, the key is that good ideas can be applied to your framework. And my understanding is that variables constant, data-driven results, different data led to produce different results. For imported data may be in many ways, for example: EXCLE table, the XML (for use in the WEB), the database (DB), CSV file, TXT and so can.

4, the so-called keyword ideas , this idea, I have been thinking that the difference between object-oriented relationship, interaction with modularization. Later personal understanding, in fact, is a kind of keyword-driven object-oriented thinking, for example: QTP, RFT, the object can be a data or a keyword, crawl to the object, it can be packaged as a key test object ( That element may be packaged into a gui keywords), so that the various operations may be critical to its objects, the different objects can drive the flow of the different test results.

Simple manner EXCEL application can use a table, which includes "object type" "Object Name" "Name Object Operation" "determining details" "expected results." In this case, by introducing different object types and names, the different objects would be operative to construct a table of test cases.

 

Published 16 original articles · won praise 7 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_40264260/article/details/104892129