0
votes

Right now I have two api methods to test

  • POST indexmember
  • DELETE indexmember

The problem is that indexmember has got the fields that have to be unique.

Therefore, when I run POST & DELETE once (# of threads == 1; loop == 1) - it works fine. Indexmember gets posted, then deleted, then i post again and it's fine, the unique values are still unique then.

But when I add more threads => jMeter starts POSTing several indexmembers altogether and some of the methods fail with our custom validation

 "Errors": [
    {
      "Message": "The Index member with IndexId [id] and SecurityId [id] is already present in database."
    }
  ],
  "Success": false

I was thinking on making DELETE function as some kind of sub-sampler to the POST.

So that POST and DELETE go together in one thread.

Any advice will be appreciated.

1
I see 2 possible issues here: either you limited your script to hard-coded values, where in fact you need each POST to use a unique ID (unique across threads), which DELETE will then delete. Or range of IDs is really limited, in which case such error is a realistic behavior of your application (for example: if range of IDs is limited to 500 numbers, and in reality 600 users will try to insert, they will get that error, so your script matches that behavior). So which is your problem: the first or the second?Kiril S.

1 Answers

0
votes

i would suggest to have both POST and DELETE request under the same thread group and Make sure you give enough ramp up time...