Ruby + watir Automated Testing

Source: Internet
Author: User

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.

 

Related Article

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.