Skip to content

ax2inc/cypress-xhr-responses-recording

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic XHR responses recording & stubbing with Cypress

This is as simple project that showcases a way of dynamically saving XHR responses as JSON fixtures while running tests and using these fixtures to stub requests in subsequent tests.

This was created as a supplement to a Medium article that you can read here: https://medium.com/ax2-inc/dynamic-xhr-responses-recording-stubbing-with-cypress-9257d4f730cd

To try this out, clone the project and install its dependencies:

yarn

Then, run the tests in record mode to save XHR responses locally:

yarn e2e:record

You can now run following tests in normal mode which will use the JSON fixture to stub XHR requests:

yarn e2e

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published