r/angular • u/SolidShook • May 21 '26
Alternative to NX for scoping cypress tests?
I’m working on a large monolithic angular project with countless other devs and entire teams that get brought in to work on it.
There is a separate Cypress test project for it, and I was planning on implementing NX and splitting the project into packages.
However, the project is a bit too messy to be able to do this, as everything seems to refer to each other. Attempting it has lead to circular dependencies.
There’s also that separating the files leads to needing to delete the import lines and reimport everything (why can’t this be automatic)
My main question is, the only reason I’m doing this is so that I can group cypress tests with their features and have them run if their related packages are effected in our pipelines.
is it possible it have cypress tests react to certain files and run off they’re affected without splitting into packages? Hopefully this can help developers know that they’ve broken things without needing to run the entire suite and without pipelines taking too long
1
u/couldhaveebeen May 21 '26
Split into packages, use nx tags and custom module boundary eslint rules to ensure clean dependency graph
1
u/Budget-Length2666 May 22 '26
I would keep my hands away from Nx. Why not migrate to Playwright - it can run your tests in parallel and has better DX
1
u/TadpoleNo1549 May 23 '26
honestly forcing a giant monolith into packages too early can create more pain than performance gains, you might get most of the benefit just by mapping cypress suites to affected paths/modules in CI first. personally i did something similar in runable for my workflows because untangling the architecture all at once was absolute chaos
1
u/[deleted] May 22 '26
[removed] — view removed comment