Testng+ats+eclipse

Source: Internet
Author: User
Tags writing test scripts testng

Environment preparation

1.JDK version and Jar package Confirmation, no special requirements after JDK installation

2. Database confirmation (usually using dev), Environment Profile Ats-config.properties, database information file devdb.conf

3. In the trunk stream test, you need to see whether the base class has local test restrictions, there is a limit to release

1.session initialization

1.RPC interface When writing test scripts, often need to initialize session information, how to initialize, you can view the application session implementation class, other interfaces do not need to initialize the session

2. Data preparation

Note: The data preparation phase is divided into direct entry and mock data that requires a mock when using an external system

Direct entry

1. List,csv data is separated by &

2. Map,csv data is separated by &

3. The entry parameter is an enumeration class

4. Entry as Real time Unix timestamp

5. The entry is byte[], and is initialized to a No. 0 digit of 1

Mock data

1. Need to use External system data, can choose to use the database of existing data, database without data need to mock external system data

2. Need to use External system, only mock the return result of external system

3. Data verification

1.add Method--validating DB data and CSV data

2.del Method--database Del_flag taken from ID

3.query method --Interface Returns the list result

4.update Method-Effective time check

5.RPC interface--Verification request result message

JSON checksum file refer to the business Request results log on the server

6. Exception scenario-only error logs can be verified

4. Throwing Exceptions

1. Throw Exceptions only

2. Throw an exception and verify the log information

5. Clear the data

Note: Data can be purged when new data is available

Testng+ats+eclipse

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.