Some specific practices for software test automation

xiaoxiao2021-03-06  76

Because the software test has a large workload (40% to 60% of the total development time), it is very suitable for automation. Therefore, the testing improvement will have very significant results of the quality, cost and cycle of the entire development. Effect.

First, talk about the design problem of test cases with graphical interfaces in the case of testing automation. Because the output display of the graphical interface is not easy to do to test the test results automation, the general practice is to establish a test case with the portion output from the graphical interface to manually run. All non-graphics outputs can be automated.

Here are some examples of test automation:

1. The generation of test case (TEST CASE, or test case)

Write short programs to generate a large number of test inputs (including input data and operation instructions) with programming language or more convenient script languages ​​(Script Language, such as Perl, etc.). Or also generate standard output at a certain logic law. The input and output file name is paired in accordance with the specified, so that the procedure for automated testing and results is easy to operate.

Here is a naming problem for test cases. If you make a unified planning in the project's documentation, the demand and function of software products should be a naming basis for the middle product of the subsequent development process. In this way, it will bring great convenience to document management and configuration management, making the development process of the entire product more organized and more logical. Any novice will also be easier to enter the development of the development work.

2. Execution write control

Unit testing or integrated tests may run multiple stand-alone. But for system testing or regression testing, it is possible to run multiple sets of machines to run simultaneously on the network. Remember such a principle, at any time during the development process, if you need to wait for the results of the test, it is a chance to shorten the development time.

For a single test run, the chance to dig the potential in the test and the comparison and display of starting operations and results. Sometimes, you need to repeatedly modify the program, re-assemble and retest. In this way, each looped manual setting is very considerable to the time spent on the instruction. If you can help with Make or similar software tools, you can save a lot of time.

For system testing or regression testing such a situation involving a large number of test cases, the opportunity to dig the dive is except for the use of software tools to achieve automation, how to make full use of all hardware resources. Often, even in the daytime work time, the load of each computer is not fully utilized. It is possible to save a large number of test cases to each machine and save a lot of time. In addition, the large number of system tests and regression tests are arranged to run at night and weekend, which can improve efficiency.

If you don't buy a commercial tool, you should comply with regular software development requirements to develop a good software test automation tool. In practice, many automation tools developed by the company are constructed using some ready-made software tools to add their own procedures. These tools that have been developed are all tailored for the company, so it is very good. At the same time, improvements can be improved as needed without being subject to people. Of course, this requires a certain amount of human investment.

When designing software automatic test tools, path control is a very important feature. The ideal use is: This tool can be run on any path location, can go to any path location to get the test case, and can also put the results of the test to any path position. Such a design allows you to operate different tests without interference with each other, or you can flexibly use the space of your hard drive, and make the backup save work is easy to control.

At the same time, software automatic test tools must be able to easily select all or part of the test case library to run, and must also be able to freely select the test-tested product or intermediate product as a test object.

3. Comparison of test results and standard output

When designing the test case, you must take into account how to easily output the test results and standard output. The amount of output data and the data format have a direct impact on the speed of comparison. On the other hand, it is also necessary to take into account the logical correspondence and readability of the test target of the output data and test cases, which will greatly facilitate the analysis of the discovery of the analysis test, which is also conducive to the maintenance of test cases.

Many times, you have to write some special software to perform a comparison of test results and standard output, because some output content may not be directly contrast (for example, records for running date time, record of running path, And the version data of the test object, etc.), you have to use the program.

4. Analysis, Classification, Record, and Bullets of Test Results

What is mentioned above is used to compare special software for test results and standard outputs, often as a task of analyzing, classifying, recording, and notification at the same time.

"Analysis" is the possibility of finding a place where it is not anastomotive and pointed out. "Classification" includes a variety of statistical subsections, such as the location of the corresponding source program, the severity level of the error (prompt, warning, non-invalidation error, invalidation error; or other classification method), new discoveries still There is a recorded error, and so on. "Record" is filed by classification. "Notification" is an error message that actively on the "person in charge" of the test case.

Here is the concept of the "person in charge" of the test case. It is used to specify the defects found when the test case is run, which developers are responsible for analyzing (sometimes the error caused by defects introduced by additional developers) and repair. When setting up a test case library, the various examples should have a designated person.

The most direct notification method is to send an email from the automatic test software to the test operator and test case. The details of the email content can be flexible as needed.

5. Statistics of the total test status, the generation of reports

These are the functions that the automatic test tools should have. The aim is to improve the quality of process management while saving time for generating statistics.

Statistical reports produced, it is best to store it to a conventional path location so that any personnel know how to check. At the same time, the statistical report can be sent to the appropriate object (such as project manager, test manager and quality assurance manager) as needed.

6. Automated Test and Development of Product Daily Build (Build)

Automatic testing should be an organic part during the development process. Automatic testing To rely on configuration management to provide a well-running environment, it must be closely fitted to the build of software in the development.

When the product in the development reaches a certain extent, you should start a daily construction and test. This approach can make the software development status to frequent updates, as well as the defects of design and integration early.

In order to make full use of time and equipment resources, automatic software construction after get off work, followed by automatic test (there are many system tests or regression tests), which is a very effective way. If the arrangement is good, when you go to work next day, the test results have been in each person's email address, waiting for the new day development.

转载请注明原文地址:https://www.9cbs.com/read-108258.html

New Post(0)