Search code examples
jmeterperformance-testingload-testing

Load Testing: Flight Booking in Web Tours isn't stored using recorded script in JMeter


I'm practicing in load testing and trying out JMeter. As sample application I use Web Tours. I recorded the steps to do a Flight Booking, did a correlation for the user session and added some Response Assertions to make sure that I get the correct answer from the server. When I replay the script, it seems to work fine.

But when I enter in the application and look at the Itinerary it is empty. So there is no booking done.

There is a similar behaviour, when I try to activate the error behavoiur in the Web Tours admin page (e.g. setting probability of the server simulating a load problem to 100%). When I test the application manually I get the expected errors (http 503). When I replay the script every steps ends with a http 200. Another script I recorded that adds a user to the application works fine. The User is added when I replay it.

Do you know what I am doing wrong?


Solution

  • Getting HTTP Status Code 200 doesn't necessarily mean that your test is doing what it is supposed to be doing.

    I would suggest adding another layer of pass/fail criteria using JMeter Assertion, in particular Response Assertion to check whether the server's response contains the anticipated value and/or doesn't contain errors.

    So first of all make sure that you can successfully create a reservation and later on find it using your browser because if you cannot - it might be expected behaviour of the system under test or a functional defect there. In this case there is nothing you can do from JMeter's perspective.

    If you can create the reservation using real browser compare the requests originating from JMeter and from the real browser using a sniffer tool like Fiddler or Wireshark, the requests need to be exactly the same (apart from dynamic parameters which need to be correlated). Once you amend your JMeter configuration to send the same requests as real browser does you should get the same behaviour.

    Also it looks like you've recorded some images, this is not something you should be doing because real browsers downloading images, scripts, styles and so on using concurrent thread pool and in your case you're getting them sequentially and it generates totally different network footprint. You should rather remove these requests and configure JMeter to fetch embedded resources using HTTP Request Defaults

    enter image description here