iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Angular end-to-end (E2E) tests exercise a running application through browser interactions that resemble what a user does. Angular CLI provides the ng e2e command to run a configured E2E target, but the target’s builder or package supplies the test runner and framework. Angular does not require one particular E2E framework.
What Angular E2E tests verify
An E2E test checks whether an application flow works from start to finish: for example, opening a page, entering information, submitting a form, and seeing the expected result. Angular describes E2E testing as a way to assert that an entire application works as expected “from start to finish or "end-to-end".” Angular’s E2E guide explains the concept and setup.
Because these tests interact with the running application in a browser, they can catch problems that isolated function or component tests cannot, such as a broken route or a workflow that fails when several parts of the app work together. They generally cover a broader path through the system, so they should complement—not replace—focused tests.
Which E2E framework can you use with Angular?
Angular’s current guide documents setup options for Cypress, Nightwatch, WebdriverIO, Playwright, and Puppeteer. The CLI command is the common entry point; each option brings its own package, configuration, APIs, and workflow. Choose based on your project’s needs rather than assuming one is universally fastest or most reliable: the official materials cited here do not provide a neutral head-to-head benchmark.
#1 Best Overall
- Browser coverage: Check that the runner supports the browsers and browser behavior your product needs to validate.
- Existing team experience: Reusing framework knowledge, test helpers, and CI workflows may reduce setup and maintenance effort.
- Debugging and artifacts: Consider how your team wants to investigate failures and retain useful output in local and CI runs.
- Workspace and CI fit: Assess how the package integrates with the Angular workspace and how tests will run in your continuous-integration environment.
Angular’s CLI guide lists these setup commands. Run the command for the package you choose from the project workspace and follow its prompts and configuration steps:
| Option | Angular CLI setup command |
|---|---|
| Cypress | ng add @cypress/schematic |
| Nightwatch | ng add @nightwatch/schematics |
| WebdriverIO | ng add @wdio/schematics |
| Playwright | ng add playwright-ng-schematics |
| Puppeteer | ng add @puppeteer/ng-schematics |
These are the examples in Angular’s E2E setup guide; package behavior and prompts may change, so consult the linked documentation if the command or setup differs in your workspace. The guide also permits adding another package manually with ng add. Angular-maintained guidance notes that tools such as Katalon Studio, TestCafe, and Selenium may also be invoked through commands defined in package.json scripts; confirm the current integration and support for any such tool before adopting it.
Rank #2
Set up and run an Angular E2E target
First check whether your project already has an E2E target. If it does, run that target; if it does not, Angular CLI may prompt you to select an E2E package when you run ng e2e. You can also install one of the documented integrations directly with its ng add command.
- Open the Angular workspace. Use a terminal in the project directory containing the Angular CLI workspace configuration.
- Check for an E2E target. If the project is already configured, proceed to the run step. Otherwise, run
ng e2eand follow the CLI prompt to select an E2E package, or add your chosen integration with the matchingng addcommand above. - Run the configured target. Execute
ng e2e. To specify a project, use the documented formng e2e [project] [options]; replace[project]with the project name and supply any options accepted by the configured builder. - Review the result in the runner. The configured builder handles the application and test execution. Use the runner’s output and project configuration to investigate failures; exact commands beyond the CLI entry point depend on the installed package.
The Angular CLI reference for ng e2e says the command builds and serves an Angular application, then runs end-to-end tests. Its project argument can identify either an application or a library. The command itself is therefore not a framework with one fixed test syntax: the configured E2E target determines the builder and runner behavior.
Rank #3
How E2E testing differs from unit and component testing
Testing layers answer different questions. Unit tests focus on small, isolated code units; E2E tests exercise a user-facing flow through the running application. For new Angular CLI projects, Angular’s current testing overview identifies Vitest as the default unit-testing setup and says it includes vitest and jsdom. Vitest runs unit tests in Node, while jsdom simulates a browser DOM. Angular also describes using a browser provider to run tests in a real browser when browser-specific APIs or rendering behavior matter. These are defaults and options described for new projects, not a guarantee about the configuration of an existing workspace. See Angular’s testing overview.
Component testing is another distinct scope. Cypress documents Angular component testing, which mounts a component in a browser so it can be tested in isolation. That does not make a component test an E2E test: the latter checks a larger application flow. See Cypress’s Angular component-testing overview.
Quick Recap
Rank #4
When the setup does not work
ng e2ereports that no target is configured: Add an E2E integration withng add, or use the CLI prompt if it appears, then run the command again.- The command runs but tests fail to start: Check the selected package’s installation and configuration, then consult its current documentation. Angular CLI delegates execution to the configured builder.
- The command works locally but not in CI: Compare the CI job’s commands and environment with the project’s local setup, and follow the chosen runner’s CI requirements. The CLI reference establishes the entry point, but does not specify a universal CI configuration for every runner.
- You are unsure whether a test is unit, component, or E2E: Identify what it exercises. Isolated code, a mounted component, and a complete flow through the running application are different scopes.
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.

