Is it possible to simulate a 500 or other non-200 response with AutoMocking?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023
11:54 AM
03-23-2023
11:54 AM
Is it possible to simulate a 500 or other non-200 response with AutoMocking?
In order to test my api in SwaggerHub it'd be nice to simulate the response for a 500, 201, 400, etc and make sure that the format of the response is what I expect. Is this possible? When I try a new integration and set up automock that option isn't shown.
Thank you!
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023
12:13 PM
03-23-2023
12:13 PM
Hi @WilliamWilliams
Just wondering if commenting the 200 response is enough? When trying it, you should get the error message first.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023
12:47 PM
03-23-2023
12:47 PM
Unfortunately not. If I do like you did above the response just says "undocumented" above the previous 200 response. Or I get a 406 error. I would need the mocked up server code to throw a 500. Not sure exactly how they implement that mocking functionality.
