Discussion on building automated testing for Software Testing

Source: Internet
Author: User

Large companies generally have a large framework for automated testing. Generally, the rules and regulations of large companies are comprehensive. You only need to follow the rules and regulations. The same is true for the automated testing framework. Generally, testers only need to write automated testing scripts in the existing framework.

This saves time and energy, facilitates reuse, and reduces the requirements for testers. If the framework design is poor, the flexibility may be poor.

What does the automated testing framework contain?

Main ProgramFirst, you must have a master program. The execution of a script from the beginning to the end of the report generation is inseparable from the master program. It is like a main function in C. The idea of object-oriented can be used to design the main program.

Test DataWhat data does it include? Generally, the test script corresponds to the test case, and a test case corresponds to a test script. The total set of these test cases is a data, which can be put into one or more files. If there are few test cases, one file will be OK. If there are many functional modules in the test cases, you can place the use cases in different functional modules in different files. In addition, some test data used in the test case can be abstracted into variables in the test script. Data-driven automation requires that data and test scripts be separated as much as possible.

Library functionsAbstract The common operations in the test, write them into some functions, and put them in a library. You can directly call the test script without writing it yourself. This can reduce the script maintenance cost. Similarly, function a and function B write a function from their respective perspectives. Later, Function C needs to use this function, so he may not know which function to use.

Record logsTest script execution is not always successful. Even if it is successful, it is best to record the log for subsequent analysis and tracking of the test execution. The specific items to be recorded are closely related to the objects to be tested. This should be studied, analyzed to be tested, and determined after being tested. It is better to classify logs. After all, logging consumes resources. Printing too many logs will also affect the normal functions of the tested objects.

Generate Test reportAfter the manual test is completed, you need to write a test record to record the test execution status (for example, the successes, failures, and causes of failures. After the automated test is executed, a test record is generated automatically. What is the format of the test record? Word? Excel? TXT? What is recorded? This depends on the requirements of the test Manager or project manager. Generally, it is better to generate a table that can be opened in Excel to facilitate statistical analysis.

General ProcessStart the main program to read test cases and test data. Start the test execution, record the test log, and generate the test report after the test is executed.

Discussion on building automated testing for Software Testing

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.