Recently, I finally took some time to study ha automated testing. Some time ago, I initially determined the design direction of automated testing and started to use Ruby as the script language and watir as the design tool, conducts automated testing and Exploration Design. due to the weak trend, the individual's technical capabilities are limited, and the results of research are also relatively superficial, but there are still gains.
This time, I first made a major exploration of the basic optimization functions of the script. After some ups and downs, a simple demo was born. let's first talk about the implementation of this demo:
1. A simple login System is designed using Java.
2. Design login Test Cases
3. Complete the test script through the test case
4. Optimize test scripts, such as parameterized data, and add logical judgment
5. Output Test report
6. Print logs
The above is the main content of this demo. In order to better understand the so-called framework class, I have further improved it. The specific content starts from the framework.
First, learn about the operating mechanism of automated testing from the following framework structure:
The Autotest structure is as follows:
Autotest
|-Testcase // a list of test cases used for batch Storage
|-Testdata // used to store batch test data, which corresponds to each test case
|-Testscript // used to store the test scripts corresponding to each test case
|-Testlib // used to store custom public class libraries
|-Testreport // The test report is used to store the test output.
|-Testlog // stores the running logs generated after the test script is executed.
| -Readme.txt // instructions
Autotestdemo manages the automated test process in a unified manner and strictly defines each module.