You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Mack Lobell <ma...@hotmail.com> on 2010/12/10 17:28:43 UTC
How to test if variable is null
Hi!
I'm using a JDBC sampler to get data from a database. Sometimes the fields in the databse is null and my variables in the sampler will also be null. If I use the variable in a Response Assertion it always fails because the variable is null.
If a variable is null how can i test if the variable==null and variable!=null?
Is there a better control than a Response Assertion to use?
Any help is appreciated.
Thanks!
Re: How to test if variable is null
Posted by chaitanya bhatt <bh...@gmail.com>.
How about using Bean shell?
Chaitanya M Bhatt
On Fri, Dec 10, 2010 at 9:58 PM, Mack Lobell <ma...@hotmail.com> wrote:
>
> Hi!
>
> I'm using a JDBC sampler to get data from a database. Sometimes the fields
> in the databse is null and my variables in the sampler will also be null. If
> I use the variable in a Response Assertion it always fails because the
> variable is null.
>
> If a variable is null how can i test if the variable==null and
> variable!=null?
>
> Is there a better control than a Response Assertion to use?
>
> Any help is appreciated.
>
> Thanks!
>