课程: JMeter: Performance and Load Testing

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Adding assertions

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…

内容