On 22 June 2013 16:02, umesh prajapati <[email protected]> wrote: > I would really appreciate if i could get some help on assertion. > > For example: > I have 100 users to test. > I run the test for 100 user in 5 seconds interval and save the > response in to a file. > > Now, I would like to do a load test with the same 100 users without 5 > seconds interval > How can I use assertion or how can i assert that the response I am > getting now during the load test matches or contains the same data > before.(that was saved to a file)
That's not possible currently in JMeter. Why not save the response files in two separate directories and the use a standard compare tool? Alternatively, if you are looking for an *exact* match, you could use the "Save response as MD5 hash?" option in the HTTP Sampler, and add an assertion to check that the response body is as expected. You would have to run the test once to get the hashes, and then add a Response Assertion to check the hash. You could then re-run with different settings for delays etc. If you want to still store the result, you could replace the Response Assertion with MD5 Assertion; of course then you need to uncheck the "Save response as MD5 hash?" option as you want the hash of the sample response not the hash of the hash created by the sampler. If you see what I mean. > Another thing that I noticed was, when I use save response to a file. > It saves each user response to separate file. Is there a way that I > can save all the user response to one single file You can configure Listeners to save the response data; it's not the default because of the likely size and resources needed to do so. > and later when I run > the load test assert the response with that single file. No. But you could configure a listener to save as XML and only enable the response data. Then compare output from test runs. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
