You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by PiotrW <pe...@gmail.com> on 2010/01/28 10:55:31 UTC

JDBC Request

I'm doing a JDBC request that returns:

Total
634
211
4

I have defined variables A, B, C in de JDBC request. So A_2 = 634. How do I
assert this variable ? What should the next Assertion/Post processor/Listner
?

thnx !
-- 
View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27353456.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: JDBC Request

Posted by PiotrW <pe...@gmail.com>.
Ok, we're getting there... Now, this returns true or false right ?

Now i would like to add an Assertion that tests on true/false, would that be
a ResponseAssertion ? Or is there an other way to have the result show up in
a Listener ?


sebb-2-2 wrote:
> 
> On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>
>>  Ok, I assume the variable A_2 is passed on to the BSFAssertion ?
>>
>>  Could you give an example of how to test this variable in the
>> BSFAssertion ?
> 
> if (${A_2} == 42) {
> }
> 
>>
>>  sebb-2-2 wrote:
>>  >
>>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>  >>
>>  >>  Thanks for the reply. I know it's been covered in a very long
>> discussion
>>  >> :)
>>  >>  But that didn't answer my question.
>>  >>  What do i use after the JDBC request ? Beanshell Assertion ?
>>  >
>>  > As I just wrote, you can use either a BSF assertion or a BeanShell
>>  > Assertion.
>>  >
>>  >>  thnx again.
>>  >>
>>  >>
>>  >>
>>  >>  sebb-2-2 wrote:
>>  >>  >
>>  >>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>  >>  >>
>>  >>  >>  I'm doing a JDBC request that returns:
>>  >>  >>
>>  >>  >>  Total
>>  >>  >>  634
>>  >>  >>  211
>>  >>  >>  4
>>  >>  >>
>>  >>  >>  I have defined variables A, B, C in de JDBC request. So A_2 =
>> 634.
>>  >> How
>>  >>  >> do I
>>  >>  >>  assert this variable ? What should the next Assertion/Post
>>  >>  >> processor/Listner
>>  >>  >>  ?
>>  >>  >
>>  >>  > That's not particularly easy currently, because the Assertions all
>>  >>  > assume the input comes from the previous sample.
>>  >>  >
>>  >>  > You could add a Java Request and use ${A_2} in the response data
>>  >>  > field; then add an Assertion to that.
>>  >>  >
>>  >>  > Otherwise, you will need to use a BSF or BeanShell assertion. I
>> think
>>  >>  > this has been covered in the archives.
>>  >>  >
>>  >>  >>  thnx !
>>  >>  >>
>>  >>  >> --
>>  >>  >>  View this message in context:
>>  >>  >> http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>>  >>  >>
>>  >>  >>
>>  >>  >
>>  >>  >
>> ---------------------------------------------------------------------
>>  >>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  >>  > For additional commands, e-mail:
>> jmeter-user-help@jakarta.apache.org
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>
>>  >>
>>  >> --
>>  >>  View this message in context:
>>  >> http://old.nabble.com/JDBC-Request-tp27353456p27354568.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
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>  >
>>  >
>>  >
>>
>>  --
>>
>> View this message in context:
>> http://old.nabble.com/JDBC-Request-tp27353456p27354701.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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27354847.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: JDBC Request

Posted by sebb <se...@gmail.com>.
On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>
>  Ok, I assume the variable A_2 is passed on to the BSFAssertion ?
>
>  Could you give an example of how to test this variable in the BSFAssertion ?

if (${A_2} == 42) {
}

>
>  sebb-2-2 wrote:
>  >
>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>  >>
>  >>  Thanks for the reply. I know it's been covered in a very long discussion
>  >> :)
>  >>  But that didn't answer my question.
>  >>  What do i use after the JDBC request ? Beanshell Assertion ?
>  >
>  > As I just wrote, you can use either a BSF assertion or a BeanShell
>  > Assertion.
>  >
>  >>  thnx again.
>  >>
>  >>
>  >>
>  >>  sebb-2-2 wrote:
>  >>  >
>  >>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>  >>  >>
>  >>  >>  I'm doing a JDBC request that returns:
>  >>  >>
>  >>  >>  Total
>  >>  >>  634
>  >>  >>  211
>  >>  >>  4
>  >>  >>
>  >>  >>  I have defined variables A, B, C in de JDBC request. So A_2 = 634.
>  >> How
>  >>  >> do I
>  >>  >>  assert this variable ? What should the next Assertion/Post
>  >>  >> processor/Listner
>  >>  >>  ?
>  >>  >
>  >>  > That's not particularly easy currently, because the Assertions all
>  >>  > assume the input comes from the previous sample.
>  >>  >
>  >>  > You could add a Java Request and use ${A_2} in the response data
>  >>  > field; then add an Assertion to that.
>  >>  >
>  >>  > Otherwise, you will need to use a BSF or BeanShell assertion. I think
>  >>  > this has been covered in the archives.
>  >>  >
>  >>  >>  thnx !
>  >>  >>
>  >>  >> --
>  >>  >>  View this message in context:
>  >>  >> http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>  >>  >>
>  >>  >>
>  >>  >
>  >>  > ---------------------------------------------------------------------
>  >>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  >>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://old.nabble.com/JDBC-Request-tp27353456p27354568.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
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>  >
>
>  --
>
> View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27354701.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
>
>

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


Re: JDBC Request

Posted by PiotrW <pe...@gmail.com>.
Ok, I assume the variable A_2 is passed on to the BSFAssertion ?

Could you give an example of how to test this variable in the BSFAssertion ?


sebb-2-2 wrote:
> 
> On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>
>>  Thanks for the reply. I know it's been covered in a very long discussion
>> :)
>>  But that didn't answer my question.
>>  What do i use after the JDBC request ? Beanshell Assertion ?
> 
> As I just wrote, you can use either a BSF assertion or a BeanShell
> Assertion.
> 
>>  thnx again.
>>
>>
>>
>>  sebb-2-2 wrote:
>>  >
>>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>  >>
>>  >>  I'm doing a JDBC request that returns:
>>  >>
>>  >>  Total
>>  >>  634
>>  >>  211
>>  >>  4
>>  >>
>>  >>  I have defined variables A, B, C in de JDBC request. So A_2 = 634.
>> How
>>  >> do I
>>  >>  assert this variable ? What should the next Assertion/Post
>>  >> processor/Listner
>>  >>  ?
>>  >
>>  > That's not particularly easy currently, because the Assertions all
>>  > assume the input comes from the previous sample.
>>  >
>>  > You could add a Java Request and use ${A_2} in the response data
>>  > field; then add an Assertion to that.
>>  >
>>  > Otherwise, you will need to use a BSF or BeanShell assertion. I think
>>  > this has been covered in the archives.
>>  >
>>  >>  thnx !
>>  >>
>>  >> --
>>  >>  View this message in context:
>>  >> http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>  >
>>  >
>>  >
>>
>>
>> --
>>  View this message in context:
>> http://old.nabble.com/JDBC-Request-tp27353456p27354568.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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27354701.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: JDBC Request

Posted by sebb <se...@gmail.com>.
On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>
>  Thanks for the reply. I know it's been covered in a very long discussion :)
>  But that didn't answer my question.
>  What do i use after the JDBC request ? Beanshell Assertion ?

As I just wrote, you can use either a BSF assertion or a BeanShell Assertion.

>  thnx again.
>
>
>
>  sebb-2-2 wrote:
>  >
>  > On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>  >>
>  >>  I'm doing a JDBC request that returns:
>  >>
>  >>  Total
>  >>  634
>  >>  211
>  >>  4
>  >>
>  >>  I have defined variables A, B, C in de JDBC request. So A_2 = 634. How
>  >> do I
>  >>  assert this variable ? What should the next Assertion/Post
>  >> processor/Listner
>  >>  ?
>  >
>  > That's not particularly easy currently, because the Assertions all
>  > assume the input comes from the previous sample.
>  >
>  > You could add a Java Request and use ${A_2} in the response data
>  > field; then add an Assertion to that.
>  >
>  > Otherwise, you will need to use a BSF or BeanShell assertion. I think
>  > this has been covered in the archives.
>  >
>  >>  thnx !
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>  >
>
>
> --
>  View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27354568.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
>
>

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


Re: JDBC Request

Posted by PiotrW <pe...@gmail.com>.
Thanks for the reply. I know it's been covered in a very long discussion :)
But that didn't answer my question.
What do i use after the JDBC request ? Beanshell Assertion ?

thnx again.


sebb-2-2 wrote:
> 
> On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>>
>>  I'm doing a JDBC request that returns:
>>
>>  Total
>>  634
>>  211
>>  4
>>
>>  I have defined variables A, B, C in de JDBC request. So A_2 = 634. How
>> do I
>>  assert this variable ? What should the next Assertion/Post
>> processor/Listner
>>  ?
> 
> That's not particularly easy currently, because the Assertions all
> assume the input comes from the previous sample.
> 
> You could add a Java Request and use ${A_2} in the response data
> field; then add an Assertion to that.
> 
> Otherwise, you will need to use a BSF or BeanShell assertion. I think
> this has been covered in the archives.
> 
>>  thnx !
>>
>> --
>>  View this message in context:
>> http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27354568.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: JDBC Request

Posted by sebb <se...@gmail.com>.
On 28/01/2010, PiotrW <pe...@gmail.com> wrote:
>
>  I'm doing a JDBC request that returns:
>
>  Total
>  634
>  211
>  4
>
>  I have defined variables A, B, C in de JDBC request. So A_2 = 634. How do I
>  assert this variable ? What should the next Assertion/Post processor/Listner
>  ?

That's not particularly easy currently, because the Assertions all
assume the input comes from the previous sample.

You could add a Java Request and use ${A_2} in the response data
field; then add an Assertion to that.

Otherwise, you will need to use a BSF or BeanShell assertion. I think
this has been covered in the archives.

>  thnx !
>
> --
>  View this message in context: http://old.nabble.com/JDBC-Request-tp27353456p27353456.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
>
>

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