We are working on a system that uses a asp.net rest-api as an backend. This backend is connected locally with a machine that does some things after the backend gets called. The backend has its own state e.g. a call on route 1 changes the response of route 2.
We want to test the frontend without the connected machine but we are having a time to to figure out what the best way would be.
I guess there are several options:
- Mock the machine and run the whole backend to test it with the frontend.
- Mock the API with a self coded fake api to include the logic in the backend
- Use a fake/mock api tool
We think that we cant do solution 1 because the communitcion to the machine is quite complex. Solution 2 would include some heavy coding. We need to copy all the routes and implement fake logic. Solution 3 would be the easiest, but we didn't find any good tool that can work with a global state.
Any suggestions?