You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/12/20 10:34:16 UTC

[Bug 54333] New: Ability to suppress generation of specific samples

https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

            Bug ID: 54333
           Summary: Ability to suppress generation of specific samples
           Product: JMeter
           Version: 2.6
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: haridara@gmail.com
    Classification: Unclassified

I would like to request the ability to programmatically mark specific samples
to be not recorded. Looking at the code, this could be very straight-forward.
E.g., in JMeterThread.process_sample(), call threadContext.getPreviousResult()
right before calling notifyListeners() and skip it if is null. This way, a
BeanShellAssertion could call ctx.setPreviousResult(null).

BTW, in the documentation at
http://jmeter.apache.org/usermanual/test_plan.html#executionorder it indicates
that the listeners are skipped if SampleResult is null, but I don't see the
check in the code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

--- Comment #5 from Sebb <se...@apache.org> ---
Note that a SetUp group should normally be used for this purpose, in which case
the samples will not be saved by Listeners in t5he main thread group.

Also only Samplers generate samples, so it is possible to use (e.g.) a
BeanShell PreProcessor to do the setup.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to comment #0)
> I would like to request the ability to programmatically mark specific
> samples to be not recorded. Looking at the code, this could be very
> straight-forward. E.g., in JMeterThread.process_sample(), call
> threadContext.getPreviousResult() right before calling notifyListeners() and
> skip it if is null. This way, a BeanShellAssertion could call
> ctx.setPreviousResult(null).
> 

Currently you can ignore Requests using include/exclude patterns in JMeter
Proxy Server. 
Can you clarify why you would want to do that ?

> BTW, in the documentation at
> http://jmeter.apache.org/usermanual/test_plan.html#executionorder it
> indicates that the listeners are skipped if SampleResult is null, but I
> don't see the check in the code.

Can you point to the exact phrase that says that ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Notes from duplocate bug

Sometimes it is desirable to ignore particular samples where you do some setup
that is not interesting to be recorded. For example login and similar. Changing
layout of test plan often does not look nice.

I think org.apache.jmeter.samplers.SampleResult can be extended to have a
property ignore or ignoreByListeners. For scripting samplers one can set that
property. And for other samplers the transaction controller can be extended to
support marking it's parent sample to be ignored so one can put any samples to
be ignored under a transaction controller.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |akostadinov@gmail.com

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
*** Bug 54846 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |54846

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54333] Ability to suppress generation of specific samples

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54333

Hari Krishna Dara <ha...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Hari Krishna Dara <ha...@gmail.com> ---
(In reply to comment #1)
> Currently you can ignore Requests using include/exclude patterns in JMeter
> Proxy Server. 
> Can you clarify why you would want to do that ?

I am not talking about the recording time... but rather at runtime,
specifically when using BeanShell elements such as "BeanShell Assertion",
"BeanShell Sampler". These are really useful to manipulate the run and go
beyond the standard behavior, and I would like that to include the control on
whether sample should be recorded or not. Right now, TestAction is the only one
that doesn't appear in the results, this is because, it's sample() method
unconditionally returns null for result. If I can manipulate the result the way
I was suggesting before, or even mark it as to be discarded (e.g., by calling
SampleResult.setDiscard(true)), it will provide an option to control their
appearance in the final results.

> 
> > BTW, in the documentation at
> > http://jmeter.apache.org/usermanual/test_plan.html#executionorder it
> > indicates that the listeners are skipped if SampleResult is null, but I
> > don't see the check in the code.
> 
> Can you point to the exact phrase that says that ?

I was referring to this: "unless SampleResult is null"

However, I found the code in JMeterThread that checks the result for null and
skip the documented steps, so there is nothing wrong here.

-- 
You are receiving this mail because:
You are the assignee for the bug.