I have a very complex SPA made up of a client that uses AJAX to make calls, and a rather large number of endpoints that respond to REST requests. We are writing tests the "classic" way; however, one of the ways we are exploring is:
- We use the app doing a set of tasks so that we cover 100% of the use
- The browser (an extension?) records all of the ajax calls, and all of the responses
- Some kind of data file is created with the requests and the exact responses
- A server-side script that will emulate all of the requests and check that the responses match
I realise that if the data structure changes, the data will be outdated.
Is there anything like this out there? Or is it really a matter of writing everything by hand?