You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ZK <st...@gmail.com> on 2015/04/21 13:50:26 UTC
Re: Fail a sampler through beanshell Postprocessor
Hi,
using a 'beanshell assertion'
try:
Failure=true;
FailureMessage= "Test FAILED";
print(FailureMessage);
ZK
--
View this message in context: http://jmeter.512774.n5.nabble.com/Fail-a-sampler-through-beanshell-Postprocessor-tp5722290p5722292.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
RE: Fail a sampler through beanshell Postprocessor
Posted by Erez Naim <er...@theneura.com>.
ZK ,
It will mark the sampler as red?
I have tried another solution that works just perfect:
Using beanshell: prev.setResponseCode("400") (or using any other error code
which will fail the sampler) that would mark the sampler as red.
Br,
Erez
-----Original Message-----
From: ZK [mailto:stevesenior69@gmail.com]
Sent: Tuesday, April 21, 2015 2:50 PM
To: jmeter-user@jakarta.apache.org
Subject: Re: Fail a sampler through beanshell Postprocessor
Hi,
using a 'beanshell assertion'
try:
Failure=true;
FailureMessage= "Test FAILED";
print(FailureMessage);
ZK
--
View this message in context:
http://jmeter.512774.n5.nabble.com/Fail-a-sampler-through-beanshell-Postproc
essor-tp5722290p5722292.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org