I have to test two scenarios when due to some action unexpected 400 and 500 server errors have been thrown and the proper message appeared on the client for each of the errors.

When I try to edit the request via Fiddler and send it to server, I receive a correct error and everything is good on a server side. But editing and resending request is not affecting a client side, which make it's difficult to verify the full requirement.

Is there a way to simulate 400 and 500 server errors that will affect UI at the same time?


I would use a freeware tool like loopback to test client-side JavaScript. The error needs to be generated on the server-side so create a toy localhost server to send canned responses back to the browser. Learning loopback shouldn't be that hard; something for a Saturday afternoon.


I have found another solution by using Burp proxy tool that helped me to bypass JS validation on a client, intercept the request that has been sent to the server, alter it and forward back to server. That way I was able to test exactly what I needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.