1
votes

I am very new to Performance Testing and Jmeter

This is my POST data sending as request POST data:

[{"state":"COMPLETED","taskId":"2007","properties":[{"value":"2018-07-25T16:44:40.121Z","id":"deliveryDate"}]}]

Response:

{"id":null,"message":"Error in 2007: Cannot find task with id 2007;","status":"BAD_REQUEST"}

But when i recorded the script below is the response for the above POST data (which is correct)

[{"filingDetailsId":24,"filingStatus":"ACTIVE","fund":{"fundId":24,"name":"AG Mortgage Value Partners Master Fund, L.P.","shortCode":"MVPM"},"task":{"taskId":"9535","state":"ACTIVE","description":"The date the data was provided by the admin.","taskSubType":"MASTER","assignee":"[]","properties":[{"id":"deliveryDate","name":"Admin Actual Delivery Date","type":{"name":"date"},"value":"False","required":true,"writable":true,"readable":true}]},"refFundId":101,"reportId":0},]

Why does my replay fail? Please HELP!

1

1 Answers

0
votes

Your question does not have enough details to come up with a 100% correct answer so I'll go for a "blind shot"

If your test scenario assumes a CRUD operation like:

  1. Create a task
  2. The task goes through some workflow
  3. The task is marked as completed or is deleted

Then this is not something you can record and replay without implementing so called correlation - the process of extracting dynamic parameters from previous request and passing them to next one.

So you need to do some extra work on your recorded test and make it look like:

  • HTTP Request to create a task
  • HTTP Request to mark the task as completed - replace 2007 with the value of taskId from the previous request. You might also want to replace 2018-07-25T16:44:40.121Z with current timestamp which you can obtain via __time() function as otherwise your requests will be in the past and your application might have an internal check to prevent potentially fraudulent behaviour.