JMeter interface test automation for Web interface Testing (iii) (data-driven testing)

Source: Internet
Author: User

interface Testing and Data driven 1 Introduction

Data-driven testing is the process of separating test logic from test data, saving test data in the form of Excel tables, and reading and executing tests using test scripts.

2 data-driven and JMeter interface testing

We have briefly introduced the interface test parameter input and test execution process, because a large number of test scripts and test data together, so that our test script portability and maintainability has become very bad, so we then took the CSV format table to save the test data to drive the test way.

2.1 Create a new CSV file

Create a new TXT document file, rename the file, and modify the file suffix named csv, such as Test.csv, as

2.2 Open a new CSV file with an Excel table and design the test case

2.3 Designing test scripts to read test case data in CSV

2.3. New loop controller under 1 thread group, cycle times set to Forever


new CSV Data Set config control under 2.3.2 Loop controller

2.3.3 Add if controller, to do filter execution of use case priority


2.3.4 Select request mode based on call method

Configure HTTP requests by using the IF selector to differentiate requests for get and post methods

How the POST request is configured: The POST request parameter is placed in body data

How get requests are configured: Get request parameters after configuration URL


2.3.5 Configuring response Assertions

2.3.6 performing tests, viewing results

View the test results details by viewing the results tree control, green for the pass

JMeter interface test automation for Web interface Testing (iii) (data-driven 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.