I am new to jmeter ; I hope that I will tell you well enough about my problem.
I am trying to use regex to retrieve the ItemID attribute from an xml element. Which I then use in another request. This is the XML response I'm trying to extract from ItemID:
<?xml version="1.0" encoding="UTF-8"?> <Promise > <SuggestedOption> <Option TotalShipments="1"> <PromiseLines TotalNumberOfRecords="1"> <PromiseLine ItemID="Col_001" > <Assignments> <Assignment InteractionNo="1" > </Assignment> </Assignments> </PromiseLine> </PromiseLines> </Option> </SuggestedOption> </Promise>
I have a regex extent configured as follows:
Reference Name: item Regular Expression: .?ItemID=(.+?)* Template: $1$ Match No.: 1
In the second query, I set ItemID as follows: ItemID = $ {item} ...
I know that when I use the default value set to "Col_001", it works fine. Thus, it is obvious that the problem is with my expression.
source share