Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

How to Set Up and Run End-to-End Tests in Angular

Angular’s ng e2e command runs a configured end-to-end target. Learn how the CLI fits with E2E frameworks and how browser-flow tests differ from unit and component tests.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Angular end-to-end (E2E) tests check whether a complete application flow works in a browser through user-like interaction. Angular CLI provides the ng e2e command to run a project’s configured E2E target; the package or builder configured for that target supplies the test runner and syntax. Angular does not require one E2E framework.

What Angular end-to-end tests verify

An E2E test exercises an application from the browser’s point of view: it can open the running app, interact with its interface, and check the resulting behavior across a full flow. For example, a test might follow a user through a form submission and verify the confirmation shown by the application. This differs from testing one function or component in isolation.

As an Amazon Associate I earn from qualifying purchases.

Angular’s documentation defines E2E testing as a way to assert that an entire application works as expected from start to finish: Angular’s end-to-end testing guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose an E2E framework for your project

Angular’s current setup guide lists Cypress, Nightwatch, WebdriverIO, Playwright, and Puppeteer. The CLI is the project entry point; the chosen package configures the runner.

  • Browser coverage: identify the browsers and browser behavior your product must support.
  • Existing team setup: account for framework experience, existing tests, fixtures, and CI workflows.
  • Debugging: consider how your team investigates failures and handles logs, screenshots, or other artifacts.
  • Workspace maintenance: assess the setup and ongoing configuration the package adds to your Angular workspace.
  • CI execution: choose an approach that fits how your pipeline runs tests and whether you need a hosted execution service.

The Angular guide documents setup options, not a neutral comparison of speed, reliability, or cost. Those qualities depend on your project and configuration, so avoid treating any one framework as a universal winner.

Set up an E2E target and run it

From the Angular workspace root, run ng e2e. If the project has no E2E target, Angular CLI may prompt you to add an E2E package. The official guide gives these package commands:

Framework 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 examples are from Angular’s E2E setup guide. Angular also permits adding another package manually with ng add; confirm the package’s current Angular compatibility and instructions before using it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the configured target

  1. Open a terminal at the Angular workspace root.
  2. Run ng e2e to execute the configured E2E target, or specify a project with ng e2e [project].
  3. Review the output from the configured runner and resolve any setup or application failures it reports.

The CLI reference gives the command form as ng e2e [project] [options]. It builds and serves an Angular application, then runs end-to-end tests. The project argument can be an application or a library. Available options and target behavior depend on the configured builder; see the Angular CLI e2e reference.

How E2E testing differs from unit and component testing

Each testing layer answers a different question. Unit tests focus on small pieces of behavior; E2E tests exercise a running application flow through a browser. For new Angular CLI projects, Angular’s current testing overview identifies Vitest as the default unit-testing setup, with Vitest and jsdom. Vitest runs in Node, while jsdom simulates a browser DOM. Existing workspaces may use a different setup. Angular also describes running tests in a real browser when browser-specific APIs or rendering behavior matter. See the Angular testing overview.

Component testing is a separate scope from E2E testing. Cypress supports Angular component testing, where a component is mounted in a browser rather than tested as part of a complete application flow. Cypress explains the distinction in its end-to-end testing overview.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Using a different or custom test tool

An Angular-maintained skills repository also notes that tools such as Katalon Studio, TestCafe, and Selenium can be invoked through commands defined in package.json scripts. This is supplementary guidance rather than a guarantee that a particular tool has a current Angular CLI schematic or setup path. Check the tool’s own current Angular instructions and wire its command into your workspace as needed: Angular skills repository.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.