tags:

views:

67

answers:

1

Is it possible to get the Jmeter object(ex: Xpath assertion) and disable it.

What I'm trying to achieve is when I update something, if the update request fails I want to disable the assertion.

+1  A: 

I've been looking for something like this too, but more for "if request A fails, then goto request C", rather then disabling an assertion.

Once the script begins executing, the only items that change within the script are variables and jmeter properties. I'm not aware of a property that is defined for "enable request", but you may be able to create one.

property">http://jakarta.apache.org/jmeter/usermanual/functions.html#_property http://jakarta.apache.org/jmeter/usermanual/functions.html#__setProperty?

Just curious - why would you want to disable the assertion on a failed request? Generally it's the assertion that determines if a request fails or not (provided you receive a valid HTTP response code), so I'm wondering how you have your script set up.

BlackGaff
@BlackGaff you say that `variables and jmeter properties` can be changed, what is xpath assertion, is it object, jmeter property or variable? If I could get this xpath assertion by name or somehow as a child of certain get then I could set its property enabled to false
c0mrade
I *believe* the xpath assertion results are stored as a jmeter property with the value of true/false. This is how regular assertions are stored. Add a debug sampler into your test plan, ensure "jmeter variables" are on, and look for the xpath result.
BlackGaff