Our client is trying to perform some peformance testing with the LoadRunner test framework and they are asking us for a way to programmtically retrieve the sfmRequestKey from an HTTP request so that they can use it to make further DDS calls to test the load on the environment.

We have looked at all of the Maestro requests use the Chrome dev tools but I don't see where the Maestro form is intially getting the sfmRequestKey.

Does someone know how to get programmatically this from the HTTP call?



    CommentAdd your comment...

    1 answer


      Hi Blake,

      You can get it in your Maestro form code by Form.getSystemData("RequestLogKey");

      1. Clive

        I have the same difficulty. I am doing similar testing but using jUnit and HttpClient.

        Bill: Your solution suggests javascript code which isn't available in a LoadRunner test framework or a jUnit/HttpClient test framework. We can only perform HTTP requests/responses.

        Is there a way to get the sfmRequestKey without javascript?

        If I try to perform a DDS call with the wrong sfmRequestKey I get the following response:
        { "errorMessage": "Request for sfmRequestKey not found" }

      2. Unknown User (bfrost)

        The sfmRequestKey value is pre-populated into the form system data in a field called RequestLogKey, but the data is encrypted, so that won't help you extract it.

        Since the sfmRequestKey is sent with every DDS call as part of the form data, could you do an initial DDS call in a Form Load rule, extract the sfmRequestKey value, then use it in subsequent calls?  It wouldn't matter what the initial form load rule called, it could be a dummy service, or it could be a service that just reflected the sfmRequestKey value back if that makes it easier to capture.

        In a DDS HTTP request, the sfmRequestKey is sent as a form data field:

      3. Nova TechOps

        Hi Bill, I have found the RequestLogKey now in the HTML returned by the HTTP call to http://something/SmartForm.html?formCode=etc
        But yes, it doesn't match the sfmRequestKey which must be due to the encryption.
        These DDS HTTP requests are being made by JavaScript Code and I'm not sure how the JavaScript code is sending the sfmRequestKey.
        So maybe I can decrypt the RequestLogKey, do you know how it is encrypted?

      CommentAdd your comment...