Search code examples
jmeterperformance-testing

Should requests contain unnecessary parameters which are sent if manually browsing the application


I'm currently testing a asp.net application. I have recorded all the steps i need and i have noticed that if i remove some of the parameters that i'm sending with the request the scripts still work and the desired outcome still happens. Anyway i couldn't find difference in the response time with them or without them, and i was wondering can i remove those parameters which are not needed and is this going to impact the performance in any way? I understand that the most realistic way of executing the scripts should be to do it like a normal user does (send all which is sent with normal usage) but this would really improve the readability of my scripts, any idea? Thank you in advance and here is a picture which shows for example some parameters which i can remove and the scripts still work this is from a document management system and i'm performing step which doesn't direct the document as the parameters say but the normal usage records those : enter image description here


Solution

  • Although it may be something very trivial like pre-populating date and time in calendar in user's time zone I believe you shouldn't be omitting any request parameters.

    I strongly believe that load testing should mimic real user as close as possible so if it is not a big deal to send these extra parameters and perform their correlation - I would leave them.

    Few other tips:

    • Embedded Resources (scripts, styles, images). Real-browsers download these entities so
      • Make sure you have "Retrieve All Embedded Resources" box checked
      • Make sure you "Use concurrent pool" size 3-5 threads
      • Filter out any "external" stuff via "URLs must match" input
    • Well-behaved browsers download embedded resources but do it only once. On subsequent requests they're being returned from browser's cache. Add HTTP Cache Manager to your Test Plan to simulate browser cache.
    • Add HTTP Cookie Manager to represent browser cookies and deal with cookie-based authentication.

      See How To Make JMeter Behave More Like A Real Browser article for above tips explained just in case you want to dive into details