3

I want that some beanshell samplers of my testplan should not be shown in view results tree. Is that somehow possible?

Best regards, Peter

Peter
  • 1,011
  • 2
  • 16
  • 39

5 Answers5

6

In your case, you can add the below line directly to your script:

SampleResult.setIgnore();

Then your BeanShell samplers won't show in the view results tree.

Also, for any controller you can add a child JSR223 PostProcessor under it and add the following script:

prev.setIgnore();
Sean
  • 45
  • 7
Masud Jahan
  • 3,418
  • 2
  • 22
  • 35
5

No, It is not possible.

If I want to hide the sampler, I will try to see If I could use Beanshell preprocessor or Beanshell post processor instead of Beanshell sampler.

vins
  • 15,030
  • 3
  • 36
  • 47
2

Beanshell preprocessor should be used instead of beanshell sampler. It doesn't appear in the result tree.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
aka
  • 81
  • 1
  • 3
-1

AFAIK the only way is to disable them. Then they do not execute and therefore are not shown in the results.

automatictester
  • 2,436
  • 1
  • 19
  • 34
  • Disabling the Beanshell does not serve the purpose. Beanshell should be executed but the result should not be displayed in the result tree. ```SampleResult.setIgnore();``` and ```prev.setIgnore(); ``` are better implementations. – Janesh Kodikara Jul 28 '21 at 08:31
-1

I agree that a pre or post processor is the best solution, but not always viable.

In my case my test plan runs 1 of about 20 random tests each iteration. Putting a pre or post action on each of these is technically possible, but creates a significant maintenance overhead. The SampleResult.setIgnore(); solution worked in this case as I only had a single sampler to ignore.

Tim H
  • 51
  • 1
  • 2