Search code examples
testingautomationautomated-testse2e-testingtestcafe

Does TestCafe RequestMock Stop the Original Request


When implementing a RequestMock in TestCafe does the original request still get made and completed and then modified by TestCafe or does TestCafe intercept the request and stop the original?

I'm asking because we are thinking about using this feature to mock some requests to speed up testing, such as mocking images. However, if the original request still has to be completed before the mock then this does not seem like a viable solution.


Solution

  • RequestMock intercepts requests to a web resource and emulates a response, so the original request is not performed. Please refer to the documentation for more information.