Store Target and Post-Processing
You
The use the Store tab in the scenarioScenario editorEditor allows you to define extractors that can "listen"listen for a particularspecific Step and Request and extract data offrom its response.
When creating a Store entry or an Assert entry in the Scenario Editor, you need tomust configure the Target dependingaccording onto the type and format of the response.
Also,You youcan might require toalso apply some post-processing to the response.extracted Invalue. thisPost-processing document,allows you willto findtransform, encode, decode, or otherwise manipulate the value before it is stored or used by the scenario.
This document provides examples of the possible values that can be used for the Target and thePost-processing fields.
Post-Processing
Post-processing inputs.functions operate on the value extracted by the Target.
PostProcessingThe value() function represents the value extracted by the configured Target.
Here is a list of examples of all the possible functions that can be used for post-processing entry.
value() returns the extracted value.Examples:
substring(value(), 0, 2)
URLEncode(value()) — URL-encodes the extracted value.URLDecode(value()) substring(URLEncode(— URL-decodes the extracted value.
append(value(), 2)
URLEncode(value())
URLDecode(value())
append(value(),"-abc123")
length(value())
URLParam(value(), 'id')
Target
The Target field supports different syntaxes depending on the type of response being processed.
InThe the same way, the TARGET can have aTarget hint text thatin shouldthe beScenario dynamicEditor can change dynamically according to the selected Target.target type.
The // characters indicate a comment and are not part of the target,Target withsyntax, theexcept exceptionfor HTML Targets, where // is part of the HTMLXPath target that is an XPath.expression.
DEFAULT
Default Targets
The following Targets can be used with any supported response:
duration
duration.duration //— returns the requestdurationresponseCode— returns the HTTP response status code.sizeresponseCode //— returns the responsestatus code
size // returns de size in bytesbytes.
md5 — returns the MD5 checksum of the HTTP Targets
For example, given the following response:
data=45, data=68
md5You //can use:
raw/data[0]— returnschecksumdata=45.raw/data[1]md4— returnsdata=68.#data— returns45.Header:Accept— returns the value of theresponseAcceptheader.CookieValue:CSRF-TOKEN
HTTP Targets
Given the response is the following string: "data=45, data=68" then
raw/data[0] //— returns 'data=45' and "raw/data[1]" returns 'data=68'
#data // returns 45
Header:Accept // returns dethe value of the header Accept
CookieValue:CSRF-TOKEN // returns de value of the cookie CSRF-TOKEN
HTML Targets
Use normalstandard XPathsXPath expressions to extract values from HTML.HTML Noteresponses.
For inHTML this caseTargets, the double slash// at the beginning is needed inof the target.Target is part of the XPath and is required.
Example:
//input[@name='__RequestVerificationToken']/@value
This Target returns the value of the value attribute of the matching input element.
JSON Targets
Use JSON paths to extract values from JSON responses, likeresponses.
For example, given a JSON response containing an employees array:
employees[0].address.city
[2].carousel.images[1].path
path value of the second image in the carousel of the third element.PDF Targets
The following Targets can be used to extract information from PDF responses:
document- —
form text.document // getsreturns all text indocumenttheexceptdocument,formsexcludingtext
page[2] //— returns alall text infrom page 22, exceptexcluding formsform text
documentforms — documentforms // getsreturns a jsonJSON with contentsrepresentation of the forms contained in the document
regex:Once upon a .* ever after. //— returns the text that matchesmatching the specified regular expressionexpression, if found.
STRING
String Targets
String Targets can be used to extract a portion of a response based on delimiters or positions.
GivenFor example, given the following response:
The tested process returned: ID=ABCDEF.
Examples:
11,20— returnsprocessed.ID=,false— returnsABCDEF.ID=,true— returnsID=ABCDEF.ID=,38,false— returns the portion of the responseisaccording to thefollowingspecifiedstring:delimiter"Theandtestedposition.ID=38,trueprocessed returned: ID=ABCDEF." then11,20" //— returns"processed"the portion of the response according to the specified position and inclusion option.
Note: The exact behavior of positional String Targets depends on the Target syntax supported by the current AIQ version.
Text
TargetsID=,falseFor //text returnsresponses, "ABCDEF."
ID=,true // returns "ID=ABCDEF."
ID=,38,false // returns "ABCDE"
ID=38,true // returns "ID=ABCDE"
TEXT Targets
The target should be specifiedTarget as a regular expression,expression.
Examples:
(?<=\\"__RequestVerificationToken\\" type=\\"hidden\\" value=\\")[a-zA-Z0-9\\-_]+
id=.*
The Target returns the text matching the specified regular expression.
CSV Targets
GivenCSV thatTargets allow you haveto aextract responsevalues from responses formatted as aCSV.
For withexample, given the following dataCSV data:
id | name | state |
|---|---|---|
1 | john | California |
2 | barry | Nevada |
3 | stef | Texas |
4 | karla | New York |
Then:Examples:
2,2 //— returns barry
last(),"name" //— returns karla
,"name" //— returns a stringan array {"name"containing name,"john" john,"barry" barry,"stef" stef,"karla"}
karla.3,last() //— returns Texas
id=3,2 2 //— returns stef
Note: Make sure the indexing behavior used by CSV Targets matches the indexing convention of your AIQ version.
Last updated: FebruaryAugust 22,12 20232026
If you have any feedback onabout this topic, please contact us at documentation@appvance.ai.