Scenario: I am trying to validate whether parallel requests can wrongly create folders with the same name under the same parent. I can send 10 parallel requests using Synchronizing Timer. However, I am not sure how to validate that only one of the parallel requests was successful and all the other 9 requests failed. Is it possible to validate that the success count of a particular Http request is exactly 1?
2
I don’t think it’s possible, I would rather go for the following setup:
- Pre-condition: create a folder with some name using HTTP Request Sampler. It can be done for example in setUp Thread Group
- Add Response Assertion assuming successful creation
- Then in “normal” Thread Group with 9 users and Synchronizing Timer try creating 9 more folders with the same name as in step 1
- Add another Response Assertion assuming creation failure. You can check “Ignore status” box if response status code is above 400 so failed requests would be expected and won’t show as failed in the test results
1