On 22 June 2013 17:04, umesh prajapati <[email protected]> wrote: > Thank you again, ok I have checked the "save response as MD5 hash? > > After that i ran the test plan once > > Now I am trying to add response assertion to check that the response > returned during the first run and the second run matches. But when I add > "response assertion", I dont see an option to check the hash. > > I see : apply to: > response field to Test: > pattern matching rules: > pattern to test:
The response body is now the hash; you need to match that. Since it is fixed, you can use string matching. > > > > > On Sat, Jun 22, 2013 at 8:48 AM, sebb <[email protected]> wrote: > >> On 22 June 2013 16:39, umesh prajapati <[email protected]> wrote: >> > Thank you very much for a quick response. Ok , i am trying to follow the >> > 2nd step that you have mentioned which is add save response as MD5 hash? >> > But I am being unable to find that option. >> > >> > Like you have mentioned. I have to run the test once to be able to get >> that >> > option. So I ran the test once. and I right click on Http Sampler and >> > clicked ADD and I checked on all of them but was unable to locate save >> > response as MD5 hash. >> >> Bottom right of HTTP Sampler GUI. >> >> > I do see MD5Hex Assertion under Assertion. I am not sure if this is the >> one >> > your talking about. >> >> Yes, for one of the possible options. >> >> > >> > >> > On Sat, Jun 22, 2013 at 8:22 AM, sebb <[email protected]> wrote: >> > >> >> 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] >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
