Header extractors (a) return a response header's value. To define the Header Extractor, select the header name from the Header (a) drop-down.
For instructions on how to set other Header extractor properties, see the section Text Delimited Extractors.
If a response is a web form, then you can use Form Field (b) extractors. They return a web form field value, for example, a value of any HTML textbox or hidden field. To define a Form Field Extractor, select the field name from the Form Field (c) drop-down.
If a response is XML, then you can use an XPath Extractor. The difference between XPath extractors and text delimited extractors is that you need to define an XPath query instead of delimiters.
The XPath tutorial can be found at this location.
If a response is JSON, then you can use a JPath Extractor (d). The difference between JPath extractors and text delimited extractors is that instead of delimiters, you need to define a JPath query (e). You can also use the JPath creator feature by selecting the value you want to extract and clicking the Create JPath button (f) or by right-clicking and selecting Create JPath Query (g) in the context menu. StresStimulus will automatically create a JPath extractor that will extract the selected value.
The JPath description can be found at this location.
Multiple occurrence queries
If an XPath of JPath query returns more than one value, the Occurrence property must be set appropriately. By default, the first return value will be used for the extractor. To use the second matching value, the Occurrence property should be changed from 1 to 2. To do so:
- Click Verify Extractor on the toolbar and compare the Extractor Check window's value with the expected value.
- If an incorrect value is displayed, find the matching value's correct occurrence by clicking Next/Previous Occurrence until you find the correct value.
- Click Set The Occurrence to properly adjust the Occurrence property.
- If the occurrence should be determined during the test (random), then set the Occurrence Type property to Random and set the Min Occurrence and Max Occurrence properties to the desired range. For more on the random occurrence, see here.
- No labels