From the course: JMeter: Performance and Load Testing
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Adding assertions - Apache JMeter Tutorial
From the course: JMeter: Performance and Load Testing
Adding assertions
- [Instructor] I now need to know that my results are correct. Sure, it's easy to see a green tick and assume that they're correct, but it's better to have assertions every now and then to ensure that what you're wanting to happen actually did. If I click on the view results tree and select one of the results that came back, I can see that the response code came back as a 200 OK. This is good, because if the site were down, then we'd get a failure. But what if I wanted to check another response code was being sent back through? What if I wanted to know that a redirect was happening before the 200 OK? Adding an assertion lets me be sure that something is happening that I specify. This can be positive or negative. I can add assertions on lots of things like the context of a site, their response, the load time, the headers, loads of stuff. Adding an assertion is simple. All I need to do is right click on the step I want the assertion to be associated with. In this case it's the HTTP…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.