https://bz.apache.org/bugzilla/show_bug.cgi?id=64592
Bug ID: 64592
Summary: Can get Response Assertion Result from JSR223
PostProcessor
Product: JMeter
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: JMETER_5.3.1
I have many HTTPRequest samplers, which all have Response Assertions. I created
a custom JSR223 Logger in order to log requests when they receive HTTP Error
Response Codes. I am trying to get the Response Assertion result, from the
JSSR223 PostProcessor, but I cannot. I know there is a possibility, that I add
a JSR223PostProcessor to EVERY HTTPSampler and manually set the request to
failed, if the Response Assertion failed. I understand this is a possible
solution, but I keep wondering why I get an empty list, every time I call
getAssertionResults() for requests whose Response Assertion failed (I do this
using prev.getAssertionResults()). I have also used ctx but I get the same
results.
The only way in which I was able to get the assertion results, was using
JMeterHTTP.last_sample_ok , but I am in the context of the current sample,
meaning that when I do the check for this, the result is for the previous
sample which I can not access anymore.
I need assistance in order to be able to get the correct status of Response
Assertion for the current sample, from a JSR223 Post Processor. I would like to
do this, by only having an HTTPRequest Sampler, and a Response Assertion. I do
not want to add a JSR223 Post Processor for every request wich has a Response
Assertion, and set the result manually. I believe If I add a response
assertion, as this fails, the state of the HTTPSampler should not be
successfull.
I am geting that isSuccessful()=true , getAssertionResults() = [] .
Thank you so much.
--
You are receiving this mail because:
You are the assignee for the bug.