Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve DebugSampler and DebugPostProcessor #2709

Closed
asfimport opened this issue Jan 22, 2012 · 1 comment
Closed

Improve DebugSampler and DebugPostProcessor #2709

asfimport opened this issue Jan 22, 2012 · 1 comment

Comments

@asfimport
Copy link
Collaborator

Rainer Jung (Bug 52497):
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

Created attachment DebugSampler_DebugPreProcessor.patch: Implementation of improvements

Version: Nightly
OS: All

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Thanks, a useful fix and good improvements.

I've applied them to SVN:

URL: http://svn.apache.org/viewvc?rev=1236372&view=rev
Log:
#2709 - 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant