You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by prasanna bhat <pr...@gmail.com> on 2010/05/10 16:25:50 UTC

Logging addition test data into the XML results file.

Hi,

Currently, by entering a file name in a Aggregate Report Listener generates
a xml file containing following vales.

<sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC Request"
rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"/>

Is it possible to override this format to include an additional attribute
whose value can be specified in the run time.

for e.g: <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC
Request" rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967" *
id="12345"* />

If this is not possible then can i use the log object available in Bean
Shell sampler to log (but not in the jmeter log file) only the required test
data.

logIds.txt

id=1111
id=2222
id=3333


The intention is to create a report containing some of the test data along
with test results. Please let me if this can achieve this in any other ways.

Thanks,
Prasanna

Re: Logging addition test data into the XML results file.

Posted by sebb <se...@gmail.com>.
On 10/05/2010, prasanna bhat <pr...@gmail.com> wrote:
> It worked partially for me Sebb.
>
>  In my testplan
>
>  +ThreadGroup
>  ++Counter [Config Element]
>  ++Bean Shell Sampler
>  ++Aggregate Report
>
>  I'm referencing the counter variable as doc_id and also i'm setting another
>  variable in the Bean Shell sampler as vars.put("doc_name", doc_name);
>

What is the contents of the doc_name variable?

>
>  In the JMeter.properties file i edited the following line:
>  sample_variables=doc_id,doc_name
>
>  With this in place, the results file (.jtl) displays only the value of
>  doc_id and not doc_name.
>
>  <sample t="638" lt="0" ts="1273504342118" s="true"
>  lb="JavaClassToReadFromDB" rc="200" rm="OK" tn="DB_Thread Group 1-1"
>  dt="text" by="0" doc__id="5"  *doc__name=""*/>

doc__name != doc_name

>  Is there any thing wrong in what i'm doing??

Add a Debug Sampler to check the variables.

>  Thanks,
>  Prasanna
>
>
>
>  On Mon, May 10, 2010 at 8:19 PM, sebb <se...@gmail.com> wrote:
>
>  > http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
>  >
>  > On 10/05/2010, prasanna bhat <pr...@gmail.com> wrote:
>  > > Hi,
>  > >
>  > >  Currently, by entering a file name in a Aggregate Report Listener
>  > generates
>  > >  a xml file containing following vales.
>  > >
>  > >  <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC Request"
>  > >  rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"/>
>  > >
>  > >  Is it possible to override this format to include an additional
>  > attribute
>  > >  whose value can be specified in the run time.
>  > >
>  > >  for e.g: <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC
>  > >  Request" rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967" *
>  > >  id="12345"* />
>  > >
>  > >  If this is not possible then can i use the log object available in Bean
>  > >  Shell sampler to log (but not in the jmeter log file) only the required
>  > test
>  > >  data.
>  > >
>  > >  logIds.txt
>  > >
>  > >  id=1111
>  > >  id=2222
>  > >  id=3333
>  > >
>  > >
>  > >  The intention is to create a report containing some of the test data
>  > along
>  > >  with test results. Please let me if this can achieve this in any other
>  > ways.
>  > >
>  > >  Thanks,
>  > >
>  > > Prasanna
>  > >
>  >
>
> > ---------------------------------------------------------------------
>  > 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: Logging addition test data into the XML results file.

Posted by prasanna bhat <pr...@gmail.com>.
Sorry Sebb, a huge mistake from my side. I probably did not restart the
JMeter instance.

That was indeed a great help.

Thanks,
Prasanna

On Mon, May 10, 2010 at 8:48 PM, prasanna bhat <pr...@gmail.com>wrote:

> It worked partially for me Sebb.
>
> In my testplan
>
> +ThreadGroup
> ++Counter [Config Element]
> ++Bean Shell Sampler
> ++Aggregate Report
>
> I'm referencing the counter variable as doc_id and also i'm setting another
> variable in the Bean Shell sampler as vars.put("doc_name", doc_name);
>
>
> In the JMeter.properties file i edited the following line:
> sample_variables=doc_id,doc_name
>
> With this in place, the results file (.jtl) displays only the value of
> doc_id and not doc_name.
>
> <sample t="638" lt="0" ts="1273504342118" s="true"
> lb="JavaClassToReadFromDB" rc="200" rm="OK" tn="DB_Thread Group 1-1"
> dt="text" by="0" doc__id="5"  *doc__name=""*/>
>
> Is there any thing wrong in what i'm doing??
>
> Thanks,
> Prasanna
>
>
>
> On Mon, May 10, 2010 at 8:19 PM, sebb <se...@gmail.com> wrote:
>
>>
>> http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
>>
>> On 10/05/2010, prasanna bhat <pr...@gmail.com> wrote:
>> > Hi,
>> >
>> >  Currently, by entering a file name in a Aggregate Report Listener
>> generates
>> >  a xml file containing following vales.
>> >
>> >  <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC Request"
>> >  rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"/>
>> >
>> >  Is it possible to override this format to include an additional
>> attribute
>> >  whose value can be specified in the run time.
>> >
>> >  for e.g: <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC
>> >  Request" rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"
>> *
>> >  id="12345"* />
>> >
>> >  If this is not possible then can i use the log object available in Bean
>> >  Shell sampler to log (but not in the jmeter log file) only the required
>> test
>> >  data.
>> >
>> >  logIds.txt
>> >
>> >  id=1111
>> >  id=2222
>> >  id=3333
>> >
>> >
>> >  The intention is to create a report containing some of the test data
>> along
>> >  with test results. Please let me if this can achieve this in any other
>> ways.
>> >
>> >  Thanks,
>> >
>> > Prasanna
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>

Re: Logging addition test data into the XML results file.

Posted by prasanna bhat <pr...@gmail.com>.
It worked partially for me Sebb.

In my testplan

+ThreadGroup
++Counter [Config Element]
++Bean Shell Sampler
++Aggregate Report

I'm referencing the counter variable as doc_id and also i'm setting another
variable in the Bean Shell sampler as vars.put("doc_name", doc_name);


In the JMeter.properties file i edited the following line:
sample_variables=doc_id,doc_name

With this in place, the results file (.jtl) displays only the value of
doc_id and not doc_name.

<sample t="638" lt="0" ts="1273504342118" s="true"
lb="JavaClassToReadFromDB" rc="200" rm="OK" tn="DB_Thread Group 1-1"
dt="text" by="0" doc__id="5"  *doc__name=""*/>

Is there any thing wrong in what i'm doing??

Thanks,
Prasanna


On Mon, May 10, 2010 at 8:19 PM, sebb <se...@gmail.com> wrote:

> http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
>
> On 10/05/2010, prasanna bhat <pr...@gmail.com> wrote:
> > Hi,
> >
> >  Currently, by entering a file name in a Aggregate Report Listener
> generates
> >  a xml file containing following vales.
> >
> >  <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC Request"
> >  rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"/>
> >
> >  Is it possible to override this format to include an additional
> attribute
> >  whose value can be specified in the run time.
> >
> >  for e.g: <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC
> >  Request" rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967" *
> >  id="12345"* />
> >
> >  If this is not possible then can i use the log object available in Bean
> >  Shell sampler to log (but not in the jmeter log file) only the required
> test
> >  data.
> >
> >  logIds.txt
> >
> >  id=1111
> >  id=2222
> >  id=3333
> >
> >
> >  The intention is to create a report containing some of the test data
> along
> >  with test results. Please let me if this can achieve this in any other
> ways.
> >
> >  Thanks,
> >
> > Prasanna
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Logging addition test data into the XML results file.

Posted by sebb <se...@gmail.com>.
http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables

On 10/05/2010, prasanna bhat <pr...@gmail.com> wrote:
> Hi,
>
>  Currently, by entering a file name in a Aggregate Report Listener generates
>  a xml file containing following vales.
>
>  <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC Request"
>  rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967"/>
>
>  Is it possible to override this format to include an additional attribute
>  whose value can be specified in the run time.
>
>  for e.g: <sample t="106" lt="0" ts="1273126940642" s="true" lb="JDBC
>  Request" rc="200" rm="OK" tn="DocumentReader 1-1" dt="text" by="36967" *
>  id="12345"* />
>
>  If this is not possible then can i use the log object available in Bean
>  Shell sampler to log (but not in the jmeter log file) only the required test
>  data.
>
>  logIds.txt
>
>  id=1111
>  id=2222
>  id=3333
>
>
>  The intention is to create a report containing some of the test data along
>  with test results. Please let me if this can achieve this in any other ways.
>
>  Thanks,
>
> Prasanna
>

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