You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by GautamPr <ga...@gmail.com> on 2010/05/13 13:37:59 UTC

Is their any way to display the User defined messages in Jmeter?

Hi,
I am new to Jmeter. Plz help me out.
I want to display user defined msgs  in jmeter say after passing or failure
of the test. Is it possible? if yes, how??
-- 
View this message in context: http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28546431.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Is their any way to display the User defined messages in Jmeter?

Posted by Deepak Shetty <sh...@gmail.com>.
By default only HTTP Errors are flagged as errors. So if your applications
returns a 200 code (with a human readable error message) then JMeter will
treat it as success. 4xx and 5xx status code will be flagged as errors.
So if you want to check for application errors you must use assertions - the
most common one being response assertion. So for e.g. after login if you
have a message stating "Login Successful" then you can add an assertion
stating that "Login Successful" text must be present or perhaps you show an
error message saying "login unsuccessful" then you can add an assertion
station that Login unsuccessful must not be present- depending on how your
application behaves you must add the appropriate assertion

regards
deepak



On Thu, May 13, 2010 at 11:44 PM, GautamPr <ga...@gmail.com>wrote:

>
> thanks  for the reply.......
> One more doubt:While i am sending wrong user id +Password to my login page
> through Jmeter,then also I am getting status of the request as
> success(Green
> triangle with Tick mark). Please guide me to display the proper
> icon(Failure
> icon /Red triangle). Plz  help me asap.....
>
> GautamPr wrote:
> >
> > Hi,
> > I am new to Jmeter. Plz help me out.
> > I want to display user defined msgs  in jmeter say after passing or
> > failure of the test. Is it possible? if yes, how??
> >
>
> --
> View this message in context:
> http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28555841.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Is their any way to display the User defined messages in Jmeter?

Posted by prasanna bhat <pr...@gmail.com>.
Use any  of the Post Processor  (BSF or RegEx Extractor) to check the
response and then you can set the response as failure based on the
comparison using prev object available in the post processor.

if(condition){
     prev.setResponseCode("Some response code indicating the failure");
     prev.setSuccessfull(false);
}

This will show the reponse as failed in your listener.

Refer the following aritcles for more details:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BSF_PostProcessor
http://jakarta.apache.org/jmeter/api/org/apache/jmeter/samplers/SampleResult.html

Thanks,
Prasanna

On Fri, May 14, 2010 at 12:14 PM, GautamPr <ga...@gmail.com>wrote:

>
> thanks  for the reply.......
> One more doubt:While i am sending wrong user id +Password to my login page
> through Jmeter,then also I am getting status of the request as
> success(Green
> triangle with Tick mark). Please guide me to display the proper
> icon(Failure
> icon /Red triangle). Plz  help me asap.....
>
> GautamPr wrote:
> >
> > Hi,
> > I am new to Jmeter. Plz help me out.
> > I want to display user defined msgs  in jmeter say after passing or
> > failure of the test. Is it possible? if yes, how??
> >
>
> --
> View this message in context:
> http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28555841.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Is their any way to display the User defined messages in Jmeter?

Posted by GautamPr <ga...@gmail.com>.
thanks  for the reply.......
One more doubt:While i am sending wrong user id +Password to my login page
through Jmeter,then also I am getting status of the request as success(Green
triangle with Tick mark). Please guide me to display the proper icon(Failure
icon /Red triangle). Plz  help me asap.....

GautamPr wrote:
> 
> Hi,
> I am new to Jmeter. Plz help me out.
> I want to display user defined msgs  in jmeter say after passing or
> failure of the test. Is it possible? if yes, how??
> 

-- 
View this message in context: http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28555841.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Is their any way to display the User defined messages in Jmeter?

Posted by Deepak Shetty <sh...@gmail.com>.
Depends on where/when you want the message displayed .
If you have a fixed message (depending on success failure), you should
probably do this when you interpret the results (for e.g. in the Stylesheet
if using XML + XSLT).

On Thu, May 13, 2010 at 4:37 AM, GautamPr <ga...@gmail.com>wrote:

>
> Hi,
> I am new to Jmeter. Plz help me out.
> I want to display user defined msgs  in jmeter say after passing or failure
> of the test. Is it possible? if yes, how??
> --
> View this message in context:
> http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28546431.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Is their any way to display the User defined messages in Jmeter?

Posted by prasanna bhat <pr...@gmail.com>.
use OUT.println("Your status message");.. This will display your message on
the console.
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BSF_PostProcessor

Thanks,
Prasanna


On Thu, May 13, 2010 at 5:07 PM, GautamPr <ga...@gmail.com>wrote:

>
> Hi,
> I am new to Jmeter. Plz help me out.
> I want to display user defined msgs  in jmeter say after passing or failure
> of the test. Is it possible? if yes, how??
> --
> View this message in context:
> http://old.nabble.com/Is-their-any-way-to-display-the-User-defined-messages-in-Jmeter--tp28546431p28546431.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>