Vasanth Dha Vasanth Dha - 5 months ago 26x
Java Question

Display success/Failure count in Swing Dialog box in Jmeter

enter image description here How to get the assertion result in JSR2233 Sampler or Beanshell Sampler,so that it would be helpful to show the total number of test case ,success test case ,failure test case in swing showMessageDialog, once testcase execution completed.


I am not really sure if I have understood question correctly!

You seem to be using JMeter for functional testing which is fine! I assume that each request (or Sampler) is a test case. If the below answer is not really you were looking for, provide more info.

setUp Thread Group:

I create these 2 variables in a Beanshell Sampler.

bsh.shared.success = 0; = 0;

Thread Group:

I add the below code to update success / fail count based on the assertion result in a Beanshell Listener.


tearDown Thread Group:

I finally display the Success and failed testcases count. You can use your Swing method here!"PASSED : " + bsh.shared.success);"FAILED : " +;

enter image description here