'Is there a way that I can run only Cypress tests specific to the application files I changed?
I would like to run only specific Cypress tests related to the application files that I changed, but every time that I make a change all the integration tests are running. I've already checked a tool called cypress grep but it uses tags to map the tests but it is not dynamic or automatic since I need to set the tags and also add the tags manually in the pipeline.
Do you know an alternative tool to solve this issue?
Solution 1:[1]
We are using nx with Angular, works quite well https://nx.dev/using-nx/affected. Not sure if it's suitable for your project and if it's worth setting up whole nx.
Solution 2:[2]
You'll want to use the find-cypress-specs
where you can get a list of changed specs, number, and by tags.
You'll have to form the Cypress run command in your YML file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dainius Lukša |
Solution 2 | jjhelguero |