Re: All threads interrupted

2014-09-17 Thread Nicola Ambrosetti Brolin
I finally found that I had a result status action handler set to stop test
now on error in an included test fragment, so that a simple http error
response took down the entire load test.

On 16 September 2014 19:07, Jeff Ohrstrom johrst...@hotmail.com wrote:

 You shouldn't be running load tests in GUI mode.  Perhaps you have too
 many visualizers and/or too many threads in GUI mode and JMeter is
 getting overloaded.  Timers make threads sleep not wait.

 Try running in non-gui mode to see if you get the same results.

 On Tue, 2014-09-16 at 15:21 +0200, Nicola Ambrosetti Brolin wrote:
  Hi,
 
  I'm running several concurrent threads with a timer to wait in between
  requests (Jmeter 2.11). However after running a few minutes (sometimes
 even
  less than a minute) all the threads suddendly stop and I see in the log
  lots of:
 
  2014/09/16 15:12:20 WARN  - jmeter.threads.JMeterThread: The delay timer
  was interrupted - probably did not wait as long as intended.
  2014/09/16 15:12:20 INFO  - jmeter.threads.JMeterThread: Stopping: My
  thread group 4-2
 
   and a few:
 
  2014/09/16 15:12:20 WARN  - jmeter.util.JMeterUtils: Interrupted in
  thread My thread group 3-1 java.lang.InterruptedException
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java:503)
  at java.awt.EventQueue.invokeAndWait(EventQueue.java:1270)
  at java.awt.EventQueue.invokeAndWait(EventQueue.java:1251)
  at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
  at org.apache.jmeter.util.JMeterUtils.runSafe(JMeterUtils.java:1296)
  at
 
 org.apache.jmeter.visualizers.ViewResultsFullVisualizer.add(ViewResultsFullVisualizer.java:128)
  at
 
 org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:553)
  at
 
 org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:529)
  at
 
 org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:84)
  at
 
 org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:783)
  at
 
 org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:443)
  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
  at java.lang.Thread.run(Thread.java:745)
 
  All my thread groups have Continue after sampler error (in fact I got
 but
  a few errors from the samplers) and loop count forever.
 
  This is very frustrating: I've tried various alternatives, like a
 beanshell
  sampler with Thread.sleep() and several types of timers, but the problem
  seems always the same.
 
  Any ideas?
 
  /Nicola



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




All threads interrupted

2014-09-16 Thread Nicola Ambrosetti Brolin
Hi,

I'm running several concurrent threads with a timer to wait in between
requests (Jmeter 2.11). However after running a few minutes (sometimes even
less than a minute) all the threads suddendly stop and I see in the log
lots of:

2014/09/16 15:12:20 WARN  - jmeter.threads.JMeterThread: The delay timer
was interrupted - probably did not wait as long as intended.
2014/09/16 15:12:20 INFO  - jmeter.threads.JMeterThread: Stopping: My
thread group 4-2

 and a few:

2014/09/16 15:12:20 WARN  - jmeter.util.JMeterUtils: Interrupted in
thread My thread group 3-1 java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1270)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1251)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at org.apache.jmeter.util.JMeterUtils.runSafe(JMeterUtils.java:1296)
at
org.apache.jmeter.visualizers.ViewResultsFullVisualizer.add(ViewResultsFullVisualizer.java:128)
at
org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:553)
at
org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:529)
at
org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:84)
at
org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:783)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:443)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Thread.java:745)

All my thread groups have Continue after sampler error (in fact I got but
a few errors from the samplers) and loop count forever.

This is very frustrating: I've tried various alternatives, like a beanshell
sampler with Thread.sleep() and several types of timers, but the problem
seems always the same.

Any ideas?

/Nicola


JDBC sampler and sql select ... as ...

2014-03-24 Thread Nicola Ambrosetti Brolin
I'm having some trouble with the JDBC sampler: when issuing a sql select
query of the form

select field1, field2 as alias2 from mytable;

the resulting response has the fields named (field1, field2) instead of the
expected (field1, alias2). I'm using mysql and I've checked the queries
directly via the command line and there I get the correct result. I've
stumbled upon this problem when joining two tables with the same field
names.

Anyone else had the same problem?

Regards,

Nicola


Starting and terminating application from jmeter

2014-02-17 Thread Nicola Ambrosetti Brolin
Hi,

I'm trying to start an application at the beginning of a jmeter test. For
this I thought of using an OS sampler calling the application. However the
when the application is started the sampler doesn't return since the
application doesn't return control and keeps logging to stdout. So the test
cannot go any further and I need to stop the test manually.

Do you have any idea how I can just start a process from within JMeter
without waiting for it to return?

Best,

Nicola


Including a test fragment that uses a module controller

2014-01-30 Thread Nicola Ambrosetti Brolin
Hi,

In our effort to modularize Jmeter tests we rely heavily on test fragments,
include controllers and module controllers.

However I've stumbled on the following problem and wonder if it should
count as a bug.

I have two test plans: the irest including the second with an include
controller:

Test Plan 1
+ Thread Group
++ Module Controller - Test Fragment / Include Controller
+ Test Fragment
++ Include Controller - Test Plan 2

Test Plan 2
+ Test Fragment 1
++ Sampler 1
++ Module Controller - Test Fragments 2 / Sampler 2
+ Test Fragment 2
++ Sampler 2

You might question why I use a module controller at all, but the idea is
that in a real test plan we reuse the same test fragment called by the
module controller in several places.

When I run test plan 1 I would expect that it would run:
Sampler 1
Module Controller - Sampler 2

So that both samplers are run.

Instead only Sampler 1 runs. The reason is probably that when including
only the first Test Fragment found is actually included and the rest is
completely discarded. So when it's the turn of the module controller it
simply doesn't find Test fragment 2 and sampler 2.

What do you think about this?

Regards,
Nicola


assertion after module controller

2013-12-10 Thread Nicola Ambrosetti Brolin
Hi,

I'm trying to apply an assertion after a Module controller that runs a test
fragment with several samplers (two in fact). The assertion is applied to
all the samplers in the included test fragment, whereas I'd like to apply
it only to the last one.

I have tried saving the response of the last sampler in a variable and
asserting on that variable, but of course as the assertion is applied to
every sampler and the variable is undefined before the last sampler, the
previous samplers fail the assertion.

To summarize the structure of the test plans is as follows:

Thread group
module controller - test fragment
assertion
Test fragment
sampler 1
sampler 2
post processor saving response in variable

Any thoughts?

/Nicola


Re: sample code for beanshell preprocessor to rewrite url

2013-11-27 Thread Nicola Ambrosetti Brolin
The simplest way I see is to use a variable for the path in the HTTP
Request sampler (e.g. ${httpRequestPath}) and then use a beanshell
preprocessor to set that variable as wished (code:
vars.put(httpRequestPath, my/new/path)). They query string can be
completely specified in the path variable and there should be no need to
have additional variables for request parameters.

Nicola


On 27 November 2013 09:23, James Liang jli...@andera.com wrote:

 Hi All,

 I need to use the beanshell preprocess to modify the url of a http
 sampler.  Any coding samples that modifies the query string of a HTTP GET?
  I need to figure out which jmeter object to change and how to change it.


 Thanks,
 James Liang




Re: JMeter 2.10 Include Controller doesn't seem to be working

2013-10-23 Thread Nicola Ambrosetti Brolin
Done: https://issues.apache.org/bugzilla/show_bug.cgi?id=55693


On 22 October 2013 17:26, Philippe Mouawad philippe.moua...@gmail.comwrote:

 Hello,
 It's documented in include controller but maybe needs clarification.
 @Nicola, could you open a bugzilla for your descriptio about save as ?

 Thanks

 On Tuesday, October 22, 2013, Robin D. Wilson wrote:

  It figures... That works.
 
  Now I'll have to go through all my Includes and change them from simple
  controllers to Test Fragments.
 
  Is this documented somewhere - clearly? I read through the Test Fragment
  stuff, and it was as clear as muddy water...
 
  --
  Robin D. Wilson
  Sr. Director of Web Development
  KingsIsle Entertainment, Inc.
  VOICE: 512-777-1861
  http://www.kingsisle.com
 
  -Original Message-
  From: Nicola Ambrosetti Brolin [mailto:ambrosetti.nic...@gmail.com]
  Sent: Tuesday, October 22, 2013 8:40 AM
  To: JMeter Users List
  Subject: Re: JMeter 2.10 Include Controller doesn't seem to be working
 
  The test fragment must be inside the included file, for the include
  controller will ignore any test element not placed under a test
  fragment.
 
  You can however have a test fragment as parent of the include controller,
  which includes a file containing another test fragment. I
  use this setup for example to be able to point to the include controller
  from a module controller in the thread group.
 
  To summarize this is the way to do it:
 
  Included file:
 
  Test Plan
|--Test fragment
   |-- sampler 1
   |-- sampler 2
 
 
  Test project:
 
 
  Test Plan
|--Test fragment
|   |-- Include controller (pointing to included file above)
|-- Thread group
|-- Sampler 3
|-- Module controller (pointing to Test Fragment  Include
  controller)
|-- Sampler 4
 
 
  This will be run as:
  Sampler 3
  sampler 1
  sampler 2
  Sampler 4
 
  On 22 October 2013 14:49, Robin D. Wilson rwils...@gmail.com wrote:
 
   So let me understand, do I need to put the Test Fragment inside the
   included file, or do I put the Include Controller inside a Test
 Fragment?
  
   --
   Robin D. Wilson
   VOICE: 512-777-1861
  
  
  
   On Oct 22, 2013, at 6:52 AM, Nicola Ambrosetti Brolin 
   ambrosetti.nic...@gmail.com wrote:
  
   I might add (since I was the reporter of bug 55464) that it is
   confusing that when using Save selection as the produced jmx project
   has the selected steps sitting right under the test plan, instead of
   being under a test fragment. Thus one could be led to believe that the
   saved selection could be included as is. However this is not the case:
   the include controller will completely ignore anything in the included
   project that is not child of a test fragment.
  
   Cheers,
  
   Nicola
  
  
   On 22 October 2013 10:58, UBIK LOAD PACK Support
   supp...@ubikloadpack.comwrote:
  
Hello,
I think you are misusing Test Fragments.
   
Test Fragment should be in INCLUDED Test Plan not INCLUDER.
   
So in your case they should be Login.jmx and Timer.jmx.
While according to what you show and to log file they are in
INCLUDED
   Test
Plan.
   
I think this is what changes mentions:
   
  - The correct way to include Test Elements is to use *Test Fragment
  *as
  stated in documentation of *Include Controller *.
  - The include controller is designed to use an external jmx file.
To
   use
  it, create a Test Fragment underneath the Test Plan and add any
  desired
  samplers, controllers etc. below it. Then save the Test Plan. =
The file
  is now ready to be included as part of other Test Plans.=
   
   
Regards
   
   
On Tue, Oct 22, 2013 at 4:13 AM, Robin D. Wilson
rwils...@gmail.com
wrote:
   
That is exactly what I'm using (Test Fragments)...
   
--
Robin D. Wilson
VOICE: 512-777-1861
   
   
   
On Oct 21, 2013, at 6:49 PM, UBIK LOAD PACK Support 
supp...@ubikloadpack.com wrote:
   
Hello,
Incompatible changes explains your issue:
   
- http://jmeter.apache.org/changes.html  --- To unsubscribe,
  e-mail: user-unsubscr...@jmeter.apache.org javascript:;
javascript:;
For additional commands, e-mail: user-h...@jmeter.apache.org
 javascript:;
javascript:;
   
   
   
--
   
Regards
Ubik Load Pack http://ubikloadpack.com Team Follow us on Twitter
http://twitter.com/ubikloadpack
   
   
Cordialement
L'équipe Ubik Load Pack http://ubikloadpack.com Suivez-nous sur
Twitter http://twitter.com/ubikloadpack
   
---
-- To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
 javascript:;
For additional commands, e-mail: user-h...@jmeter.apache.org
 javascript:;
   
   
   
   
--
   
Regards
Ubik Load Pack http://ubikloadpack.com Team Follow us on Twitter
http://twitter.com/ubikloadpack
   
   
Cordialement

Re: JMeter 2.10 Include Controller doesn't seem to be working

2013-10-22 Thread Nicola Ambrosetti Brolin
I might add (since I was the reporter of bug 55464) that it is confusing
that when using Save selection as the produced jmx project has the
selected steps sitting right under the test plan, instead of being under a
test fragment. Thus one could be led to believe that the saved selection
could be included as is. However this is not the case: the include
controller will completely ignore anything in the included project that is
not child of a test fragment.

Cheers,

Nicola


On 22 October 2013 10:58, UBIK LOAD PACK Support
supp...@ubikloadpack.comwrote:

 Hello,
 I think you are misusing Test Fragments.

 Test Fragment should be in INCLUDED Test Plan not INCLUDER.

 So in your case they should be Login.jmx and Timer.jmx.
 While according to what you show and to log file they are in INCLUDED Test
 Plan.

 I think this is what changes mentions:

- The correct way to include Test Elements is to use *Test Fragment *as
stated in documentation of *Include Controller *.
- The include controller is designed to use an external jmx file. To use
it, create a Test Fragment underneath the Test Plan and add any desired
samplers, controllers etc. below it. Then save the Test Plan. = The
 file
is now ready to be included as part of other Test Plans.=


 Regards


 On Tue, Oct 22, 2013 at 4:13 AM, Robin D. Wilson rwils...@gmail.com
 wrote:

  That is exactly what I'm using (Test Fragments)...
 
  --
  Robin D. Wilson
  VOICE: 512-777-1861
 
 
 
  On Oct 21, 2013, at 6:49 PM, UBIK LOAD PACK Support 
  supp...@ubikloadpack.com wrote:
 
  Hello,
  Incompatible changes explains your issue:
 
  - jmeter.apache.org/changes.html
 
- In previous versions, *IncludeController *could run Test Elements
located inside a *Thread Group *, this behaviour ( *which was not
documented *) ould result in weird behaviour, it has been removed in
this version (see Bug
  55464https://issues.apache.org/bugzilla/show_bug.cgi?id=55464 ).
The correct way to include Test Elements is to use *Test Fragment *as
stated in documentation of *Include Controller *.
 
 
  Regards
  @ubikloadpack
 
   On Tuesday, October 22, 2013, Robin D. Wilson wrote:
  
   I have a test that includes some test fragments using an 'Include
   Controller', and then those test frags are used throughout the
   thread groups by being added in a 'Module Controller'. When I load my
   test, I get these messages in the log:
  
   ---
  
   2013/10/21 18:20:33 INFO  - jmeter.gui.action.Load: Loading file:
   X:\Tests\JMeter\WizardHome\TestSuites\Stress Test\W101 Login
   Stress Generator_wTestFrag.jmx
   2013/10/21 18:20:33 INFO  - jmeter.services.FileServer: Set new
   base='X:\Tests\JMeter\WizardHome\TestSuites\Stress Test'
   2013/10/21 18:20:34 INFO  - jmeter.services.FileServer: Set new
   base='X:\Tests\JMeter\WizardHome\TestSuites\Stress Test'
   2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
   loadIncludedElements -- try to load included module:
   X:\Tests\JMeter\WizardHome\TestSuites\Functional Units\Login.jmx
   2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
   Fragment was found in included Test Plan, returning empty
   HashTree
   2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
   loadIncludedElements -- try to load included module:
   X:\Tests\JMeter\WizardHome\TestSuites\Functional
 Units\Utility\Timer.jmx
   2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
   Fragment was found in included Test Plan, returning empty
   HashTree
   2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
   loadIncludedElements -- try to load included module:
   X:\Tests\JMeter\WizardHome\TestSuites\Functional Units\Login.jmx
   2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
   Fragment was found in included Test Plan, returning empty
   HashTree
   2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
   loadIncludedElements -- try to load included module:
   X:\Tests\JMeter\WizardHome\TestSuites\Functional
 Units\Utility\Timer.jmx
   2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
   Fragment was found in included Test Plan, returning empty
   HashTree
  
  
   --
  
   NOTE: The repeat of the INFO+WARN messages about trying to load the
   IncludeController is puzzling, since there are only 2 Include
   Controllers in the test plan... Not sure why it appears to be trying to
   load each of them twice.
  
   This same test works perfectly on JMeter 2.9 (and earlier).
  
   FYI, the test looks like this:
  
  Test Plan
  Setup stuff (User Defined Vars, Requests Defaults,
 Cookie
   Manager, etc.)
  
  Includes Test Fragment
  Include Controller - Login.jmx
  Include Controller - Timer.jmx
  
  Timer Start Thread Group
 

Re: JMeter 2.10 Include Controller doesn't seem to be working

2013-10-22 Thread Nicola Ambrosetti Brolin
The test fragment must be inside the included file, for the include
controller will ignore any test element not placed under a test fragment.

You can however have a test fragment as parent of the include controller,
which includes a file containing another test fragment. I use this setup
for example to be able to point to the include controller from a module
controller in the thread group.

To summarize this is the way to do it:

Included file:

Test Plan
  |--Test fragment
 |-- sampler 1
 |-- sampler 2


Test project:


Test Plan
  |--Test fragment
  |   |-- Include controller (pointing to included file above)
  |-- Thread group
  |-- Sampler 3
  |-- Module controller (pointing to Test Fragment  Include
controller)
  |-- Sampler 4


This will be run as:
Sampler 3
sampler 1
sampler 2
Sampler 4

On 22 October 2013 14:49, Robin D. Wilson rwils...@gmail.com wrote:

 So let me understand, do I need to put the Test Fragment inside the
 included file, or do I put the Include Controller inside a Test Fragment?

 --
 Robin D. Wilson
 VOICE: 512-777-1861



 On Oct 22, 2013, at 6:52 AM, Nicola Ambrosetti Brolin 
 ambrosetti.nic...@gmail.com wrote:

 I might add (since I was the reporter of bug 55464) that it is confusing
 that when using Save selection as the produced jmx project has the
 selected steps sitting right under the test plan, instead of being under a
 test fragment. Thus one could be led to believe that the saved selection
 could be included as is. However this is not the case: the include
 controller will completely ignore anything in the included project that is
 not child of a test fragment.

 Cheers,

 Nicola


 On 22 October 2013 10:58, UBIK LOAD PACK Support
 supp...@ubikloadpack.comwrote:

  Hello,
  I think you are misusing Test Fragments.
 
  Test Fragment should be in INCLUDED Test Plan not INCLUDER.
 
  So in your case they should be Login.jmx and Timer.jmx.
  While according to what you show and to log file they are in INCLUDED
 Test
  Plan.
 
  I think this is what changes mentions:
 
- The correct way to include Test Elements is to use *Test Fragment *as
stated in documentation of *Include Controller *.
- The include controller is designed to use an external jmx file. To
 use
it, create a Test Fragment underneath the Test Plan and add any desired
samplers, controllers etc. below it. Then save the Test Plan. = The
  file
is now ready to be included as part of other Test Plans.=
 
 
  Regards
 
 
  On Tue, Oct 22, 2013 at 4:13 AM, Robin D. Wilson rwils...@gmail.com
  wrote:
 
  That is exactly what I'm using (Test Fragments)...
 
  --
  Robin D. Wilson
  VOICE: 512-777-1861
 
 
 
  On Oct 21, 2013, at 6:49 PM, UBIK LOAD PACK Support 
  supp...@ubikloadpack.com wrote:
 
  Hello,
  Incompatible changes explains your issue:
 
  - jmeter.apache.org/changes.html
 
   - In previous versions, *IncludeController *could run Test Elements
   located inside a *Thread Group *, this behaviour ( *which was not
   documented *) ould result in weird behaviour, it has been removed in
   this version (see Bug
  55464https://issues.apache.org/bugzilla/show_bug.cgi?id=55464 ).
   The correct way to include Test Elements is to use *Test Fragment *as
   stated in documentation of *Include Controller *.
 
 
  Regards
  @ubikloadpack
 
  On Tuesday, October 22, 2013, Robin D. Wilson wrote:
 
  I have a test that includes some test fragments using an 'Include
  Controller', and then those test frags are used throughout the
  thread groups by being added in a 'Module Controller'. When I load my
  test, I get these messages in the log:
 
  ---
 
  2013/10/21 18:20:33 INFO  - jmeter.gui.action.Load: Loading file:
  X:\Tests\JMeter\WizardHome\TestSuites\Stress Test\W101 Login
  Stress Generator_wTestFrag.jmx
  2013/10/21 18:20:33 INFO  - jmeter.services.FileServer: Set new
  base='X:\Tests\JMeter\WizardHome\TestSuites\Stress Test'
  2013/10/21 18:20:34 INFO  - jmeter.services.FileServer: Set new
  base='X:\Tests\JMeter\WizardHome\TestSuites\Stress Test'
  2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
  loadIncludedElements -- try to load included module:
  X:\Tests\JMeter\WizardHome\TestSuites\Functional Units\Login.jmx
  2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
  Fragment was found in included Test Plan, returning empty
  HashTree
  2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
  loadIncludedElements -- try to load included module:
  X:\Tests\JMeter\WizardHome\TestSuites\Functional
  Units\Utility\Timer.jmx
  2013/10/21 18:20:34 WARN  - jmeter.control.IncludeController: No Test
  Fragment was found in included Test Plan, returning empty
  HashTree
  2013/10/21 18:20:34 INFO  - jmeter.control.IncludeController:
  loadIncludedElements -- try to load included module:
  X:\Tests\JMeter\WizardHome\TestSuites\Functional Units\Login.jmx
  2013/10/21 18:20:34

Adding an assertion after a Module/Include Controller

2013-10-10 Thread Nicola Ambrosetti Brolin
Hi,

I've got a module controller running a test fragment in an include
controller and I would like to add some assertions to verify the results. I
tried adding an assertion both as a child to the module controller or as a
sibling and in both cases the assertion doesn't seem to be run at all.
In the Tree View Listener I can see the results of the test fragment run
via the include controller, but I don't see how I can get to those results
in any way.

The only workaround I found is saving the result in a variable already in
the included test fragment.

Any thoughts?

Nicola


Re: Adding an assertion after a Module/Include Controller

2013-10-10 Thread Nicola Ambrosetti Brolin

  You have to set the assertion as a child of the sampler, if you want to
 verify the result of that sampler.
 So, the assertion must go into the fragment.


that kills the reusability of the included test fragment. Mine is a generic
test fragment to get a piece of a log file. I don't want to add an
assertion there.

My question in the end is how can I retrieve the response of the sampler in
the included test fragment from the parent test plan.

I don't like that a parent test plan must know what variable name was used
by the included test fragment. It's like if in a programming language, the
calling function would have access to the local variables (and not the
result) of the called function.

Sergio: a volte mi dico che forse dovrei provare con un altro programma...


Re: Comparing results from two samplers in JMeter

2013-10-03 Thread Nicola Ambrosetti Brolin
On 3 October 2013 00:03, sebb seb...@gmail.com wrote:


 Use Regex Post-Processor to extract the information and store it in
 variables, one for each sample.

 Then use Response Assertion to compare the JMeter variables against each
 other.
 Provide one variable using the variable name, and the other as the
 text to match using the ${varname} syntax.


That's more or less how I did it in the end. Still I feel a little
frustrated by the impossibility to programmatically navigate through the
sampler responses like you can do in the gui with the View Results Tree,
for example. In soapUI you can access any test step programmatically and
even configure it or rerun it, from any other test step (though that might
not be a good idea with maintainability and readability in mind). In Jmeter
it seems that to configure a sampler programmatically all one can do is set
a variable (for example in a preprocessor) which then is evaluated with the
${variable} notation inside the corresponding field. However this cannot be
done for checkboxes, option boxes, drop-downs, etc.

I suspect that most of these restrictions are heritage of the fact that
Jmeter is (correct me if I'm wrong) first and foremost a performance and
load testing tool, where scripting (which is typically much slower) should
be reduced to a minimum.


Comparing results from two samplers in JMeter

2013-10-02 Thread Nicola Ambrosetti Brolin
I have several samplers in a thread group, each retrieving a piece of
information. I then need to validate the consistency of the results from
two (or more) different samplers. In particular I need to assert whether a
field in one sampler response equals a field in the JDBC response. What is
the best way to do something like that?

I have thought about adding a beanshell postprocessor to each sampler in
order to extract the field value from each sample and save it in two
variables and then adding a beanshell assertion that accesses those
variables, but I wonder if there is a more direct approach.

In the JMeter API documentation I could not see anything to access another
sampler response other than the previous one.


Any thoughts?

Nicola


Re: fetching information in bulk

2013-09-17 Thread Nicola Ambrosetti Brolin
I'd start by using a SOAP/XML-RPC Request sampler (
http://jmeter.apache.org/usermanual/component_reference.html#SOAP/XML-RPC_Request)
and then an XPath Extractor postprocessor (
http://jmeter.apache.org/usermanual/component_reference.html#XPath_Extractor).
Then you can use the For Each Controller to run through the results.

The annoying thing with Jmeter is however that you need to construct the
SOAP request by hand. If you don't know how to do it you can use SoapUI
(the community edition is free) to generate the soap request from the WSDL
and then paste it into the SOAP/XML-RPC Request sampler.


On 13 September 2013 18:19, guru praumes...@gmail.com wrote:

 Use Reg Ex Extractor in Conjunction with For Each Controller.

 Some helpful links which helped me to achieve this


 http://my.kpoint.com/kapsule/gcc-1dadaeee-1572-4c83-81fc-8d401cade743/t/multivalue-regex-jmeter-tutorial


 http://jmeter.apache.org/usermanual/component_reference.html#ForEach_Controller





 --
 View this message in context:
 http://jmeter.512774.n5.nabble.com/fetching-information-in-bulk-tp5718087p5718170.html
 Sent from the JMeter - User mailing list archive at Nabble.com.

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




Include Controller behaving strangely

2013-08-22 Thread Nicola Ambrosetti Brolin
I'm trying to include a simple jmx file with an include controller. I have
two almost identical jmx file to be included.

The first one is:

- Test Fragment
- - BeanShell Sampler

The second one has:

- Thread Group
- - Simple Controller
- - - BeanShell Sampler

Both BeanShell Sampler contain exactly the same code. According to the
Component Reference a thread group in the included file should be ignored
during the include process. So I expected that including one or the other
file would lead to the exact same result.

What I observe is however that when including the test fragment there is
not problem, and when including the thread group the included code is not
run. Also it appears that when switching from on to the other, the included
code is reloaded only after saving or after having run the test plan at
least once.

Anybody had similar issues with the include controller?

I found a bug in bugzilla (
https://issues.apache.org/bugzilla/show_bug.cgi?id=55334) addressing a
related issue, which seems to have been fixed. I tried the latest nightly
build, but then had problems opening my projects. Does anybody know when
the next stable release is planned?