Bug 52497 - Improve DebugSampler and DebugPostProcessor
Improve DebugSampler and DebugPostProcessor
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
Nightly (Please specify date)
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-01-22 15:57 UTC by Rainer Jung
Modified: 2012-01-26 20:14 UTC (History)
0 users



Attachments
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.

Regards,

Rainer
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
Log:
Bug 52497 - Improve DebugSampler and DebugPostProcessor

Modified:
   jmeter/trunk/docs/images/screenshots/debug_postprocessor.png
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorBeanInfo.java
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorResources.properties
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorResources_de.properties
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorResources_fr.properties
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorResources_pt_BR.properties
   jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessorResources_tr.properties
   jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java
   jmeter/trunk/xdocs/changes.xml
   jmeter/trunk/xdocs/images/screenshots/debug_postprocessor.png
   jmeter/trunk/xdocs/usermanual/component_reference.xml