apijmeterperformance-testingload-testingloadrunner

Is there a way to handle encoded data in API request during performance testing as the request content looks to be in encoded format


Here is a example recorded data

HTTP Request header : https://qa.**********.com/*****/api/v1

HTTP Request content : vrAJ82y0qP93FB2YCj6PAgG5f2IxEUpvYRnJ59D4HGb4n3G3YkjYSMXs3vWUIuAOHHjs

When trying too replay the recorded script again the response says "the request cannot be understood"

The request content keep changing with every new session in this case how to handle this during performance testing ? is there way to decode this data while replaying the script

Note: we may not be able correlate the request as this doesn't appear elsewhere and unique to that particular request


Solution

  • Most probably the payload is being encoded somehow using a JavaScript function.

    Inspect your web page source and look for the function which is responsible for the payload encryption.

    Once done you can implement it using JSR223 PreProcessor and Groovy language and generate the request payload dynamically in the runtime