- Created by SS Doc Editor on Sep 09, 2021
StresStimulus uses extractors to take the dynamic values from test run server responses, and re-insert them into subsequent requests using parameters. An Extractor is a variable that derives the dynamic values from the server response. It is also a rule of retrieving a value by parsing a response.
Extractors support various response encoding, including:
- Text-based formats, such as HTML forms, XML, JSON,
- Binary formats, such as WCF or AMF
The process of creating an extractor includes the following steps:
1. Determine a dynamic value that should be extracted from a particular response. This value will be used to form a parameter that will replace the recorded value in one of the subsequent requests.
2. Determine a rule that extracts the value of the response.
3. Depending on the rule, select a type of extractor to use. The five types of supported extractors are provided in the table below. Some of them are available only for specific types of responses.
Extractor Type | Description | Restrictions |
---|---|---|
Text Delimited | Extracts a value that occurs in the response between two specified strings: Starting string (Text before) and ending strings (Text after). | |
Regular Expression | Extracts a value that is found in the response using a regular expression search. | |
Header | Extracts the value of a specific response header. | |
Form Field | Extracts the value of a specific web form field. | Available only in web forms |
XPath Query | Extracts a value that is found in an XML response body by an XPath query. This includes WCF binary responses. | Available only in XML responses |
JPath Query | Extracts a value that is found in a JSON response body by a JPath query. | Available only in JSON responses |
4. Test that the Extractor returns the expected value from the recorded response.
5. Make sure that this rule is generic enough and works on other instances of the same response generated by a different virtual user on a different iteration.
6. Give the Extractor a meaningful name and save it.
How to create an Extractor
Text Delimited Extractor
Regular Expression Extractor
Header, Form Field and XPath Extractor
Emulating Clicks on Random Links
Emulating Clicks on Multiple Links
Extractor Tree
Disabling and Hiding Extractors
Extractors in loops
Dynamic Extractors
Passing extractors to other test cases
Critical extractors
- No labels