Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cloudflare avatar

Find And Run Tests

  • 39 installs
  • 8.5k repo stars
  • Updated August 5, 2026
  • cloudflare/workerd

find-and-run-tests locates and runs workerd bazel test targets.

About

The find-and-run-tests skill explains locating and running tests in workerd and parent-project integration setups. workerd uses wd_test for JS/TS integration and kj_test for C++ unit tests with bazel query kind test patterns. Running prefers --test_output=streamed and --nocache_test_results. Parent projects may append variant suffixes like @all-autogates; cached results and filter flags that match zero tests are called out as hazards. Debugging steps include reading test.log, verifying feature evidence in output, and comparing subrequest headers. Load when unsure of exact bazel target names or invocation flags.

  • Documents wd_test and kj_test target discovery via bazel query.
  • Prefers streamed output and nocache_test_results.
  • Warns about @ variant suffixes in parent integration tests.
  • Debugging guidance for test.log and feature evidence.
  • References parent-project-skills for submodule setups.

Find And Run Tests by the numbers

  • 39 all-time installs (skills.sh)
  • Ranked #1,290 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

find-and-run-tests capabilities & compatibility

Capabilities
bazel query and run patterns for workerd tests
Use cases
testing
From the docs

What find-and-run-tests says it does

Load this skill when you need to locate or run a test
SKILL.md
npx skills add https://github.com/cloudflare/workerd --skill find-and-run-tests

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs39
repo stars8.5k
Last updatedAugust 5, 2026
Repositorycloudflare/workerd

How do I find and run a workerd test target?

Find, build, and run workerd wd-test and kj_test targets with bazel query patterns.

Who is it for?

workerd contributors locating or running bazel tests.

Skip if: Skip when target name and flags are already known.

When should I use this skill?

Need to locate or run workerd or parent integration tests.

What you get

Executed bazel test with correct target and fresh results.

Files

SKILL.mdMarkdownGitHub ↗

Finding and Running Tests

workerd Tests

Test types

TypeFile extensionBUILD macroTarget suffix
JS/TS integration.wd-testwd_test()None (target name = rule name)
C++ unit*-test.c++kj_test()None

Finding targets

# Find test targets in a directory
bazel query 'kind("test", //src/workerd/api/tests:*)' --output label

# Find test targets matching a name
bazel query 'kind(".*_test", //src/workerd/...)' --output label 2>/dev/null | grep -i '<name>'

# Find tests that depend on a source file
bazel query 'rdeps(//src/..., //src/workerd/io:trace-stream, 1)' --output label 2>/dev/null | grep -i test

Running

# Stream test output (preferred for debugging)
bazel test //src/workerd/api/tests:url-test --test_output=streamed

# Run with fresh results (no cache)
bazel test //target --test_output=streamed --nocache_test_results

# Run specific test case within a kj_test
bazel test //target --test_arg='-f' --test_arg='test case name'

Common flags

FlagPurpose
--test_output=streamedStream test output to terminal in real time
--nocache_test_resultsForce re-run, don't use cached results
--test_timeout=120Override default test timeout (seconds)

---

Parent Project Integration Tests

If workerd is used as a submodule in a parent project, that project may have its own integration test framework with different conventions. Load the parent-project-skills skill to discover those conventions.

General principles that apply to any integration test framework

Target naming with variant suffixes. Some test macros generate multiple targets from a single source file by appending variant suffixes (e.g., @, @all-autogates, @force-sharding). If bazel says "is a source file, nothing will be built" or "No test targets were found", you likely need a suffix. Use bazel query 'kind("test", //path:*)' to discover the actual runnable target names.

Cached results hide changes. Always use --nocache_test_results when re-running after modifying test files or source code. Without it, bazel returns stale cached results with stale logs.

Verify the feature actually ran. After a test passes, search the test output for feature-specific evidence (script names, process types, subrequests, RPC calls). A passing test with no evidence the feature ran is not a valid test — see the test-driven-investigation skill.

Debugging test failures

1. Always use `--nocache_test_results` when re-running after changes. 2. Check test logs at the path shown in bazel output: bazel-out/.../testlogs/.../test.log 3. Search logs for feature-specific keywords to verify the feature actually ran. 4. Subrequest mismatches (in frameworks that verify subrequests) typically show the actual vs expected request details — compare control headers carefully.

Related skills

FAQ

What does find-and-run-tests do?

find-and-run-tests locates and runs workerd bazel test targets.

When should I use find-and-run-tests?

Need to locate or run workerd or parent integration tests.

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

Testing & QAtestingdevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.