https://cypress.io logo
Best practice for intercepts and test speed
# i-need-help
s
I've got a whole bunch of tests and suites, and I have historically setup my intercepts in each suite (i.e. each file) in a beforeEach and they have been general intercepts (i.e. no POST/PUT/etc specified). However I'm wondering if there is a best practice regarding this that would make my tests run faster. - Should intercepts be setup in before, beforeEach, or in individual tests? Does this only depend on how many of the tests in the suite use it? - Does the intercept method/type (i.e. POST, PUT, etc) make a difference in speed? Thank you!
4 Views