We have built a complex Angular application that sends multiple HTTP request to a REST service that is also built in house.
Since both the frontend and the backend is being developed in parallel, bugs can happen in either side. It could be a bug in the REST service, or it can be a problem with the HTTP Request generated from the front-end. When a bug has been reported, it's important to identify where the error occurs.
There are specific structures for each of the requests. The data models are mostly populated when the users give inputs in a form or a directive
How do we approach testing these HTTP requests?
- Can we only rely on unit tests?
- Can the testing be done with dummy data that produces a pre-defined JSON object?
- Or should integration tests be done with the actual data?
And by which ever method we pick, how do we identify where the error lies when there is a bug?