Reprint: HTTP://WWW.CNBLOGS.COM/CHENGTCH/P/6576117.HTML1 profile
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
Web interface Test JMeter Interface Test Automation (iii) (data-driven test) interface testing and data-driven