Hi All,
I am totally new to Gatling and Scala, and I am not able to save those responses one by one and use it for other requests.
Below are the steps that I want to perform.
- First step is to do a Get Request of a URL which provides a random no and public key under its response body, I have to save these values so that I can parse them to next step.
{ds3: true, twoFA: true,…}
ds3:true
publicKey:“DEEC326B84B4CE83BAC3849C906797ED92A9AE99A440C2E0CE0FA3E7811C3225BD28565AAF70EFB2E33C3154EE8793278942CF41FDE1E5FE2F25BCA9203B70CA0F55095A16FB26B79F00BD0CCE138F617C1C6A37CC78804F0F1A260FBAD62D1B1CBCD8F275A56CB6A5DC0B9C563601D32E73CE508059995BC30C6A200A5A1100AD791FA8C47CAA55EF07FE272256B5A7C12590C5D25DFFD1C12E0A0B15B8C24E96F5FD295BA970D0D8739EADC0BD0FFCA64AD2781C665018754C160998C8AF4FE625EC2CC406A14FAF52FB4FC6EF8A4C8146C382042418BD851CAE394BA20E201D1BEDD” random:“91B8BAF5A6643FBA61F4990E23C47007”
twoFA:true
I have to save this into a variable over a session
- Next step is do a post request for entering User-id and password, password gets encrypted.
Under Request Payload:
- {userid: “xxxx”,…}
- password:“2400ff0bb517132b229f290bde152c99d27e713f7da6de551f77c553c76f3eba306e5ccb65777a4ad708f09017edb1de3e740fd823fd4acfc6cdc62a8bb562a19ecf935bf63138c5ab71f2160dc48acf0acaae18aac31d6b2402c11f043504684ec1f28d0a2651be6f8054e00bbc630bd9c53eccb6ce3dcc05d0c98ba9ad8d8510b6bb8070a519438f1355f5b8da3cd1bd2eaef52d2aea4db003ad8775bdb291a9948d3d9d91ead2da5453f3eb825fce3f923d37c6cfeec009ce988551c2d21a1c65d65b80bba421617871d6b9546ab0849e54361aeaee710f9432e57092f6ffa1c09a70a4d3a10fc0ee75ac726b3a8a4c67d892c68b1190efee9b8a78ea97a3”
- random:“51F5A2F0938004955128FA7AC764583E”
- userid:"xxxx"1.
Under Response body :
{"$type":“Ds3Result”,“success”:true,“errorCode”:[],“message”:[]}
- Also I have to save XSRF token from the cookie to maintain the session.
- Then there is another POST request for O.T.P authentication, which I have to fetch from Rest API.
Can someone help me on this to achieve above mentioned scenario.