RE: Assertion to compare two numbers

2005-10-26 Thread Sonam Chauhan
That could be useful - Thanks for the tip Sebb

-Original Message-
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 25 October 2005 8:25 PM
To: JMeter Users List
Subject: Re: Assertion to compare two numbers

On 25/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
   eg: letting a beanshell assertion 'attach' at the Thread Group level,
or
   just below an 'If Controller'.

  Assertions can be put anywhere

 Aha - the issue probably is I am running JMeter 1.9.x Sebb. The version we
 use (1.9.2) does not allow inserting assertions directly against a thread
 group or controller.

You can probably move it once you've added it.

 Thanks for the pointers to the manual. The example shows an assertion
 directly below a logic controller.

 Sonam


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Assertion to compare two numbers

2005-10-25 Thread sebb
On 25/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
   eg: letting a beanshell assertion 'attach' at the Thread Group level, or
   just below an 'If Controller'.

  Assertions can be put anywhere

 Aha - the issue probably is I am running JMeter 1.9.x Sebb. The version we
 use (1.9.2) does not allow inserting assertions directly against a thread
 group or controller.

You can probably move it once you've added it.

 Thanks for the pointers to the manual. The example shows an assertion
 directly below a logic controller.

 Sonam



 -Original Message-
 From: sebb [mailto:[EMAIL PROTECTED]
 Sent: Monday, 24 October 2005 8:11 PM
 To: JMeter Users List
 Subject: Re: Assertion to compare two numbers

 Assertions can be put anywhere:

 http://jakarta.apache.org/jmeter/usermanual/component_reference.html#asserti
 ons

 Assertions are used to perform additional checks on samplers, and are
 processed after each sampler in the same scope.

 Scope:

 http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rul
 es

 S.

 On 24/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
   I meant to code a new Assertion, which could be based on the
   Size Assertion.
 
  Thanks Sebb - that makes a lot of sense now.
 
  Just thinking out loud a bit: in JMeter, assertion need to be tightly
  coupled to a sampler. Would it be worthwhile decoupling some assertions?
 For
  eg: letting a beanshell assertion 'attach' at the Thread Group level, or
  just below an 'If Controller'.
 
  Sonam
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Assertion to compare two numbers

2005-10-24 Thread Sonam Chauhan
 I meant to code a new Assertion, which could be based on the 
 Size Assertion.

Thanks Sebb - that makes a lot of sense now.

Just thinking out loud a bit: in JMeter, assertion need to be tightly
coupled to a sampler. Would it be worthwhile decoupling some assertions? For
eg: letting a beanshell assertion 'attach' at the Thread Group level, or
just below an 'If Controller'. 

Sonam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Assertion to compare two numbers

2005-10-24 Thread sebb
Assertions can be put anywhere:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#assertions

Assertions are used to perform additional checks on samplers, and are
processed after each sampler in the same scope.

Scope:

http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules

S.

On 24/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  I meant to code a new Assertion, which could be based on the
  Size Assertion.

 Thanks Sebb - that makes a lot of sense now.

 Just thinking out loud a bit: in JMeter, assertion need to be tightly
 coupled to a sampler. Would it be worthwhile decoupling some assertions? For
 eg: letting a beanshell assertion 'attach' at the Thread Group level, or
 just below an 'If Controller'.

 Sonam

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Assertion to compare two numbers

2005-10-24 Thread Sonam Chauhan
  eg: letting a beanshell assertion 'attach' at the Thread Group level, or
  just below an 'If Controller'.

 Assertions can be put anywhere

Aha - the issue probably is I am running JMeter 1.9.x Sebb. The version we
use (1.9.2) does not allow inserting assertions directly against a thread
group or controller. 

Thanks for the pointers to the manual. The example shows an assertion
directly below a logic controller.

Sonam



-Original Message-
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Monday, 24 October 2005 8:11 PM
To: JMeter Users List
Subject: Re: Assertion to compare two numbers

Assertions can be put anywhere:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#asserti
ons

Assertions are used to perform additional checks on samplers, and are
processed after each sampler in the same scope.

Scope:

http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rul
es

S.

On 24/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  I meant to code a new Assertion, which could be based on the
  Size Assertion.

 Thanks Sebb - that makes a lot of sense now.

 Just thinking out loud a bit: in JMeter, assertion need to be tightly
 coupled to a sampler. Would it be worthwhile decoupling some assertions?
For
 eg: letting a beanshell assertion 'attach' at the Thread Group level, or
 just below an 'If Controller'.

 Sonam

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Assertion to compare two numbers

2005-10-21 Thread Sonam Chauhan
 The If Controller assumes JavaScript - do not enclose the condition in
 the __Javascript() function.
 
 Anyway, would it not be enough to put the following?
 
 ${include_tax_price} = ${exclude_tax_price}

Thanks Seb, you're right of course: 

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#If_Cont
roller

I decided to give this a skip anyway though :) it was a bit too nasty, even
for me. 

Hm, by making your own assertion by a 'Size assertion' did you mean to
request a valid page and put in an assertion that must fail? 

Regards,
Sonam


-Original Message-
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 19 October 2005 7:51 PM
To: JMeter Users List
Subject: Re: Assertion to compare two numbers

The If Controller assumes JavaScript - do not enclose the condition in
the __Javascript() function.

Anyway, would it not be enough to put the following?

${include_tax_price} = ${exclude_tax_price}

==

Or you could make your own assertion based on the Size Assertion.

S.
On 19/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
 Thanks a lot Sebb. I think I can't use a Beanshell assertion. The JMeter
 version we're currently frozen at is 1.9.1 (we version control it along
with
 the testcases - otherwise things break :)

 I was playing with an 'If controller' with this condition:
 ${__javaScript( if (  ${include_tax_price} = ${exclude_tax_price})
{return true} else {return false},)}
 The idea was to go down the if statement if the assertion failed, and then
 hit an impossible URL like http://abcd:123456/

 On second thoughts, this is nasty. :-P I'll wait until we upgrade JMeter.

 Regards,
 Sonam


 -Original Message-
 From: sebb [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 18 October 2005 8:32 PM
 To: JMeter Users List
 Subject: Re: Assertion to compare two numbers

 This is a job for an Assertion.

 The BeanShell Assertion is currently the only Assertion that can
 perform such checks currently:


http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
 ll_Assertion

 Have a look at the sample.

 S.
 On 18/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  Hello - I'm a bit lost here :-)
 
 
 
  My test needs to verify include-tax settings were obeyed when
 calculating
  price. Since prices will vary with time, I can't use hardcoded response
  assertions. So my test plan logs into two accounts  - one set to include
  tax, and one not to. Prices of the same item are then obtained and
 compared
  -- the include_tax price must be higher.
 
 
 
  I obtained the prices into two JMeter variables using the 'Regular
  Expression Extractor' post-processor.
 
 
 
  But how can the script compare these two variables? (i.e. return failure
 if
  the include_tax price is not higher than exclude_tax price)
 
 
 
  Sincerely,
 
  Sonam Chauhan
 
  --
 
  Corporate Express Australia Ltd.
 
  Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Assertion to compare two numbers

2005-10-21 Thread sebb
I meant to code a new Assertion, which could be based on the Size Assertion.

The GUI would need another field to specify the name of the variable to check.

The runtime code would need to get the value from the variable instead
of the length of the previous response.

Should not be all that difficult to write.

S.
On 21/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  The If Controller assumes JavaScript - do not enclose the condition in
  the __Javascript() function.
 
  Anyway, would it not be enough to put the following?
 
  ${include_tax_price} = ${exclude_tax_price}

 Thanks Seb, you're right of course:

 http://jakarta.apache.org/jmeter/usermanual/component_reference.html#If_Cont
 roller

 I decided to give this a skip anyway though :) it was a bit too nasty, even
 for me.

 Hm, by making your own assertion by a 'Size assertion' did you mean to
 request a valid page and put in an assertion that must fail?

 Regards,
 Sonam


 -Original Message-
 From: sebb [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 19 October 2005 7:51 PM
 To: JMeter Users List
 Subject: Re: Assertion to compare two numbers

 The If Controller assumes JavaScript - do not enclose the condition in
 the __Javascript() function.

 Anyway, would it not be enough to put the following?

 ${include_tax_price} = ${exclude_tax_price}

 ==

 Or you could make your own assertion based on the Size Assertion.

 S.
 On 19/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  Thanks a lot Sebb. I think I can't use a Beanshell assertion. The JMeter
  version we're currently frozen at is 1.9.1 (we version control it along
 with
  the testcases - otherwise things break :)
 
  I was playing with an 'If controller' with this condition:
  ${__javaScript( if (  ${include_tax_price} = ${exclude_tax_price})
 {return true} else {return false},)}
  The idea was to go down the if statement if the assertion failed, and then
  hit an impossible URL like http://abcd:123456/
 
  On second thoughts, this is nasty. :-P I'll wait until we upgrade JMeter.
 
  Regards,
  Sonam
 
 
  -Original Message-
  From: sebb [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, 18 October 2005 8:32 PM
  To: JMeter Users List
  Subject: Re: Assertion to compare two numbers
 
  This is a job for an Assertion.
 
  The BeanShell Assertion is currently the only Assertion that can
  perform such checks currently:
 
 
 http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
  ll_Assertion
 
  Have a look at the sample.
 
  S.
  On 18/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
   Hello - I'm a bit lost here :-)
  
  
  
   My test needs to verify include-tax settings were obeyed when
  calculating
   price. Since prices will vary with time, I can't use hardcoded response
   assertions. So my test plan logs into two accounts  - one set to include
   tax, and one not to. Prices of the same item are then obtained and
  compared
   -- the include_tax price must be higher.
  
  
  
   I obtained the prices into two JMeter variables using the 'Regular
   Expression Extractor' post-processor.
  
  
  
   But how can the script compare these two variables? (i.e. return failure
  if
   the include_tax price is not higher than exclude_tax price)
  
  
  
   Sincerely,
  
   Sonam Chauhan
  
   --
  
   Corporate Express Australia Ltd.
  
   Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  
  
  
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Assertion to compare two numbers

2005-10-19 Thread sebb
The If Controller assumes JavaScript - do not enclose the condition in
the __Javascript() function.

Anyway, would it not be enough to put the following?

${include_tax_price} = ${exclude_tax_price}

==

Or you could make your own assertion based on the Size Assertion.

S.
On 19/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
 Thanks a lot Sebb. I think I can't use a Beanshell assertion. The JMeter
 version we're currently frozen at is 1.9.1 (we version control it along with
 the testcases - otherwise things break :)

 I was playing with an 'If controller' with this condition:
 ${__javaScript( if (  ${include_tax_price} = ${exclude_tax_price})
{return true} else {return false},)}
 The idea was to go down the if statement if the assertion failed, and then
 hit an impossible URL like http://abcd:123456/

 On second thoughts, this is nasty. :-P I'll wait until we upgrade JMeter.

 Regards,
 Sonam


 -Original Message-
 From: sebb [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 18 October 2005 8:32 PM
 To: JMeter Users List
 Subject: Re: Assertion to compare two numbers

 This is a job for an Assertion.

 The BeanShell Assertion is currently the only Assertion that can
 perform such checks currently:

 http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
 ll_Assertion

 Have a look at the sample.

 S.
 On 18/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
  Hello - I'm a bit lost here :-)
 
 
 
  My test needs to verify include-tax settings were obeyed when
 calculating
  price. Since prices will vary with time, I can't use hardcoded response
  assertions. So my test plan logs into two accounts  - one set to include
  tax, and one not to. Prices of the same item are then obtained and
 compared
  -- the include_tax price must be higher.
 
 
 
  I obtained the prices into two JMeter variables using the 'Regular
  Expression Extractor' post-processor.
 
 
 
  But how can the script compare these two variables? (i.e. return failure
 if
  the include_tax price is not higher than exclude_tax price)
 
 
 
  Sincerely,
 
  Sonam Chauhan
 
  --
 
  Corporate Express Australia Ltd.
 
  Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Assertion to compare two numbers

2005-10-18 Thread Sonam Chauhan
Hello - I'm a bit lost here :-) 

 

My test needs to verify include-tax settings were obeyed when calculating
price. Since prices will vary with time, I can't use hardcoded response
assertions. So my test plan logs into two accounts  - one set to include
tax, and one not to. Prices of the same item are then obtained and compared
-- the include_tax price must be higher.

 

I obtained the prices into two JMeter variables using the 'Regular
Expression Extractor' post-processor. 

 

But how can the script compare these two variables? (i.e. return failure if
the include_tax price is not higher than exclude_tax price)

 

Sincerely,

Sonam Chauhan

-- 

Corporate Express Australia Ltd.

Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

 



Re: Assertion to compare two numbers

2005-10-18 Thread sebb
This is a job for an Assertion.

The BeanShell Assertion is currently the only Assertion that can
perform such checks currently:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Assertion

Have a look at the sample.

S.
On 18/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
 Hello - I'm a bit lost here :-)



 My test needs to verify include-tax settings were obeyed when calculating
 price. Since prices will vary with time, I can't use hardcoded response
 assertions. So my test plan logs into two accounts  - one set to include
 tax, and one not to. Prices of the same item are then obtained and compared
 -- the include_tax price must be higher.



 I obtained the prices into two JMeter variables using the 'Regular
 Expression Extractor' post-processor.



 But how can the script compare these two variables? (i.e. return failure if
 the include_tax price is not higher than exclude_tax price)



 Sincerely,

 Sonam Chauhan

 --

 Corporate Express Australia Ltd.

 Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Assertion to compare two numbers

2005-10-18 Thread Sonam Chauhan
Thanks a lot Sebb. I think I can't use a Beanshell assertion. The JMeter
version we're currently frozen at is 1.9.1 (we version control it along with
the testcases - otherwise things break :) 

I was playing with an 'If controller' with this condition:
${__javaScript( if (  ${include_tax_price} = ${exclude_tax_price}) 
{return true} else {return false},)}
The idea was to go down the if statement if the assertion failed, and then
hit an impossible URL like http://abcd:123456/

On second thoughts, this is nasty. :-P I'll wait until we upgrade JMeter.

Regards,
Sonam


-Original Message-
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 18 October 2005 8:32 PM
To: JMeter Users List
Subject: Re: Assertion to compare two numbers

This is a job for an Assertion.

The BeanShell Assertion is currently the only Assertion that can
perform such checks currently:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShe
ll_Assertion

Have a look at the sample.

S.
On 18/10/05, Sonam Chauhan [EMAIL PROTECTED] wrote:
 Hello - I'm a bit lost here :-)



 My test needs to verify include-tax settings were obeyed when
calculating
 price. Since prices will vary with time, I can't use hardcoded response
 assertions. So my test plan logs into two accounts  - one set to include
 tax, and one not to. Prices of the same item are then obtained and
compared
 -- the include_tax price must be higher.



 I obtained the prices into two JMeter variables using the 'Regular
 Expression Extractor' post-processor.



 But how can the script compare these two variables? (i.e. return failure
if
 the include_tax price is not higher than exclude_tax price)



 Sincerely,

 Sonam Chauhan

 --

 Corporate Express Australia Ltd.

 Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]