LoadComplete runs load tests using traffic it recorded during the scenario recording. This topic describes how you edit requests that LoadComplete captures during the recording.
Why Editing Recorded Requests
Running recorded traffic as is may lead to errors or incomplete coverage of tested functionality.
A typical case that requires editing traffic is testing of web applications that use session IDs. Session ID is dynamically generated by the server and changes every time a user runs the application, that is, it changes from session to session. As the server generates different session IDs for different user sessions, playing back a load test using the recorded session IDs will fail. To avoid playback errors, you can edit your load test to handle dynamic parameters.
Another example is testing of e-commerce applications. If your test uses only recorded data, all simulated virtual users will “buy” the same amount of the same goods and “use” the same credit card to pay. In real life, users will use individual credentials and buy various products. As a result, the tests may cover only a part of the needed functionality (for instance, they will cover only code that processes a specific payment type). To test your application thoroughly, you need to modify the simulated traffic, that is, modifying request data will make your tests closer to real-life conditions.
What Data You Can Edit in Requests
Body contents and form data of POST requests
Contents of WebSocket messages
Request header fields
Hidden fields (like ASP.NET ViewState)
Changing Requests in the Scenario Editor
On the Request page, you can edit the request’s initial line, header fields and content. To do it, select the needed header and type the value in the Value column.
On the Response page, you can edit the response data the same way you edit requests.
On the WebSocket Message page, you can edit
Opcode and the content of WebSocket messages.
You cannot change the
Content-Lengthheader field’s value. It is calculated automatically depending on the request or response size.
You cannot change fields of WebSocket messages.
You cannot change the
Masking-Keyfields of WebSocket messages.
LoadComplete will use the modified data during the test run.
Handling Dynamic Parameters
Extract dynamic parameter values from server responses and insert them into subsequent requests.
LoadComplete can correlate dynamic parameters automatically. That is, during the traffic recording, it detects dynamic parameters, extracts them form server responses, and inserts them in further requests automatically.
See Data Correlation.
Insert needed values you get from external files or values that LoadComplete generates into requests.