find-and-run-tests
How to find, build, and run tests in workerd. Covers wd-test, kj_test target naming, bazel query patterns, and common flags. Also covers parent project integration tests if workerd is used as a submodule. Load this skill when you need to locate or run a test and aren't sure of the exact target name or invocation.
Install
Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.
git clone https://github.com/cloudflare/workerd /tmp/workerd && ln -s /tmp/workerd/.opencode/skills/find-and-run-tests ~/.claude/skills/find-and-run-tests
From README
Finding and Running Tests workerd Tests Test types | Type | File extension | BUILD macro | Target suffix | | ----------------- | -------------- | ----------- | ------------------------------ | | JS/TS integration | .wd-test | wdtest() | None (target name = rule name) | | C++ unit | -test.c++ | kjtest() | None | Finding targets Running Common flags | Flag | Purpose | | ------------------------ | ------------------------------------------- | | --testoutput=streamed | Stream test output to terminal in real time | | --nocachetestresults | Force re-run, don't use cached results | | --testtimeout=120 | Override 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.
More from this repo
add-autogate
Step-by-step guide for adding a new autogate to workerd for gradual rollout of risky changes, including enum...
add-compat-flag
Step-by-step guide for adding a new compatibility flag to workerd, including capnp schema, C++ usage, testing, and...
bazel-test-hygiene
Mandatory rules for running bazel tests during development.