Using JMeter to create a payload to include dynamically generated web element ID's

Hi,

 

I am trying to write a performance test for an Appian application with JMeter. I am not using Appian version of JMeter but instead the open-source version.

I need to test a flow where clicking a button makes a POST request to a particular end point with a given payload. Now the issue which I am facing is that the payload that is being sent as part of this request includes encoded ID's for various page elements(..probably). These ID's can range from 100 - 400 characters(marked in blue color below). How can I simulate this payload as part of a JMeter request?? as I do not know how these ID's are being generated.

 

Has anyone else faced similar issue in he past. Can someone please guide/help me with this? Thanks a lot in advance.

 

Sample payload is pasted below for reference:

{"#t":"UiConfig","context":{"#v":"jA0EAwMCQ3z7gZRewSAB0sAvATsjFl5ivdZZIUQKTqy5d1vIfGnMFMBdgAd2gBG5YfkUkVtt9nCJ\r\n8U+ViyFGCmDhOLP6kO127+gmqoYP9YypqezEKE05dUJwMZH128Ud3n8YZcDPO5rzkvLqXx34whRi\r\nKu5HC4ir51109iJ5X7P3zEms9gAIoJZTpNU6iYybsmhWp9tdhNiXm7e3c03SSnMQOCfRqBdDmz9K\r\nDnLX629oKKl8UWfKzBF+7S2nzoO5GZqA82F3P6cjinqm3Y7Z/8N/23m9L9aoVsmo/JAd1PFeZG3p\r\nHD9KJmX+BftBblHfxs/Bb+gpZwokDNmX1sgOFzE=\r\n","#t":"string"},"uuid":"5e68d83b-0d9d-4bf6-9c63-203ad87e4d74","updates":{"#t":"SaveRequest?list","#v":[{"_cId":"b7de88003a8e7f4de535ba887feed5cf","label":"CREATE NEW CASE","model":{"size":"","confirmButtonLabel":"","isFlat":"false","confirmMessage":"","cancelButtonLabel":"","skinName":"","ariaLabel":"","confirmHeader":"","tooltipStyle":"","#t":"ButtonWidget","value":{"#v":"","#t":"string"},"style":"","label":"CREATE NEW CASE","validate":"true","action":"SUBMIT","icon":"","saveInto":["<<jA0EAwMCQ3z7gZRewSAB0n0BXZuHLB4nAQ8llY0uceOBhrIGh2NAgplBs1ZMMdRK5RC1/ImKRfPA\r\nlNnDCG+lhb7/3PeMulQD4PKga6mtFqf5fHzuvHx5KnUc/QJkeoRKeyKK7h3KOEyfkU0mnYyoxFlI\r\njwDTgBKR41tA+Sx90oSBFDXoSnL0Qr+JQBJhXg==\r\n>>"],"_cId":"b7de88003a8e7f4de535ba887feed5cf","buttonStyle":"","confirmButtonStyle":"PRIMARY"},"value":{"#v":"","#t":"string"},"saveInto":["<<jA0EAwMCQ3z7gZRewSAB0n0BXZuHLB4nAQ8llY0uceOBhrIGh2NAgplBs1ZMMdRK5RC1/ImKRfPA\r\nlNnDCG+lhb7/3PeMulQD4PKga6mtFqf5fHzuvHx5KnUc/QJkeoRKeyKK7h3KOEyfkU0mnYyoxFlI\r\njwDTgBKR41tA+Sx90oSBFDXoSnL0Qr+JQBJhXg==\r\n>>"],"saveType":"PRIMARY","isAsyncRequest":false,"provideRequestState":false,"capabilities":0}]}}

 

  Discussion posts and replies are publicly visible

Parents
  • Ravi,

    You might need to understand on how SAIL evaluation works and below link will help you in doing that - docs.appian.com/.../SAIL_Performance.html.

    Once you record using Jmeter , you will find two components in encoded formats in most of the requests -

    1) Context - To get context you have to add JSON path extractor as part of the response of request

    JSON path for context - $.context

    2) SaveInto - To get saveInto - you must know which component saveinto was evaluated in that request and then using JSON path you can get that from previous response.

    JSON path - $..primaryButtons[?(@.label==Next)].saveInto[0]

    Once you have those two parameters - pass it to further request -

    E.g. - {"context":${CONTEXT}, "updates":{"#v":[{"saveInto":["${SAVE_INTO}"], "value":{"#v":1, "#t":"int"}}], "#t":"SaveRequest?list"}, "uuid":"2a53f523-7457-4788-a798-748a73c98bbc", "#t":"UiConfig"}

    More links -
    community.appian.com/.../52854
  • Hi Sagar

    I am passing correct context and saveinto values but I am getting incorrect response and due to this further tests failing, this issue happen randomly , some times I am getting correct response and some times not.

Reply Children
No Data