Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →To add Cypress to an existing Angular app in an Nx workspace, install Nx’s Cypress plugin with nx add @nx/cypress, then choose the right setup: use Nx’s Cypress configuration generator for end-to-end tests, or the Angular component-configuration generator for component tests. They exercise different things and use different server and build targets.
Choose E2E or component testing
End-to-end (E2E) tests drive the application in a browser through its served URL, making them a fit for user-visible flows across the app. Component tests exercise Angular components through Cypress’s component-testing support; Cypress starts its own component dev server, while Nx uses a build target to establish the project context.
| Decision | E2E | Angular component testing |
|---|---|---|
| What runs in the browser | The running application | A component or library component in the configured component environment |
| Generator for an existing project | @nx/cypress:configuration |
@nx/angular:cypress-component-configuration |
| Server/build relationship | Use the app’s dev-server target or an explicit base URL | Provide an eligible Angular build target; Cypress owns the component dev server |
| Common Nx target | e2e |
component-test |
Use E2E when the behavior depends on navigating or interacting with the application as a whole. Use component testing when you want to verify a component’s rendering and behavior without making the app’s full user journey the test subject. You can configure both if the repository needs both kinds of coverage.
Install the Nx Cypress plugin
- From the workspace root, run
nx add @nx/cypress. Nx recommends keeping Nx package versions in sync; usingnx addinstalls the matching plugin for the workspace. - Check the workspace’s installed Nx and Cypress versions and package constraints before changing dependencies. Nx’s rolling Cypress introduction, retrieved October 3, 2026, lists support for Cypress
>= 13 < 16. Treat that as the documented range at that time, not a promise for every older workspace or a reason to override its dependency constraints. See Nx with Cypress.
Set up E2E tests for an existing Angular app
Generate the configuration
Replace your-app-name with the project name recognized by Nx from its project configuration or package metadata:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
nx g @nx/cypress:configuration --project=your-app-name
This generator configures the supplied project; it does not create a separate E2E project. If you want Cypress to use a specific application URL rather than having the configured Nx target start the app, provide a base URL:
nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200
Use the URL for the exact app instance your tests should cover. Cypress needs a base URL when neither a configured base URL nor a dev-server target is available. The Nx executor configuration for E2E uses a Cypress config path, testingType: "e2e", and typically the app’s devServerTarget. For CI, a static-serving target may be appropriate for the application. Consult Nx’s Cypress executor options and check the generated target in your workspace.
Run the E2E target
After generation, run the configured target, commonly:
nx e2e your-app-name
Target names are configurable, so use the target actually present in your project rather than assuming the default. The task should start or connect to the configured app and run Cypress against it.
Set up Angular component testing
Generate the component-test configuration
Run the Angular generator for the project that contains the Angular components:
nx g @nx/angular:cypress-component-configuration --project=my-angular-project
The generator adds Nx-ready Cypress component-test files and configuration. Nx’s current Cypress plugin documentation lists the supported Cypress range as >= 13 < 16; an older Angular generator reference mentions Cypress 10.7.0 as a minimum for component testing. That older minimum is not a recommendation to install an older Cypress major. Confirm compatibility against the versions in your workspace and the current Nx documentation. See the Angular generator reference.
Rank #3
Choose and verify the build target
Nx may infer the build target from project-graph usage. If it cannot determine the right one, pass it explicitly:
nx g @nx/angular:cypress-component-configuration
--project=my-angular-project
--build-target=my-angular-app:build
The target must use an eligible Angular builder: @nx/angular:webpack-browser or @angular-devkit/build-angular:browser, as specified in Nx’s Angular generator reference. It may belong to a different project from the component under test—for example, an app that consumes a library. Check the workspace project graph and the actual builder before copying the example: project assets, scripts, and styles available to a component can depend on the selected build target.
For component tests, the target should set skipServe: true. Cypress supplies the component dev server, so Nx should not serve the app as it does for a typical E2E task. Nx still needs the build target as configuration context. The Angular generator sets skipServe: true automatically; inspect the generated target if configuration has been customized. See Nx’s Cypress component testing guide and executor reference.
Rank #4
Generate starter tests and run them
You can ask the generator to create starter tests for existing components with --generate-tests. Nx documents the generated test-file suffix as .cy.ts and places those files beside their components. Run the component-test target, commonly:
nx component-test my-angular-project
As with E2E, use the target name configured in your workspace if it differs from the default.
Check inferred Nx targets and CI behavior
Nx’s @nx/cypress/plugin recognizes Cypress config files named cypress.config.js, cypress.config.ts, cypress.config.mjs, or cypress.config.cjs when the directory also contains a package.json or project.json. It can infer tasks from those files. Documented default target names include e2e, component-test, and open-cypress; the CI target is commonly e2e-ci. Plugin options in nx.json can change names and behavior, so inspect what Nx inferred with nx show project your-app-name --web or Nx Console. Details are in the Nx Cypress introduction.
Best Value
Nx documents caching for E2E and component-test tasks and tracking of Cypress screenshot and video outputs. CI task inference can also split tests by file when configured; component-test CI splitting is documented as available since Nx 21.6.1. These behaviors depend on the installed Nx version and workspace configuration, so verify them before relying on them in CI. For advanced E2E splitting, Nx’s current guidance uses ciWebServerCommand in Cypress preset configuration; if customizing that preset, preserve its setupNodeEvents behavior.
Troubleshoot common setup problems
- The Nx command cannot find the project: Check the exact project name in the workspace configuration or package metadata. Do not assume the folder name is the project name.
- Cypress cannot connect to the app: For E2E, ensure the dev-server target starts the intended app, or set
baseUrlto the URL where that app is running. Confirm the app is reachable before running Cypress. - The component generator cannot infer a build target: Supply
--build-target=project:target, selecting an eligible Angular browser builder and the app or project whose build context provides the assets and styles needed by the component. - The component task tries to serve the application: Check its target configuration for
skipServe: true. Cypress component testing uses Cypress’s component dev server; it is not the E2E app-serving workflow. - An Nx target is missing or named differently: Confirm that Nx can recognize the Cypress config file in a directory containing
project.jsonorpackage.json, then inspect inferred targets withnx show project your-app-name --web. Checknx.jsonfor plugin options that rename targets. - Installed package versions conflict: Keep Nx packages aligned and check Cypress against the supported range documented for the installed Nx version. Do not treat a rolling documentation range as a guarantee for an older workspace.
Or skip the browser setup
If your goal is to capture a website screenshot rather than add browser-driven tests to your Angular workspace, ScreenshotNeo is a separate screenshot API and MCP server for developers. One GET request returns an image or PDF; it is not a replacement for Cypress tests. For example, save a WebP shot with cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Can I use E2E and component tests in the same Nx Angular workspace?
Yes. Configure the projects and targets for each testing mode separately, then run the target that matches the behavior you want to verify.
Does ScreenshotNeo run Cypress tests?
No. ScreenshotNeo captures website screenshots or PDFs through an API or MCP server; Cypress is for browser-based application and component testing.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




