You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
The mindset of Cypress testing should be to prepare and cleanup the backend directly, not via the API-under-test. This one seems to use the API itself.
Unfortunately, I don't know how to fix the sample. What I'm concerned about is that people will learn from this, and later - maybe - realize the pattern was not ideal. I ended up using direct node.js database client to do the setup/cleanup, whereas using my REST API only for things that get tested.
The text was updated successfully, but these errors were encountered:
I looked at this repo as an authorative sample of using Cypress for REST API tests.
As such, I think it should present good ways of working. However, if I got it right, it currently uses one antipattern, here:
https://github.com/cypress-io/cypress-example-api-testing/blob/master/cypress/integration/example_spec.js#L37-L40
The mindset of Cypress testing should be to prepare and cleanup the backend directly, not via the API-under-test. This one seems to use the API itself.
Unfortunately, I don't know how to fix the sample. What I'm concerned about is that people will learn from this, and later - maybe - realize the pattern was not ideal. I ended up using direct node.js database client to do the setup/cleanup, whereas using my REST API only for things that get tested.
The text was updated successfully, but these errors were encountered: