Asked • 07/29/19

How and where to test if the JSON request objects generated by the front-end is valid?

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 directiveHow 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?

1 Expert Answer


Dan S. answered • 10/02/19

4.9 (48)

A seasoned software and systems engineer.

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.