Reputation: 828
I want to switch in my company from cucumber to cypress. Reason for that is that we are moving slowly to SPA approach and we have a lot of problems that cucumber ( heavily customized ) doesn't know how to properly test ( does not know when the application is loaded ) and we spend a lot of time only to fix that issue per test. Application is really really big and for now we have thousands tests written in cucumber.
So our use case requires multiple actions before we actually test something. Example path
1) Register new user ( unique user need's to have email, first name, and last name )
2) Create new offer ( multiple step offer creation mechanism with upload of images etc.)
3) Here we can actually start doing something
So this offer and user creation needs to be executed before each file ( in some cases we need more than 1 user and more than 1 offer depending on test)
In cucumber, we have all those mechanisms already written. But how to structure this in cypress?
Should we create separate folder eg. actions where we can call this? ( which means we have those actions as functions ).
I'm not e2e tester ( I am JS developer ) but since all QA's are gone it's my responsibility to maintain and support e2e tests.
Upvotes: 1
Views: 3631
Reputation: 6915
There is a cucumber plugin that someone has written for Cypress that can be found on the plugins doc.
Basically you would define your step definitions in files within cypress/support
. This is where you will translate your existing BDD steps to Cypress commands. Then have your features in files within cypress/integration
.
Upvotes: 7