Why build an automated test framework? _ Automated Test Framework

Source: Internet
Author: User
Tags error handling writing test scripts
As with general software projects, the development of automated test frameworks is determined by automated test requirements, which include:
First, automated testing more easily implemented
Ii. handling problems with the automated test script itself, such as exception handling and scenario recovery
To make up for the shortcomings of the test script itself or the special test requirements
Iv. testing is easy to maintain
The automated testing process consists of three elements: input, output, comparison of expected results with actual results.
The input includes test data and test step two parts. The test data can be written directly in the script along with the test steps, or it can be passed to the test in the form of a configuration file or parameter, independent of the Code. The test step is the body of the test script, which relies on the behavior of the software. The randomness of software input makes the software behavior difficult to determine, which greatly increases the difficulty of writing test scripts. Problems such as defects in the software itself or system response times can cause test script execution to fail. We can't take into account all the exceptions in the execution of the script, which can cause the instability of the test script execution, so we need to do exception handling for the test script itself.
Output, and comparing it with the expected result is another focus of automated word testing; The process is biased towards computation and comparison, and requires a higher coding capability than the dependence of input on software. In a test project, the acquisition of test results is often not as easy as manual testing, and validation rules are complex, and sometimes a checkpoint requires dozens of or even hundreds of of lines of code to complete. In automated testing, many functional functions are common, and for the same project, it is often necessary to do the same thing over and over again. In this way, the design of some common functions for the entire script development and maintenance work is helpful, not only can greatly reduce the coding volume, but also improve the correctness and maintainability of the script.
So we can do the following things through the test framework:
First, handle some exceptions and error handling in the script;
Second, realize some common functions, simplify the process of script development;
However, for automated testing, we can't script a script to execute a test, but want to be able to deploy the test freely, such as we choose to execute the use case, the automated test framework can execute the appropriate use cases and give the test results.
Based on this, we hope that the test framework will help us achieve:
Third, according to the demand-driven test implementation;
Finally, Test scene recovery;
The output of test results.
Of course, our needs may be more than that, and we need to test the framework for more things for us.

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.