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

To run Cypress UI tests in an Angular pipeline, install Cypress as a development dependency, build the Angular app, start the app version your tests should exercise, wait for it to respond, and run cypress run. Put those steps in your CI job so a failed test fails the build. The readiness check matters: starting a server and immediately launching Cypress can make tests race the app startup.

What this workflow covers

This guide is for Cypress end-to-end (E2E) UI tests: checks that exercise the application through browser interactions, rather than unit tests of individual functions or components. Angular’s E2E command delegates to an E2E builder configured for the project; Cypress is one available integration, not the only way to test an Angular app. See Angular’s E2E testing documentation.

Assume Cypress is installed or will be installed, at least one spec exists, and the spec passes locally. The pipeline must run the same meaningful sequence: check out the project, install dependencies reproducibly, build or select the target app, make it reachable, wait for readiness, and execute the specs. A 2019 Cypress tutorial illustrates that conceptual sequence, but its Travis CI configuration, ng build --prod flag, project-specific dist path, and server package are historical; do not copy them as current defaults. See the original tutorial.

Prepare the Angular project

Install Cypress and define a command

Install Cypress as a development dependency and commit the updated package manifest and lockfile. The examples below use npm; Cypress also documents installation and invocation for Yarn, pnpm, and Bun in its CI overview.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
npm install cypress --save-dev

Add a repeatable script to package.json so both developers and CI can invoke the same command:

{
  "scripts": {
    "cy:run": "cypress run"
  }
}

Run it locally before adding the pipeline:

npm run cy:run

cypress run is Cypress’s command-line run mode, suitable for headless CI. The job should use the project’s lockfile-based install command, such as npm ci for an npm project, rather than resolving a fresh set of dependency versions on every run.

Choose the build and test target

Decide whether the test should cover a locally built artifact or an already deployed environment. For a local target, use the project’s existing build script and the configuration in angular.json. Confirm the output path and configuration for the current Angular project; do not assume an old production flag or a particular dist directory. Microsoft’s Azure Pipelines JavaScript guidance describes running Angular CLI commands such as ng build in a pipeline, but it is general Angular pipeline guidance, not a Cypress-specific Azure recipe.

Build what you intend to verify. Testing a production build can reveal issues specific to production configuration, while serving a development build may be appropriate for a different test purpose. If testing a deployed site, configure the job to wait for that site instead of building and serving a local copy; account for test data, isolation, and cleanup in the deployed environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Add the workflow to GitHub Actions

The following is a starting point for a repository that uses npm, has a build script, and has a start:test script that serves the built Angular app. Replace the build and server scripts with the project’s actual commands. The Cypress action’s start and wait-on inputs let it start the app and wait for an HTTP response before running tests.

name: Angular UI tests

on:
  pull_request:
  push:
    branches: [main]

jobs:
  cypress:
    runs-on: ubuntu-24.04
    steps:
      - name: Check out repository
        uses: actions/checkout@v7

      - name: Build and run Cypress
        uses: cypress-io/github-action@v7
        with:
          build: npm run build
          start: npm run start:test
          wait-on: 'http://localhost:4200'
          command: npm run cy:run

This uses the current major action and runner shown in Cypress’s GitHub Actions guide, updated September 20, 2026. Verify supported runner and action versions when adopting or updating the workflow. Teams that need tightly controlled upgrades can pin an exact action release rather than following a major tag. See Cypress’s GitHub Actions guide.

The sample assumes the server listens at http://localhost:4200; change that URL to the app’s actual address. Its start:test script must remain running while Cypress tests execute. The action manages the server lifecycle for this flow. If your project has no suitable serving script, add one using the server approach already supported by your app, and ensure it serves the intended build output.

Run checks on the changes that matter

The sample runs for pull requests and pushes to main. Adapt branch names and triggers to your repository’s merge policy; the 2019 tutorial’s reference to master is not a universal current branch name. Keep the E2E job as a required pull-request check if merges should be blocked when UI tests fail.

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.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Make server readiness explicit

Do not launch a server in the background and immediately invoke Cypress without a readiness check. Cypress warns that the server may not have booted by the time cypress run starts, so a test can visit the local URL too early. A successful HTTP response from the target URL is a more reliable gate than a fixed sleep.

When using the GitHub Action, configure both start and wait-on. In another CI system, Cypress documents a start-server-and-test pattern: start the server, wait until its URL responds successfully, run Cypress, then stop the server. This keeps the app process lifecycle tied to the test command. Consult the Cypress CI overview for the current command syntax and provider-specific setup.

Adapt the sequence to another CI provider

Cypress documents CI guidance for providers including CircleCI, GitLab, Jenkins, and AWS CodeBuild. Keep the same underlying order even when the YAML or task syntax changes:

  1. Check out the repository and select a supported Node.js and browser environment.
  2. Install dependencies from the committed lockfile.
  3. Build the Angular target, if the tests use a local app.
  4. Start the app or identify the deployed test target.
  5. Wait for the target URL to respond.
  6. Run cypress run and let a nonzero exit code fail the pipeline job.
  7. Retain or publish useful test results and artifacts according to the provider’s capabilities and team needs.

For Azure Pipelines, Microsoft documents Angular CLI use and browser-test/result-publishing primitives. Pair those general facilities with Cypress’s own CI and readiness guidance rather than treating generic Karma or Protractor examples as a Cypress recipe. Available runners, container constraints, artifact retention, secrets handling, and caching differ by provider; use the provider’s current documentation alongside Cypress’s provider guides.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Make failures useful and keep credentials safe

A Cypress command that exits unsuccessfully should fail the job. That makes the result visible as a failed check rather than allowing deployment to continue as if the UI were verified. Retain the logs and any artifacts your CI setup produces so a failure can be investigated.

Cypress Cloud is optional. Cypress documents hosted reporting and debugging context, screenshots and videos, flaky-test signals, and parallelization as Cloud capabilities; basic command-line execution does not require Cloud. Choose it if those collaboration or reporting features meet a real need, rather than treating it as a prerequisite for CI.

Use the CI provider’s standard checkout credentials and secret-management mechanisms. Cypress advises against placing a long-lived personal access token in the job when short-lived provider credentials are available. Do not expose secrets in workflow logs or test output.

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

Control runtime and environment drift when needed

Start with a straightforward serial run. If the suite becomes costly in time, Cypress documents caching and parallelization options; apply them only when the suite size and CI setup justify the added configuration. For reproducibility, Cypress also describes using consistent browser Docker images to avoid browser-version skew as hosted runner images change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Cypress’s GitHub Actions documentation notes that container jobs require Linux runners. Before moving a job into a container, confirm that the chosen runner, browser image, and action configuration are compatible. Do not assume that parallelization or a container automatically improves a particular pipeline’s speed or reliability.

Troubleshoot common failures

Symptom Likely cause What to check or change
Cypress cannot visit the local app, or the first tests fail before the page loads The test command ran before the server was ready, or the wait URL is wrong. Use the action’s start and wait-on settings or a readiness tool; verify the host, port, protocol, and that the endpoint returns a successful response.
The server starts but the app returns a missing-page response The server is serving the wrong directory, or the Angular output path/configuration changed. Check the current build configuration and output path in angular.json, then confirm the server serves that build and supports the app’s routing behavior.
The workflow cannot find Cypress or its command Dependencies were not installed in the job, or the command is not defined in the checked-out package. Run the lockfile-based install in the job, confirm Cypress is in development dependencies, and verify the cy:run script name.
Tests pass locally but fail in CI The browser, operating system, environment variables, test data, or target build differs. Compare local and CI configuration, confirm the intended build and base URL, and use a consistent browser environment when version drift is implicated.
A GitHub Actions container job does not start correctly The job’s runner or container arrangement may not meet Cypress’s Linux/container requirements. Check the current Cypress GitHub Actions guidance and use a supported Linux runner/container configuration.
The job stays waiting or times out The server failed to start, is listening on a different port, or the readiness endpoint does not return success. Inspect the server startup logs and the configured URL; correct the start command or wait target rather than extending a blind sleep.
A test failure does not block a later deployment The pipeline does not make the Cypress job a required check or deployment dependency. Configure repository branch protection or the provider’s deployment dependency rules so deployment waits for the UI-test job to pass.

Or skip the browser setup

If the task is to capture a website screenshot rather than validate an Angular user flow, ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF. It does not replace Cypress UI tests or make them pass; it removes the need to set up a browser just to capture a page image.

For example, this cURL request saves a WebP screenshot of Stripe. See the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents, including Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up free for 1,000 screenshots a month with no card.

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

Frequently Asked Questions

Does Cypress Cloud have to be enabled to run Cypress in CI?

No. The command-line run works without Cypress Cloud; Cloud is an optional reporting and debugging service.

Does Angular’s `ng e2e` automatically mean the project uses Cypress?

No. Angular’s E2E command delegates to the builder configured for the project. Cypress is one available integration.

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.