1

Looking at the discussion jmeter-how-to-not-fail-500-internal-server-errors, I'd like to know when should I use a Response Assertion vs. when to use a Beanshell PostProcessor for validating my negative test: is there a Best Practice?

Any insight is appreciated. Thanks.

Community
  • 1
  • 1
David
  • 417
  • 5
  • 17

2 Answers2

2

There is: avoid scripting where possible. If you can use Response Assertion to accomplish your scenario - go for it.

A couple of best practices references:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

Basically I just support what Dmitri T posted, but have some additional info, since you asked for any insight.

Best practice is to use the jmeter built in assertion when one exists. There are a few good reasons to go with built in functions.

  • Why re-invent the wheel? Why do that work?
  • Its going to help you learn what built in tools are available.
  • It may to make it easier for others who know jmeter to read your tests
Dan
  • 421
  • 5
  • 12