You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Xueling Shu <xs...@roadie.com> on 2015/09/15 23:46:49 UTC
How to only record failed samplers in a result file via command line?
I am running tests via command line in the following format:
jmeter -n -t path/to/sample.jmx -l path/to/report.jtl
Only the failed samplers are expected to be logged in the result file. Tried a few tweaks in jmeter.properties…but still getting the full set of results (success + failure). How to get either one but not both?
There are the settings I have for saveservice. Any more flag I need to change?
# legitimate values: xml, csv, db. Only xml and csv are currently supported.
jmeter.save.saveservice.output_format=csv
# true when field should be saved; false otherwise
# assertion_results_failure_message only affects CSV output
jmeter.save.saveservice.assertion_results_failure_message=true
#
# legitimate values: none, first, all
#jmeter.save.saveservice.assertion_results=none
#
#jmeter.save.saveservice.data_type=true
#jmeter.save.saveservice.label=true
jmeter.save.saveservice.response_code=true
# response_data is not currently supported for CSV output
#jmeter.save.saveservice.response_data=false
# Save ResponseData for failed samples
jmeter.save.saveservice.response_data.on_error=true
jmeter.save.saveservice.response_message=true
jmeter.save.saveservice.successful=false
jmeter.save.saveservice.thread_name=true
#jmeter.save.saveservice.time=true
#jmeter.save.saveservice.subresults=true
jmeter.save.saveservice.assertions=true
#jmeter.save.saveservice.latency=true
#jmeter.save.saveservice.connect_time=false
jmeter.save.saveservice.samplerData=false
#jmeter.save.saveservice.responseHeaders=false
#jmeter.save.saveservice.requestHeaders=false
#jmeter.save.saveservice.encoding=false
#jmeter.save.saveservice.bytes=true
#jmeter.save.saveservice.url=false
#jmeter.save.saveservice.filename=false
#jmeter.save.saveservice.hostname=false
#jmeter.save.saveservice.thread_counts=true
#jmeter.save.saveservice.sample_count=false
#jmeter.save.saveservice.idle_time=false
Thanks.
Re: How to only record failed samplers in a result file via command line?
Posted by Deepak Shetty <sh...@gmail.com>.
Hi
>But what I really like to see is a flag to play with for the command line
purpose. That way we can move the same test plan everywhere >and run from
the command line by specifying any result file path there.
It is possible to pass in the result file name you want from command line
and configure the Listener to use that
something like
jmeter -n -t "./test.jmx" -Jresultfile=./test.jtl (or -G if distributed)
==> passes in a property called resultfile
And in your Listener for Filename use
${__property(resultfile,,./sensibledefault.jtl)} ==> saves the file to the
passed in location , uses sensible default if no value is specified for the
property (for e..g. if testing in GUI mode)
I dont see a way to do it the way you were trying.
regards
deepak
On Wed, Sep 16, 2015 at 7:55 AM, Xueling Shu <xs...@roadie.com> wrote:
> Thanks Deepak. I am aware of that approach and configured View Result Tree
> that way. But what I really like to see is a flag to play with for the
> command line purpose. That way we can move the same test plan everywhere
> and run from the command line by specifying any result file path there. But
> if the Listener way is the only option I will go with that.
>
> Thank you.
>
>
> > On Sep 16, 2015, at 10:35 AM, Deepak Shetty <sh...@gmail.com> wrote:
> >
> > One way is to add a Listener (e.g. Simple Data Writer but anyone should
> do)
> > to your test and Check the Log/Display for Errors and Uncheck for
> successes
> > and configure the path to be the result file you want and run that.
> > Will have to check if its possible via the saveservice flag
> >
> > On Tue, Sep 15, 2015 at 2:46 PM, Xueling Shu <xs...@roadie.com> wrote:
> >
> >> I am running tests via command line in the following format:
> >> jmeter -n -t path/to/sample.jmx -l path/to/report.jtl
> >>
> >> Only the failed samplers are expected to be logged in the result file.
> >> Tried a few tweaks in jmeter.properties…but still getting the full set
> of
> >> results (success + failure). How to get either one but not both?
> >>
> >> There are the settings I have for saveservice. Any more flag I need to
> >> change?
> >>
> >> # legitimate values: xml, csv, db. Only xml and csv are currently
> >> supported.
> >> jmeter.save.saveservice.output_format=csv
> >>
> >>
> >> # true when field should be saved; false otherwise
> >>
> >> # assertion_results_failure_message only affects CSV output
> >> jmeter.save.saveservice.assertion_results_failure_message=true
> >>
> >> #
> >> # legitimate values: none, first, all
> >> #jmeter.save.saveservice.assertion_results=none
> >> #
> >> #jmeter.save.saveservice.data_type=true
> >> #jmeter.save.saveservice.label=true
> >> jmeter.save.saveservice.response_code=true
> >> # response_data is not currently supported for CSV output
> >> #jmeter.save.saveservice.response_data=false
> >> # Save ResponseData for failed samples
> >> jmeter.save.saveservice.response_data.on_error=true
> >> jmeter.save.saveservice.response_message=true
> >> jmeter.save.saveservice.successful=false
> >> jmeter.save.saveservice.thread_name=true
> >> #jmeter.save.saveservice.time=true
> >> #jmeter.save.saveservice.subresults=true
> >> jmeter.save.saveservice.assertions=true
> >> #jmeter.save.saveservice.latency=true
> >> #jmeter.save.saveservice.connect_time=false
> >> jmeter.save.saveservice.samplerData=false
> >> #jmeter.save.saveservice.responseHeaders=false
> >> #jmeter.save.saveservice.requestHeaders=false
> >> #jmeter.save.saveservice.encoding=false
> >> #jmeter.save.saveservice.bytes=true
> >> #jmeter.save.saveservice.url=false
> >> #jmeter.save.saveservice.filename=false
> >> #jmeter.save.saveservice.hostname=false
> >> #jmeter.save.saveservice.thread_counts=true
> >> #jmeter.save.saveservice.sample_count=false
> >> #jmeter.save.saveservice.idle_time=false
> >>
> >> Thanks.
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
Re: How to only record failed samplers in a result file via command line?
Posted by Xueling Shu <xs...@roadie.com>.
Thanks Deepak. I am aware of that approach and configured View Result Tree that way. But what I really like to see is a flag to play with for the command line purpose. That way we can move the same test plan everywhere and run from the command line by specifying any result file path there. But if the Listener way is the only option I will go with that.
Thank you.
> On Sep 16, 2015, at 10:35 AM, Deepak Shetty <sh...@gmail.com> wrote:
>
> One way is to add a Listener (e.g. Simple Data Writer but anyone should do)
> to your test and Check the Log/Display for Errors and Uncheck for successes
> and configure the path to be the result file you want and run that.
> Will have to check if its possible via the saveservice flag
>
> On Tue, Sep 15, 2015 at 2:46 PM, Xueling Shu <xs...@roadie.com> wrote:
>
>> I am running tests via command line in the following format:
>> jmeter -n -t path/to/sample.jmx -l path/to/report.jtl
>>
>> Only the failed samplers are expected to be logged in the result file.
>> Tried a few tweaks in jmeter.properties…but still getting the full set of
>> results (success + failure). How to get either one but not both?
>>
>> There are the settings I have for saveservice. Any more flag I need to
>> change?
>>
>> # legitimate values: xml, csv, db. Only xml and csv are currently
>> supported.
>> jmeter.save.saveservice.output_format=csv
>>
>>
>> # true when field should be saved; false otherwise
>>
>> # assertion_results_failure_message only affects CSV output
>> jmeter.save.saveservice.assertion_results_failure_message=true
>>
>> #
>> # legitimate values: none, first, all
>> #jmeter.save.saveservice.assertion_results=none
>> #
>> #jmeter.save.saveservice.data_type=true
>> #jmeter.save.saveservice.label=true
>> jmeter.save.saveservice.response_code=true
>> # response_data is not currently supported for CSV output
>> #jmeter.save.saveservice.response_data=false
>> # Save ResponseData for failed samples
>> jmeter.save.saveservice.response_data.on_error=true
>> jmeter.save.saveservice.response_message=true
>> jmeter.save.saveservice.successful=false
>> jmeter.save.saveservice.thread_name=true
>> #jmeter.save.saveservice.time=true
>> #jmeter.save.saveservice.subresults=true
>> jmeter.save.saveservice.assertions=true
>> #jmeter.save.saveservice.latency=true
>> #jmeter.save.saveservice.connect_time=false
>> jmeter.save.saveservice.samplerData=false
>> #jmeter.save.saveservice.responseHeaders=false
>> #jmeter.save.saveservice.requestHeaders=false
>> #jmeter.save.saveservice.encoding=false
>> #jmeter.save.saveservice.bytes=true
>> #jmeter.save.saveservice.url=false
>> #jmeter.save.saveservice.filename=false
>> #jmeter.save.saveservice.hostname=false
>> #jmeter.save.saveservice.thread_counts=true
>> #jmeter.save.saveservice.sample_count=false
>> #jmeter.save.saveservice.idle_time=false
>>
>> Thanks.
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: How to only record failed samplers in a result file via command line?
Posted by Deepak Shetty <sh...@gmail.com>.
One way is to add a Listener (e.g. Simple Data Writer but anyone should do)
to your test and Check the Log/Display for Errors and Uncheck for successes
and configure the path to be the result file you want and run that.
Will have to check if its possible via the saveservice flag
On Tue, Sep 15, 2015 at 2:46 PM, Xueling Shu <xs...@roadie.com> wrote:
> I am running tests via command line in the following format:
> jmeter -n -t path/to/sample.jmx -l path/to/report.jtl
>
> Only the failed samplers are expected to be logged in the result file.
> Tried a few tweaks in jmeter.properties…but still getting the full set of
> results (success + failure). How to get either one but not both?
>
> There are the settings I have for saveservice. Any more flag I need to
> change?
>
> # legitimate values: xml, csv, db. Only xml and csv are currently
> supported.
> jmeter.save.saveservice.output_format=csv
>
>
> # true when field should be saved; false otherwise
>
> # assertion_results_failure_message only affects CSV output
> jmeter.save.saveservice.assertion_results_failure_message=true
>
> #
> # legitimate values: none, first, all
> #jmeter.save.saveservice.assertion_results=none
> #
> #jmeter.save.saveservice.data_type=true
> #jmeter.save.saveservice.label=true
> jmeter.save.saveservice.response_code=true
> # response_data is not currently supported for CSV output
> #jmeter.save.saveservice.response_data=false
> # Save ResponseData for failed samples
> jmeter.save.saveservice.response_data.on_error=true
> jmeter.save.saveservice.response_message=true
> jmeter.save.saveservice.successful=false
> jmeter.save.saveservice.thread_name=true
> #jmeter.save.saveservice.time=true
> #jmeter.save.saveservice.subresults=true
> jmeter.save.saveservice.assertions=true
> #jmeter.save.saveservice.latency=true
> #jmeter.save.saveservice.connect_time=false
> jmeter.save.saveservice.samplerData=false
> #jmeter.save.saveservice.responseHeaders=false
> #jmeter.save.saveservice.requestHeaders=false
> #jmeter.save.saveservice.encoding=false
> #jmeter.save.saveservice.bytes=true
> #jmeter.save.saveservice.url=false
> #jmeter.save.saveservice.filename=false
> #jmeter.save.saveservice.hostname=false
> #jmeter.save.saveservice.thread_counts=true
> #jmeter.save.saveservice.sample_count=false
> #jmeter.save.saveservice.idle_time=false
>
> Thanks.
>
>