Other BeanShell Commands Let us add a bean shell post processor to our request and then we type the below commands.
System.out.println(ctx.getPreviousResult().getContentType());
System.out.println(ctx.getPreviousResult().getBodySizeAsLong());
System.out.println(ctx.getPreviousResult().getHeadersSize());
System.out.println(ctx.getPreviousResult().getThreadName());
System.out.println("Start this particular user to in the thread to hit the request "+ctx.getPreviousResult().getStartTime());
System.out.println("End time at which this user in the threadhit the request "+ctx.getPreviousResult().getEndTime());
System.out.println("Total time by this user in the thread to complete the reuqest "+ctx.getPreviousResult().getTime());
System.out.println("The url this request is hitting "+ctx.getPreviousResult().getUrlAsString());
System.out.println("Total errors on this page "+ctx.getPreviousResult().getErrorCount());
System.out.println("Latency "+ctx.getPreviousResult().getLatency());
Most of tthe above lines are self explanatory.
Please note we added these lines in beanshell post processor to print them in cmd and check the results.
We can instead add them in our bean shell assertion and compare them to the actual results we want and then we can see if our assertion has passed or failed.