You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sudhir cheemalavagupalli <cs...@gmail.com> on 2006/03/04 11:45:28 UTC

Can we save values extracted by a reg expression

    I'm not having much knowledge in JMeter.I'm facing an issue, I'm
using a regular expression, within which i am getting values created
by the system. After creation, they stores in database. Now i want to
save them in a file, so that i can use that file (for eg. CSV file)
for other test plans as input. This is my requirement. Is it possible
to do? Can we save Regular expression values to a file?

    Advance thanks to everybody who helps me.

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


Re: Can we save values extracted by a reg expression

Posted by sudhir cheemalavagupalli <cs...@gmail.com>.
I don't know where i have to paste these functions in JMeter. I mean
in JMeter UI i'm not able to find out where we have to use these
functions.



On 3/5/06, sebb <se...@gmail.com> wrote:
> There are ways to write the values of variables (or other text) to
> files, but all require some extra work currently.
>
> The log() and logn() functions can write a line to jmeter.log. You
> would have to extract the information from the file after the run.
>
> Another way of writing to a file is to create a sample result, and use
> a Listener to write the result to a file.
>
> The easiest way to do this is probably to use the Java Sampler.
> You can then attach a Listener to it; by suitable choice of
> configuration you may be able to write only the items you want, or you
> may have to process the file further.
>
> However, this sample will also appear in any other listeners in scope;
> it may or may not be possible to arrange the test plan so that there
> is a separate scope for the Java Sampler; it is certainly likely to
> complicate the testplan.
>
> Or you could use the BeanShell function or BeanShell Assertion. These
> don't generate automatic sample results. You can write whatever Java
> code you like in them, so you can write to a file.
>
> S.
> On 05/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
> > I know we can go and get values from database. But, what i want is,
> > Can we directly save in a file from JMeter, while it is saving the
> > values to the database.
> > I mean the values should be saved in database as well as in a file
> > simultaneously.
> >
> > Is it possible with JMeter?
> >
> >
> > On 3/4/06, sebb <se...@gmail.com> wrote:
> > > Why not just extract the values from the database?
> > >
> > > S.
> > > On 04/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
> > > >     I'm not having much knowledge in JMeter.I'm facing an issue, I'm
> > > > using a regular expression, within which i am getting values created
> > > > by the system. After creation, they stores in database. Now i want to
> > > > save them in a file, so that i can use that file (for eg. CSV file)
> > > > for other test plans as input. This is my requirement. Is it possible
> > > > to do? Can we save Regular expression values to a file?
> > > >
> > > >     Advance thanks to everybody who helps me.
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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: Can we save values extracted by a reg expression

Posted by sebb <se...@gmail.com>.
There are ways to write the values of variables (or other text) to
files, but all require some extra work currently.

The log() and logn() functions can write a line to jmeter.log. You
would have to extract the information from the file after the run.

Another way of writing to a file is to create a sample result, and use
a Listener to write the result to a file.

The easiest way to do this is probably to use the Java Sampler.
You can then attach a Listener to it; by suitable choice of
configuration you may be able to write only the items you want, or you
may have to process the file further.

However, this sample will also appear in any other listeners in scope;
it may or may not be possible to arrange the test plan so that there
is a separate scope for the Java Sampler; it is certainly likely to
complicate the testplan.

Or you could use the BeanShell function or BeanShell Assertion. These
don't generate automatic sample results. You can write whatever Java
code you like in them, so you can write to a file.

S.
On 05/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
> I know we can go and get values from database. But, what i want is,
> Can we directly save in a file from JMeter, while it is saving the
> values to the database.
> I mean the values should be saved in database as well as in a file
> simultaneously.
>
> Is it possible with JMeter?
>
>
> On 3/4/06, sebb <se...@gmail.com> wrote:
> > Why not just extract the values from the database?
> >
> > S.
> > On 04/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
> > >     I'm not having much knowledge in JMeter.I'm facing an issue, I'm
> > > using a regular expression, within which i am getting values created
> > > by the system. After creation, they stores in database. Now i want to
> > > save them in a file, so that i can use that file (for eg. CSV file)
> > > for other test plans as input. This is my requirement. Is it possible
> > > to do? Can we save Regular expression values to a file?
> > >
> > >     Advance thanks to everybody who helps me.
> > >
> > > ---------------------------------------------------------------------
> > > 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
>
>

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


Re: Can we save values extracted by a reg expression

Posted by sudhir cheemalavagupalli <cs...@gmail.com>.
I know we can go and get values from database. But, what i want is,
Can we directly save in a file from JMeter, while it is saving the
values to the database.
I mean the values should be saved in database as well as in a file
simultaneously.

Is it possible with JMeter?


On 3/4/06, sebb <se...@gmail.com> wrote:
> Why not just extract the values from the database?
>
> S.
> On 04/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
> >     I'm not having much knowledge in JMeter.I'm facing an issue, I'm
> > using a regular expression, within which i am getting values created
> > by the system. After creation, they stores in database. Now i want to
> > save them in a file, so that i can use that file (for eg. CSV file)
> > for other test plans as input. This is my requirement. Is it possible
> > to do? Can we save Regular expression values to a file?
> >
> >     Advance thanks to everybody who helps me.
> >
> > ---------------------------------------------------------------------
> > 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: Can we save values extracted by a reg expression

Posted by sebb <se...@gmail.com>.
Why not just extract the values from the database?

S.
On 04/03/06, sudhir cheemalavagupalli <cs...@gmail.com> wrote:
>     I'm not having much knowledge in JMeter.I'm facing an issue, I'm
> using a regular expression, within which i am getting values created
> by the system. After creation, they stores in database. Now i want to
> save them in a file, so that i can use that file (for eg. CSV file)
> for other test plans as input. This is my requirement. Is it possible
> to do? Can we save Regular expression values to a file?
>
>     Advance thanks to everybody who helps me.
>
> ---------------------------------------------------------------------
> 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