You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by David Patrick <da...@mac.com> on 2011/03/14 21:49:06 UTC

JMeter 101: Writing a value from Screen to a CSV File.

Hopefully a simple question that you will be able to help me with.

I have a script that is generating a series of New Orders against a web-based ordering system. On completion of process, the web page returns an Order number. I want to capture that Order number into a CSV file so that I can feed it into another script later that will simulate re-ordering.

The screen returns the text "Order Reference: XXXX" where XXXX is the number I want to store away.

so, I am looking for advice on:
(a) Reading the screen to put XXXX into a CSV File
and/or
(b) Reading the screen to put XXXX into a variable so I can extend the existing script to do both Order Creation and Re-Ordering.

I think something around REGEX should get me the value in it's self, but I cant work out the syntax of that or the next steps to output to a file.

Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility problems with the application service I am using, so upgrading is not an option at this time)

Cheers,
David

-- 
David Patrick
david.m1fcf@mac.com


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


Re: JMeter 101: Writing a value from Screen to a CSV File.

Posted by Prashanth Mylvarabatla <pr...@gmail.com>.
I have sent the resume to your id. Pls look at it and get back to me at the
earliest.

On Tue, Mar 15, 2011 at 2:19 AM, David Patrick <da...@mac.com> wrote:

> Hopefully a simple question that you will be able to help me with.
>
> I have a script that is generating a series of New Orders against a
> web-based ordering system. On completion of process, the web page returns an
> Order number. I want to capture that Order number into a CSV file so that I
> can feed it into another script later that will simulate re-ordering.
>
> The screen returns the text "Order Reference: XXXX" where XXXX is the
> number I want to store away.
>
> so, I am looking for advice on:
> (a) Reading the screen to put XXXX into a CSV File
> and/or
> (b) Reading the screen to put XXXX into a variable so I can extend the
> existing script to do both Order Creation and Re-Ordering.
>
> I think something around REGEX should get me the value in it's self, but I
> cant work out the syntax of that or the next steps to output to a file.
>
> Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility
> problems with the application service I am using, so upgrading is not an
> option at this time)
>
> Cheers,
> David
>
> --
> David Patrick
> david.m1fcf@mac.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: JMeter 101: Writing a value from Screen to a CSV File.

Posted by sebb <se...@gmail.com>.
On 14 March 2011 20:59, Deepak Shetty <sh...@gmail.com> wrote:
>>(a) Reading the screen to put XXXX
> Any Post processor (usually a regex post processor) can extract values from
> the response into  a variable , that is available for the rest of the test
>
>>into a CSV File
> For this you'd have to write java code(Do you want a sample?). Since you are
> going to do this in amulti threaded environment , you need to synchronize
> access. there are alternative available , for e.g. you can configure jmeter
> to write its variables into its result file(which can be CSV as well). you
> can then parse this file easily to extract what you want - this is the
> simplest if you arent a developer.

And if you add the regex extractor and a Simple Data Writer Listener
as a child of the sampler that retrieves the value, you can ensure
that you have one entry per sample. You can even use the config button
to remove most of the sample result columns from the output.

See http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
for how to use sample variables

>>(b) Reading the screen to put XXXX into a variable so I can extend the
> existing script to do both Order Creation and Re-Ordering.
> The post processor do allow this (provided the re-ordering is done in the
> same thread) . Are you facing issues here? If so what ?
> ThreadGroup
> +Sampler1
> ++Regex Post processor (extract Order number into say OrderNumber)
> +Sampler2 (use ${OrderNumber} to refer to variable - assuming single value
>
> regards
> deepak
>
> On Mon, Mar 14, 2011 at 1:49 PM, David Patrick <da...@mac.com> wrote:
>
>> Hopefully a simple question that you will be able to help me with.
>>
>> I have a script that is generating a series of New Orders against a
>> web-based ordering system. On completion of process, the web page returns an
>> Order number. I want to capture that Order number into a CSV file so that I
>> can feed it into another script later that will simulate re-ordering.
>>
>> The screen returns the text "Order Reference: XXXX" where XXXX is the
>> number I want to store away.
>>
>> so, I am looking for advice on:
>> (a) Reading the screen to put XXXX into a CSV File
>> and/or
>> (b) Reading the screen to put XXXX into a variable so I can extend the
>> existing script to do both Order Creation and Re-Ordering.
>>
>> I think something around REGEX should get me the value in it's self, but I
>> cant work out the syntax of that or the next steps to output to a file.
>>
>> Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility
>> problems with the application service I am using, so upgrading is not an
>> option at this time)
>>
>> Cheers,
>> David
>>
>> --
>> David Patrick
>> david.m1fcf@mac.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: JMeter 101: Writing a value from Screen to a CSV File.

Posted by David Patrick <da...@mac.com>.
Thanks all for the pointers - I knew there had to be at least one answer, and you guys have given me a few to ponder (and shown me just how much more I have to learn about JMeter!!)

-- 
David Patrick
david.m1fcf@mac.com

On 16 Mar 2011, at 13:54, Andrey Pohilko wrote:

> Hi,
> 
> I'm writing a Flexible File Writer listener for next version of 
> JMeterPLugins@GoogleCode. It cat write csv, too. 
> 
> Here's snapshot: http://code.google.com/p/jmeter-
> plugins/downloads/detail?name=JMeterPlugins-0.4.1-
> snapshot2.zip&can=1&q=#makechanges
> 
> I think this is the answer...
> 
> Bye,
> Andrey
> 
> В сообщении от 14 марта 2011 23:59:42 автор Deepak Shetty написал:
>>> (a) Reading the screen to put XXXX
>> 
>> Any Post processor (usually a regex post processor) can extract values from
>> the response into  a variable , that is available for the rest of the test
>> 
>>> into a CSV File
>> 
>> For this you'd have to write java code(Do you want a sample?). Since you
>> are going to do this in amulti threaded environment , you need to
>> synchronize access. there are alternative available , for e.g. you can
>> configure jmeter to write its variables into its result file(which can be
>> CSV as well). you can then parse this file easily to extract what you want
>> - this is the simplest if you arent a developer.
>> 
>>> (b) Reading the screen to put XXXX into a variable so I can extend the
>> 
>> existing script to do both Order Creation and Re-Ordering.
>> The post processor do allow this (provided the re-ordering is done in the
>> same thread) . Are you facing issues here? If so what ?
>> ThreadGroup
>> +Sampler1
>> ++Regex Post processor (extract Order number into say OrderNumber)
>> +Sampler2 (use ${OrderNumber} to refer to variable - assuming single value
>> 
>> regards
>> deepak
>> 
>> On Mon, Mar 14, 2011 at 1:49 PM, David Patrick <da...@mac.com> wrote:
>>> Hopefully a simple question that you will be able to help me with.
>>> 
>>> I have a script that is generating a series of New Orders against a
>>> web-based ordering system. On completion of process, the web page returns
>>> an Order number. I want to capture that Order number into a CSV file so
>>> that I can feed it into another script later that will simulate
>>> re-ordering.
>>> 
>>> The screen returns the text "Order Reference: XXXX" where XXXX is the
>>> number I want to store away.
>>> 
>>> so, I am looking for advice on:
>>> (a) Reading the screen to put XXXX into a CSV File
>>> and/or
>>> (b) Reading the screen to put XXXX into a variable so I can extend the
>>> existing script to do both Order Creation and Re-Ordering.
>>> 
>>> I think something around REGEX should get me the value in it's self, but
>>> I cant work out the syntax of that or the next steps to output to a
>>> file.
>>> 
>>> Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility
>>> problems with the application service I am using, so upgrading is not an
>>> option at this time)
>>> 
>>> Cheers,
>>> David
>>> 
>>> --
>>> David Patrick
>>> david.m1fcf@mac.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
> 


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


Re: JMeter 101: Writing a value from Screen to a CSV File.

Posted by Andrey Pohilko <ap...@apc.kg>.
Hi,

I'm writing a Flexible File Writer listener for next version of 
JMeterPLugins@GoogleCode. It cat write csv, too. 

Here's snapshot: http://code.google.com/p/jmeter-
plugins/downloads/detail?name=JMeterPlugins-0.4.1-
snapshot2.zip&can=1&q=#makechanges

I think this is the answer...

Bye,
Andrey

В сообщении от 14 марта 2011 23:59:42 автор Deepak Shetty написал:
> >(a) Reading the screen to put XXXX
> 
> Any Post processor (usually a regex post processor) can extract values from
> the response into  a variable , that is available for the rest of the test
> 
> >into a CSV File
> 
> For this you'd have to write java code(Do you want a sample?). Since you
> are going to do this in amulti threaded environment , you need to
> synchronize access. there are alternative available , for e.g. you can
> configure jmeter to write its variables into its result file(which can be
> CSV as well). you can then parse this file easily to extract what you want
> - this is the simplest if you arent a developer.
> 
> >(b) Reading the screen to put XXXX into a variable so I can extend the
> 
> existing script to do both Order Creation and Re-Ordering.
> The post processor do allow this (provided the re-ordering is done in the
> same thread) . Are you facing issues here? If so what ?
> ThreadGroup
> +Sampler1
> ++Regex Post processor (extract Order number into say OrderNumber)
> +Sampler2 (use ${OrderNumber} to refer to variable - assuming single value
> 
> regards
> deepak
> 
> On Mon, Mar 14, 2011 at 1:49 PM, David Patrick <da...@mac.com> wrote:
> > Hopefully a simple question that you will be able to help me with.
> > 
> > I have a script that is generating a series of New Orders against a
> > web-based ordering system. On completion of process, the web page returns
> > an Order number. I want to capture that Order number into a CSV file so
> > that I can feed it into another script later that will simulate
> > re-ordering.
> > 
> > The screen returns the text "Order Reference: XXXX" where XXXX is the
> > number I want to store away.
> > 
> > so, I am looking for advice on:
> > (a) Reading the screen to put XXXX into a CSV File
> > and/or
> > (b) Reading the screen to put XXXX into a variable so I can extend the
> > existing script to do both Order Creation and Re-Ordering.
> > 
> > I think something around REGEX should get me the value in it's self, but
> > I cant work out the syntax of that or the next steps to output to a
> > file.
> > 
> > Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility
> > problems with the application service I am using, so upgrading is not an
> > option at this time)
> > 
> > Cheers,
> > David
> > 
> > --
> > David Patrick
> > david.m1fcf@mac.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: JMeter 101: Writing a value from Screen to a CSV File.

Posted by Deepak Shetty <sh...@gmail.com>.
>(a) Reading the screen to put XXXX
Any Post processor (usually a regex post processor) can extract values from
the response into  a variable , that is available for the rest of the test

>into a CSV File
For this you'd have to write java code(Do you want a sample?). Since you are
going to do this in amulti threaded environment , you need to synchronize
access. there are alternative available , for e.g. you can configure jmeter
to write its variables into its result file(which can be CSV as well). you
can then parse this file easily to extract what you want - this is the
simplest if you arent a developer.

>(b) Reading the screen to put XXXX into a variable so I can extend the
existing script to do both Order Creation and Re-Ordering.
The post processor do allow this (provided the re-ordering is done in the
same thread) . Are you facing issues here? If so what ?
ThreadGroup
+Sampler1
++Regex Post processor (extract Order number into say OrderNumber)
+Sampler2 (use ${OrderNumber} to refer to variable - assuming single value

regards
deepak

On Mon, Mar 14, 2011 at 1:49 PM, David Patrick <da...@mac.com> wrote:

> Hopefully a simple question that you will be able to help me with.
>
> I have a script that is generating a series of New Orders against a
> web-based ordering system. On completion of process, the web page returns an
> Order number. I want to capture that Order number into a CSV file so that I
> can feed it into another script later that will simulate re-ordering.
>
> The screen returns the text "Order Reference: XXXX" where XXXX is the
> number I want to store away.
>
> so, I am looking for advice on:
> (a) Reading the screen to put XXXX into a CSV File
> and/or
> (b) Reading the screen to put XXXX into a variable so I can extend the
> existing script to do both Order Creation and Re-Ordering.
>
> I think something around REGEX should get me the value in it's self, but I
> cant work out the syntax of that or the next steps to output to a file.
>
> Am using JMeter2.3.2 (latest version 2.3.4 has been giving compatibility
> problems with the application service I am using, so upgrading is not an
> option at this time)
>
> Cheers,
> David
>
> --
> David Patrick
> david.m1fcf@mac.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>