Article Directory
- 1. Setup and TearDown thread group:
-
- 1.1. Differences from ordinary thread groups:
- 1.2, the thread group attribute configuration details are completely consistent
- 1.3. Use strategy suggestions:
- 1.4. Add front and rear thread groups in the test plan:
- 1.5. Connect to Mysql
- 1.6. Adjust the structure:
- 1.7. How to obtain the result of executing the Sql statement:
1. Setup and TearDown thread group:
Remarks: Data preparation, use Setup before data preparation, and put data cleaning in TearDown
1.1. Differences from ordinary thread groups:
Setup thread group: triggers before normal thread group execution
teardown thread group: triggers after normal thread group execution
1.2, the thread group attribute configuration details are completely consistent
1.3. Use strategy suggestions:
Setup thread group - pressure test execution preparation stage, prepare test data, set parameters
teardown thread group - clean up data after pressure test execution, and reset the environment to zero
1.4. Add front and rear thread groups in the test plan:
In the test plan -> right click to add thread -> select (setup, teardown thread group)
1.5. Connect to Mysql
1.5.1, JDBC connection configuration:
Add JDBC link configurator, link Mysql
and fill in mysql link information: (fill in database name, MYSQL address information, account number/password)
1.5.2, JDBC request configuration:
Add JDBC request:
database operation-insert operation:
database name: should be consistent with the database name in the JDBC-database configuration connection
database: add/delete/modify operation-use statement type (Update Statement)
database operation-query operation:
database Name: It should be consistent with the database name in the JDBC-database configuration connection
Database: Query operation - use statement type (Select Statement)
1.6. Adjust the structure:
Priority: SetUp > Thread Group > TearDown
In the same thread group: execute in the order before and after placement
In different thread groups: execute in order of priority
1.7. How to obtain the result of executing the Sql statement:
When the next interface wants to use the query results, only need: ${application_id}: