Joe Smithian | 1 Apr 2008 04:57
Picon

Re: How to load data from a file to SOAP Requests in JMeter

Yes, I can load the whole SOAP request from a file but what I want is to
load only one 'Element'  of the SOAP request, which is my 'data'  to be
included in the SOAP Request, from a file. I can't load the whole SOAP
request from file because of the dependency among various SOAP request and
response messages in my test plan. In the following example, I want to load
only ${myData} from a file:
<soapenv>
 <body>
  <data>${myData} </data>
</body>
</soapenv>

I hope that makes it clear what I want.

Joe

On Sat, Mar 29, 2008 at 7:04 AM, sebb <sebbaz <at> gmail.com> wrote:

> Both SOAP samplers already allow data to be read from files.
>
> Why can't you use that?
>
> On 26/03/2008, Joe Smithian <joe.smithian <at> gmail.com> wrote:
> > Hi all,
> >
> >  I have a JMeter test plan for SOAP operations, my data is hard-coded in
> the
> >  SOAP request in the Sampler. This works fine, but I need a way to load
> data
> >  from files and put them in the SOAP Sampler request. Any idea how we
(Continue reading)

Krzysieq | 1 Apr 2008 09:47
Picon
Favicon

Re: Property files question

Ok, I'll try to show some of the bigger picture. We have an internal tool
for management of property files. We use those files not only for tests, but
also for building our software. They are generated per-environment. Each
contains over 50 props, not all of which are relevant to the tests, but all
of them are different, or at least can be different, in each file. We also
have test campaigns that CruiseControl runs against different envirionments
- acceptance, integration and so on. Here our property files work fine
because there's no gui, and a set of tests is run only once.

To "emulate" that behavior in the gui mode, our jmeter files contain one
ugly walkaround. Each of them has a "user defined variables" element per
environment (gives us 4 sets of the same properties per jmx), which use the
syntax ${__P(property,default)} to use whatever comes from a file, or the
default value for the particular environment in case no prop file is
supplied (as in gui mode usually). Enable the one You want, disable the
rest, and You're testing the environment You want. This works, but is ugly
as hell and we'd like to drop it in favor of a cleaner solution. It's
possible to have 4 shortcuts on the desktop each starting jmeter with a
different property file. This is a solution, although not the prettiest
either, because then our tests start to depend on the configuration of the
machine, from which they are run.

So my question is - how can we do it otherwise? To answer Your question -
yes, we want to change all JMeter properties that come from a property file.
These are not all properties that are in the test however. We have some that
are env-independent. In general - things like application paths, ports etc
come from prop files, whereas test data is common to all platforms.

The best would be to switch between the files without having to switch off
the app. Or - referring to what You also wrote down there - would it be
(Continue reading)

Steve Kapinos | 1 Apr 2008 11:07

RE: How to load data from a file to SOAP Requests in JMeter

Use a variable in the soap data part of the element surrounded by your
other relevant information.  Load that variable up from the file.. Say
using CSV data set elements.

-----Original Message-----
From: Joe Smithian [mailto:joe.smithian <at> gmail.com] 
Sent: Tuesday, April 01, 2008 4:58 AM
To: JMeter Users List
Subject: Re: How to load data from a file to SOAP Requests in JMeter

Yes, I can load the whole SOAP request from a file but what I want is to
load only one 'Element'  of the SOAP request, which is my 'data'  to be
included in the SOAP Request, from a file. I can't load the whole SOAP
request from file because of the dependency among various SOAP request
and response messages in my test plan. In the following example, I want
to load only ${myData} from a file:
<soapenv>
 <body>
  <data>${myData} </data>
</body>
</soapenv>

I hope that makes it clear what I want.

Joe

On Sat, Mar 29, 2008 at 7:04 AM, sebb <sebbaz <at> gmail.com> wrote:

> Both SOAP samplers already allow data to be read from files.
>
(Continue reading)

Eddie O'Sullivan | 1 Apr 2008 12:57

Re: HTTP Request with increasing number of Parameters

Hi Sebb,

Thanks for the reply. The thing is each iteration adds 63 new parameters
and I want to test for over 100 iterations (6300 parameters).

The aim of this test is the get response times as the URL gets longer so by
defining all the parameters at start (even set to null) this wont allow me
do the testing required.

Any other suggestions would be great.

Thanks in advance,
Eddie

                                                                                   

 Eddie O'Sullivan                                                  (Embedded image 
 Application Performance                                            moved to file: 
 Group                                                               pic00542.gif) 

                                                                                   
 QAD Ireland Ltd.                            eos <at> qad.com                           
 Hamilton House                              Tel:  +353 61 213616                  
 National Technological Park                 http://www.qad.com/                   
  Limerick, Ireland                                                                

                                                                                   

 This e-mail may contain QAD                                                       
 proprietary information and                                                       
(Continue reading)

sebb | 1 Apr 2008 14:40
Picon

Re: How to load data from a file to SOAP Requests in JMeter

Or in this case StringFromFile might be simpler, just put

<data>${__StringFromFile(filename)}</data>

In either case, each line is a data item.

On 01/04/2008, Steve Kapinos <Steve.Kapinos <at> tandberg.com> wrote:
> Use a variable in the soap data part of the element surrounded by your
>  other relevant information.  Load that variable up from the file.. Say
>  using CSV data set elements.
>
>
>  -----Original Message-----
>  From: Joe Smithian [mailto:joe.smithian <at> gmail.com]
>  Sent: Tuesday, April 01, 2008 4:58 AM
>  To: JMeter Users List
>  Subject: Re: How to load data from a file to SOAP Requests in JMeter
>
>  Yes, I can load the whole SOAP request from a file but what I want is to
>  load only one 'Element'  of the SOAP request, which is my 'data'  to be
>  included in the SOAP Request, from a file. I can't load the whole SOAP
>  request from file because of the dependency among various SOAP request
>  and response messages in my test plan. In the following example, I want
>  to load only ${myData} from a file:
>  <soapenv>
>   <body>
>   <data>${myData} </data>
>  </body>
>  </soapenv>
>
(Continue reading)

sebb | 1 Apr 2008 14:35
Picon

Re: Property files question

On 01/04/2008, Krzysieq <krzysieq <at> gazeta.pl> wrote:
> Ok, I'll try to show some of the bigger picture. We have an internal tool
>  for management of property files. We use those files not only for tests, but
>  also for building our software. They are generated per-environment. Each
>  contains over 50 props, not all of which are relevant to the tests, but all
>  of them are different, or at least can be different, in each file. We also
>  have test campaigns that CruiseControl runs against different envirionments
>  - acceptance, integration and so on. Here our property files work fine
>  because there's no gui, and a set of tests is run only once.

Do all the files define the same set of property names?
If so, then what I suggested  will work.
If not, then you would need to extend the fix to first delete the
properties defined in the first file, before applying the properties
in the new file. This would mean keeping a copy of the currently
loaded properties separately from the JMeter properties.

>  To "emulate" that behavior in the gui mode, our jmeter files contain one
>  ugly walkaround. Each of them has a "user defined variables" element per
>  environment (gives us 4 sets of the same properties per jmx), which use the
>  syntax ${__P(property,default)} to use whatever comes from a file, or the
>  default value for the particular environment in case no prop file is
>  supplied (as in gui mode usually). Enable the one You want, disable the
>  rest, and You're testing the environment You want. This works, but is ugly
>  as hell and we'd like to drop it in favor of a cleaner solution. It's
>  possible to have 4 shortcuts on the desktop each starting jmeter with a
>  different property file. This is a solution, although not the prettiest
>  either, because then our tests start to depend on the configuration of the
>  machine, from which they are run.

(Continue reading)

sebb | 1 Apr 2008 14:48
Picon

Re: HTTP Request with increasing number of Parameters

This is not something JMeter is really designed for.

I assume you are using PUT here. You can use a file as the entire
contents of a PUT, so I suggest you create 100 files of increasing
size and use a counter to step through them.

Or you may be able to use the BeanShell pre-processor to update the
PUT parameters in the sampler. Someone familiar with Java would be
needed to do this.

On 01/04/2008, Eddie O'Sullivan <eos <at> qad.com> wrote:
> Hi Sebb,
>
>  Thanks for the reply. The thing is each iteration adds 63 new parameters
>  and I want to test for over 100 iterations (6300 parameters).
>
>  The aim of this test is the get response times as the URL gets longer so by
>  defining all the parameters at start (even set to null) this wont allow me
>  do the testing required.
>
>  Any other suggestions would be great.
>
>
>  Thanks in advance,
>  Eddie
>
>
>
>   Eddie O'Sullivan                                                  (Embedded image
>   Application Performance                                            moved to file:
(Continue reading)

Eddie O'Sullivan | 1 Apr 2008 18:24

Re: HTTP Request with increasing number of Parameters

Hi Sebb,

You are correct in assuming these are "PUT" statements.

I was thinking of using a file as well it just certain variables get set by
the server each iteration and will get a bit complicated maintaining these
in a file. I was looking for a quick approach and was thinking maybe JMeter
had some functionality I wasnt aware of that would do this.

I will go about with the file approach.

Thanks for the help,
Eddie

                                                                                   

 Eddie O'Sullivan                                                  (Embedded image 
 Application Performance                                            moved to file: 
 Group                                                               pic26835.gif) 

                                                                                   
 QAD Ireland Ltd.                            eos <at> qad.com                           
 Hamilton House                              Tel:  +353 61 213616                  
 National Technological Park                 http://www.qad.com/                   
  Limerick, Ireland                                                                

                                                                                   

 This e-mail may contain QAD                                                       
 proprietary information and                                                       
(Continue reading)

sebb | 1 Apr 2008 18:40
Picon

Re: HTTP Request with increasing number of Parameters

In 01/04/2008, Eddie O'Sullivan <eos <at> qad.com> wrote:
> Hi Sebb,
>
>  You are correct in assuming these are "PUT" statements.
>
>  I was thinking of using a file as well it just certain variables get set by
>  the server each iteration and will get a bit complicated maintaining these
>  in a file. I was looking for a quick approach and was thinking maybe JMeter
>  had some functionality I wasnt aware of that would do this.

Might be worth looking at BeanShell pre-processor if you have someone
who can do Java code. You could use JMeter to define the variable
parameters in terms of regex extracted variables, and just add the
padding using BeanShell.

>  I will go about with the file approach.
>
>  Thanks for the help,
>
> Eddie
>
>
>
>   Eddie O'Sullivan                                                  (Embedded image
>   Application Performance                                            moved to file:
>
>  Group                                                               pic26835.gif)
>
>
>
(Continue reading)

Divi | 2 Apr 2008 02:14

Need some Help with test code


I am having a test which assesses code methioned below..

ChartData data = null;
boolean isFourLimits =
fourLimitPtricNameMap.containsKey(parametricItem.getParametricName());
data = new ChartData(Title, cbmYData, longPtricMv, cbmTimestamp,
					shortPtricMv); 
It runs fine until boolean value and it gets boolean value also.
But it is not entering into ChartData() constructor.
Jar file that is used is having ChartData class.
I am unable to figure out why it's not entering into ChartData constructor.
When i run the same test in eclipse IDE i don't get this problem.
Can any one please suggest, what i am missing.

--

-- 
View this message in context: http://www.nabble.com/Need-some-Help-with-test-code-tp16432028p16432028.html
Sent from the JMeter - User mailing list archive at Nabble.com.

Gmane