Bug 52497 - Improve DebugSampler and DebugPostProcessor
Summary: Improve DebugSampler and DebugPostProcessor
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Keywords: PatchAvailable
Depends on:
Reported: 2012-01-22 15:57 UTC by Rainer Jung
Modified: 2012-01-26 20:14 UTC (History)
0 users

Implementation of improvements (13.27 KB, patch)
2012-01-22 15:57 UTC, Rainer Jung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2012-01-22 15:57:35 UTC
Created attachment 28187 [details]
Implementation of improvements

Some improvements for DebugSampler and DebugPostProcessor:

- set reponse code and message using setResponseOK()

When doing web testing, one often adds a global reponse assertion testing for the HTTP status code. Currently those elements do generate a sampler result without setting the code. Thus they are shown as red in the results tree.

- add output data available in DebugSampler also to DebugPostProcessor

PostProcessors can be defined globally and JMeter automatically adds them to each Sampler. A similar feature for Samplers does IMHO not exist. When debugging a test plan, it is useful to have the full output of variables and properties available after each sample. An easy way to di it, is adding this data to DebugPostProcessor and then defining that DebugPostProcessir globally in the plan. When the plan works, one can simply disable the DebugPostProcessor.

I made all four types of data configurable similar to DebugSampler and added the properties for various languages:

  - Sampler Properties (default true)
  - JMeter Properties (default false)
  - JMeter Variable (default true)
  - System Properties (default false)

- sort the sampler properties output in DebugPostProcessor

- add sample start and end to the sample generated by the DebugPostProcessor

One thing is not contained in the patch:

- update docs including screenshots

Finally a warning: a globally defined PostProcessor will IMHO always run before any PostProcessor explicitely added to a sampler. So a globally defined DebugPostProcessor will e.g. not correctly show the result of a JMeter variable just extacted via a reular expression from a sample. It will only show that variable correctly in the output for the following sampler.

Don't know whether there's a way to influence the order, but IMHO it's not a showstopper, because one can look up the values in the next sampler's DebugPostProcessor output.


Comment 1 Sebb 2012-01-26 20:14:39 UTC
Thanks, a useful fix and good improvements.

I've applied them to SVN:

URL: http://svn.apache.org/viewvc?rev=1236372&view=rev
Bug 52497 - Improve DebugSampler and DebugPostProcessor

Comment 2 The ASF infrastructure team 2022-09-24 20:37:48 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2709