Hi,

Thanks for the reply. Yes I am able to capture it.

But my query is "SELECT STATUS,COUNT(*) FROM MYTABLE WHERE CREATIONTIME >
TRUNC(SYSDATE) GROUP BY STATUS"

So I have two columns here ID_# and WF_# and the rows will increase and
decrease according to the sysdate.
I want to do like this,

If column1_row1_ ID_1 = Waiting and column2_row1_WF_1 > 25, than fail the
sampler  "Failure = true".

But the rows values are changing according to sysdate.

so want to capture all the rows value and compare them on run time and make
the sampler "failure true or false".





On Fri, Nov 18, 2016 at 4:48 PM, sebb <[email protected]> wrote:

> On 18 November 2016 at 14:15, Sankar Das <[email protected]>
> wrote:
> > Hello Everyone,
> >
> > Getting two columns from a jdbc sampler  i.e ID and WF. Trying to fail
> it,
> > if it exceeds than the predefined variables by using beanshell.
> > Below is the sample code.
> >
> > String myValue1 = vars.get("WF_1");
> > String myValue2 = vars.get("WF_2");
> > if(!myValue1.equals ("3")){
> >   log.info("myValue1 =" + myValue1);
> >   Failure = true;
> >   FailureMessage = " The database value should be " + myValue1 + ".";
> > }
> > else if(!myValue2.equals ("5")){
> >   //log something
> >   Failure = true;
> >   log.info("myValue2 =" + myValue2);
> >    FailureMessage = " The database value should be " + myValue2 + ".";
> >
> > else {
> >   //can be log something?
> >      Failure = false;
> >
> >
> > }
> > Above code is working when I know the number of rows for a particular
> > column. If the rows values are dynamic and increasing or decreasing
> > according to sysdate than how to compare them with the predefined and
> fail
> > the sampler.
> >
> > Please help!
>
> As per http://jmeter.apache.org/usermanual/component_
> reference.html#JDBC_Request
>
> the number of rows is stored in the variables
>
> ID_# and WF_#
>
> > Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to