0

I have an AngularJS application and I'm using Selenium to do UI testing using C#.

My web app is sending GET requests to a specific server (say http://localhost:8082).

What would be the best way to mock the response of these requests? I don't want my server to run for these tests, and also for testing purposes it would be best to setup the returned JSON.

Mugen
  • 8,301
  • 10
  • 62
  • 140

2 Answers2

1

one way to do it is with fiddler- all you need to do is setting fiddler as a proxy, and configure an auto responder. take a look at: https://stackoverflow.com/a/32812386/1447518

Community
  • 1
  • 1
Idan
  • 509
  • 2
  • 10
  • 24
1

You can easily achieve this by using a tool such as http://mock-server.com, http://mocky.io or https://github.com/jmartin82/mmock.

Vasil Trifonov
  • 1,857
  • 16
  • 21