Rock
Rock

Reputation: 159

Compare two CSV file in JMeter

I have two CSV file, one is to read the data and another is to compare the data, I am able to read the data from CSV file, now the response which comes from server I want to compare that response in another CSV File.enter image description here

Upvotes: 0

Views: 248

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

You can do this using Response Assertion which can be applied either to the whole response body:

enter image description here

or you can compare 2 JMeter Variables originating from different CSV files:

enter image description here

Also you have various comparison options like:

  • using regular expressions for "contains" and "matches" modes
  • using strings for "substring" mode (don't be confused with "contains" as they're different beasts)
  • Checking whether expected and actual result are equal
  • Providing more than one expected criteria
  • Use clauses like "Not" and "Or"
  • etc.

More information: Response Assertions in JMeter 3.2 - New and Improved

Upvotes: 1

Related Questions