jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <flaviocy...@gmail.com>
Subject Re: Help required in assertion !!!!
Date Tue, 10 Jan 2012 12:01:04 GMT
Nithya,

    you can use an "If Controller" element, testing your smame variable for
non-blank, and put your "Create User" request inside it.
    if your want to see an error, not just avoid the request, I suggest you
to use other "If Controller", testing smame variable for blank, and inside
it add a HTTP requst you know will return a 404 code.

Hope it helps you.
Flávio Cysne

2012/1/10 Nithya Prakash <nithyaprakash86@gmail.com>

> Hi Deepak,
>
> Thanks for your support..... the fact is i'm not sure how to assert it. so
> jus thought of whether i could assert that request tab....
>
> Let me explain my scenario in detail so that you can help me out...
>
> I have defined some variables in UDV....
> Case:1
> #1.
> srname       AGJES
> srcountry    XFGR
>
> #2.
> I use these variables in my HTTP Request.
> its fetching the above values and the request is pass.
>
> Case:2
> #1.
> srname     <blank>
> srcountry   GREEN
>
> #2.
> this 'srname' field is *mandatory field*. When the HTTP request is running,
> it tries to take up a value but its blank. So the system has to throw an
> error saying the field is blank.....
>
> #3.
> Its reading it as blank and the request does not throw any error..... hence
> the user is created with no name.
>
> Question:
> in the above case i want jmeter to stop my script without creating the user
> if the mandatory fields are not answered.
> Also in the UI, if i do the same, i get the error message in javascript.
>
> How to address these two issues??
>
> Thanks in advance.
>
>
> On Tue, Jan 10, 2012 at 12:55 AM, Deepak Shetty <shettyd@gmail.com> wrote:
>
> >
> >
> http://jmeter.apache.org/usermanual/component_reference.html#Response_Assertionsee
> > the field JMeter variable (but the assertion always applies on a
> > sampler)
> >
> > > can i use assertion on the "Request Tab" ??.
> > Not sure what you are trying to accomplish here.
> >
> > On Mon, Jan 9, 2012 at 5:33 AM, Nithya Prakash <
> nithyaprakash86@gmail.com
> > >wrote:
> >
> > > Hello Everyone,
> > >
> > > My scenario is like this.... defining few variables in UDV and giving
> > > values..... when the script run its taking the value. Suppose am giving
> > > Blank for the value in the UDV, the script takes blank.
> > >
> > > Question:
> > > #1. if i have to assert this blank value, how should i do it?? i mean
> if
> > > there is a blank for that particular variable, the jmeter should stop
> the
> > > script.
> > >
> > > Is there a component which i could use for this scenario??
> > >
> > > #2. Also is there a way to assert in the response which i get when the
> > > script runs??
> > > Example: when a request is passed, we get to see in the "View result
> tree
> > > listener". when i click on any of the request i get to see the
> following
> > in
> > > the right window
> > > 1. Sampler Result Tab
> > > 2. Request Tab
> > > 3. Response Data Tab
> > >
> > > can i use assertion on the "Request Tab" ??.
> > >
> > >
> > > Thanks in advance.
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message