mimic
mimic

Reputation: 5224

Should be Cypress testing framework be installed separate from the testee project?

I have a big web project with a separate backend and a front-end (webpack). I'm going to use Cypress to create end-to-end tests.

What is not clear is where I should add the Cypress tests and Cypress itself. The documentation says to add it right to the testee project and it shows how to run the tests on the production website (which URL is different from the local, dev project). This means that I'm not able to run the tests on the development project because Cypress testing IDE and the testee project can't be run simultaneously because they share the same terminal.

If so, the best solution is probably to organize one more project, only for testing purposes, and having only Cypress installed and tests themselves? Is it a good practice and if so, which project should it be?

Upvotes: 3

Views: 1105

Answers (1)

cdcastillo
cdcastillo

Reputation: 148

We have the same setup at work. We include the Cypress folder in the front-end repo. I'd agree with keeping it right next to the project because you have access to that code easily i.e. accessing utility functions, selectors, etc. As far as the terminal issue, you should be able to run your project locally in one terminal tab and the cypress test runner in another.

Upvotes: 3

Related Questions