Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guidance on selecting the appropriate test suite (Unit, API, or E2E tests) when writing new tests in Chrome DevTools. MUST be used when writing new tests.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -51% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -44% | 0% |
This guide outlines when and how to select the appropriate test suite when writing new tests in Chrome DevTools.
> !NOTE] > This skill provides guidance on which test suite to choose when writing tests. To learn how to run tests, build targets, or execute linters, refer to the devtools-verification skill.
Default choice: The vast majority of tests in DevTools should be unit tests.
Use unit tests for isolated testing of individual functions, classes, models, helpers, and UI components.
TestUniverse (and foundation test helpers) for easy, isolated setup of required dependencies and models.TimelinePanel.ts and TimelinePanel.test.ts).devtools_ui_module("unittests") or devtools_foundation_module("foundation_unittests") target in the corresponding BUILD.gn file.Use API tests for integration tests that verify business logic requiring more complex setups or extensive CDP (Chrome DevTools Protocol) traffic, without needing the full DevTools frontend UI.
Runtime.evaluate).front_end/ with .test.api.ts extension (e.g. Universe.test.api.ts).devtools_api_test_module("api_tests") target in the corresponding BUILD.gn file.Use E2E tests to verify real end-to-end user stories and user journeys.
test/e2e/ (e.g. test/e2e/console/console-log.test.ts).ts_e2e_library(ts_e2e_library) target in the corresponding BUILD.gn file. And node_ts_library in test/e2e/BUILD.gn for its dependencies.Other measured skills in the registry, with their headline benchmark lift.