I am trying to run some API tests where I have two different JSON file payloads I want to test with.
I followed the instructions in the guide below for POST testing, but my tests keep failing with error codes 400 Bad Request.
One difference I’ve noticed between the article’s example and my API tests is that running a test request from my Object repository file will fail since my parameter’s value isn’t specified, but in the documentation’s example, their test still works.
Is there a workaround to make the documentation’s solution work or a way that I can add multiple JSON files to my test and specify which one to use during each test?
Running from the object repository like this should fail (though it doesn’t in the guide):
But when I create a test case and add in my parameter in script mode, my test again fails with an error code of 400.