All solutions

    By stack

    How to Test an Angular App End to End

    Karma and Jasmine cover components and services. They won't catch a broken route guard or a form that fails against the real API. Here's how to get end-to-end coverage without a Protractor-style suite to maintain.

    Last updated: September 1, 2026

    The problem

    Angular projects usually have solid component and service coverage through Karma and Jasmine, and TestBed makes unit testing the framework's building blocks straightforward. What's often missing is the layer above: does a real user journey work against the real backend, with the router, guards, interceptors, and forms all in play. Protractor filled that role and is now deprecated, leaving a gap teams patch with a scripted suite they then have to maintain.

    Why the usual approach falls short

    • TestBed tests the pieces, not the assembled app. A route guard that misbehaves only in the real navigation flow won't show up.
    • A scripted E2E suite is a maintenance commitment — selectors and flows drift with every UI change.
    • Zone.js and RxJS timing make scripted E2E tests flakier; fixed waits race change detection and async pipes.

    How BlackBat AI fits

    Point BlackBat AI at your running Angular app — a dev build, staging, or production — and it uses it like a person: navigating the router through guards and lazy-loaded modules, waiting for change detection and pending observables to settle, submitting reactive forms that hit real interceptors. It reports broken journeys with screenshots and reproduction steps, and there's no selector-based suite to keep in sync.

    For the journeys that must always work, describe them in plain English.

    Keep Karma/Jasmine (or Jest) for units — the end-to-end testing guide covers the layering, and the comparison pages cover the E2E tool choice.

    What your first run looks like

    1. Get a URL for the running app and a test account.
    2. Start a run; BlackBat AI discovers routes and flows as it explores.
    3. Review findings and the navigation map; pin the critical journeys as plain-English checks.

    What to cover first in an Angular app

    Work outward from the journeys that cross the most framework machinery:

    • Authentication and route guards. Sign-in, sign-out, token refresh through an HTTP interceptor, and what a guard does with a logged-out or under-privileged user.
    • Reactive forms against the real API. Validation messages, server-side errors and submit states are where TestBed mocks diverge from reality.
    • Lazy-loaded feature modules. A module that loads fine in isolation can fail on the first real navigation to it.
    • Role- and permission-gated screens. Check them with accounts of different roles, not just an admin.

    An autonomous run reaches all of these without a list. Once you know which journeys the business depends on, pin them down as plain-English checks.

    Moving on from Protractor

    If your end-to-end suite was Protractor, you don't have to port it line by line to another scripted framework. Start with an autonomous run to get a baseline of what's broken today, pin the handful of must-pass journeys as plain-English checks, and keep any exact-assertion tests as a small scripted set. The end-to-end testing guide covers how to decide what stays scripted.

    Where it fits

    Unit tests underneath, BlackBat AI for end-to-end coverage of the running app, a small scripted set for exact assertions. See also how to test a React app end to end.

    FAQ

    Point BlackBat AI at your app

    One URL. A map of every flow and a list of what's broken, in minutes. Free, no credit card.