https://bz.apache.org/bugzilla/show_bug.cgi?id=63640
Bug ID: 63640
Summary: Auto-Correlation as core functionality in JMeter
Product: JMeter
Version: 5.2
Hardware: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: HTTP
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: JMETER_5.2
Created attachment 36704
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36704&action=edit
Use cases of Auto Correlation
Purpose:
If a JMeter script has API parameters that require correlation, then the User
needs to manually correlate them using JMeter Post-Processors. This becomes a
hassle when the test scenarios are very large.
Manual procedure of Correlation has following steps:
-Identify API parameters that require Correlation.
-Create "Regular Expression Extractor" by analysing API response.
-Modify the script by setting "Regular Expression Extractor" names wherever
correlated parameters are used.
Manual Auto-Correlation leads to following problem:
-Increased complexity.
-Time-consuming.
-Error-prone.
Solution:
Record same senario 2 times.
Comparing these 2 scripts, it can be seen that a value with a difference
variable may be a correlation variable.
Automate the following steps which are involved in the correlation process.
-Identify the parameters which are candidates for correlation by comparing 2
scripts.
-Create "Regular Expression Extractor" by analysing API response.
-Add "Regular Expression Extractor" into the script.
Solution Design:
Abbreviations:
-JMX–X: Test Plan Xth recording.
-JTL–Y: Recording log of Yth recording.
-Test-Engineer: Person who records the test plan.
-Test-Designer: Person who can perform manual Correlation in JMeter.
Use-Case:
There are two use cases being considered:
1. The Test Designer records the test plan and performs the Correlation
himself. In this use case the test plan is kept in JMeter memory along with
recording's logs.
2. The Test-Engineer records the test plan and Test-Designer performs the
Correlation. In this use case Test-Engineer saves test plans and its recordings
and shares them to the Test-Designer for selecting the appropriate parameters
which are required to be correlated.
Procedure
* Refer attached screen images.
Step 1: Import scripts and recording logs.
Use case 1
1a. Record Test Plan and save it.
1b. Record Test Plan again and keep JMeter open.
1c. Right Click on Test Plan and click CoRelation.
1d. Import JMX-1.
Use case 2
1a. Record Test Plan and save it.
1b. Record Test Plan again & save its script and recording log.
1c. Click on Edit and click CoRelation.
1d. Import JMX-1, JMX-2 and JTL-2 and click CoRelation.
Step 2: Parameter Selection
List of parameters which can be correlated is displayed.
Select the parameters you want to correlate and Click OK.
Output
"Regular Expression Extractor" for the selected parameters have been created
successfully and added to the script. The script is successfully correlated and
can be used for load testing now.
Please refer to attached file for more details.
And we already prepare the prototype to confirm of our approach for Use case 1.
If community interest it, our company will submit PR of this.
--
You are receiving this mail because:
You are the assignee for the bug.