Write Tests
grafana/synthetic-monitoring-app
Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.
Adds integration or unit tests to an OpenROAD module: writes the Tcl test, generates golden files and registers it in both CMake and Bazel.
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install The-OpenROAD-Project/OpenROAD add-test --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-test .claude/skills/add-test && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .claude/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-testType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install The-OpenROAD-Project/OpenROAD add-test --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/add-test .agents/skills/add-test && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .agents/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install The-OpenROAD-Project/OpenROAD add-test --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/add-test .cursor/skills/add-test && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .cursor/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/The-OpenROAD-Project/OpenROAD.git --path .agents/skills/add-test--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install The-OpenROAD-Project/OpenROAD add-test --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/add-test .gemini/skills/add-test && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .gemini/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install The-OpenROAD-Project/OpenROAD add-testInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/add-test .github/skills/add-test && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .github/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install The-OpenROAD-Project/OpenROAD add-test --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/The-OpenROAD-Project/OpenROAD.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/add-test .opencode/skills/add-test && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-test" agent skill from https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/.agents/skills/add-test into .opencode/skills/add-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-test", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-testAdds integration or unit tests to an OpenROAD module: writes the Tcl test, generates golden files and registers it in both CMake and Bazel.
The agent takes a module name such as rsz, drt or gpl plus what to test, studies the module's existing tests to learn its conventions, and writes a Tcl integration test. Existing design data is reused where possible, and new LEF or DEF files are created only for a specific geometry or edge case. Naming follows a fixed pattern: the test script, a golden log with an ok extension, optional golden output files for results such as DEF, and shared test data.
It then runs the test with openroad to produce the golden log and output, and registers the test in both build systems. Bazel registration is flagged as the most common mistake, because a test added only to CMake passes locally but is missing from Bazel CI. In CMake the name goes into the module's or_integration_tests call; in Bazel it goes into the TESTS list that feeds regression_test, and some modules also keep separate PASSFAIL_TESTS or BIG_TESTS lists.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 22b7c53. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
OpenROAD Module Test Adder loads about 1.8k tokens when it runs. Until then it costs about 152 tokens; SKILL.md has 471 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from The-OpenROAD-Project/OpenROAD at commit 22b7c53, republished under its BSD-3-Clause licence (© The-OpenROAD-Project). 471 words, ~1,827 tokens.
.claude/skills/add-test/SKILL.md (or your agent's skills folder).You are adding tests for: $ARGUMENTS
Parse $ARGUMENTS to determine:
rsz, drt, gpl)Explore existing tests to understand conventions:
ls src/MODULE/test/*.tcl | head -20Read a representative test for the module's style:
# Good reference for integration test patterns:
cat src/rsz/test/repair_tie12_hier.tclCreate src/MODULE/test/TEST_NAME.tcl:
# Brief description of what this test verifies
set test_name TEST_NAME
source "helpers.tcl"
# Read design files
read_lef "TECH.lef"
read_lef "CELLS.lef"
read_def "DESIGN.def"
# ... test operations ...
# Use make_result_file for temporary output
set def_filename "${test_name}.def"
set out_def [make_result_file $def_filename]
write_def $out_def
# Compare against golden file
diff_file ${test_name}.defok $out_defPrefer reusing existing test data in src/MODULE/test/. Only create
new LEF/DEF files when testing a specific geometry or edge case that
existing files don't cover. Keep test data minimal.
src/MODULE/test/TEST_NAME.tclsrc/MODULE/test/TEST_NAME.oksrc/MODULE/test/TEST_NAME.{defok,vok,spefok,...}src/MODULE/test/*.{lef,def,lib,sdc,v}Run the test and capture output:
cd src/MODULE/test
# Run with openroad to generate output
openroad -no_splash -no_init -exit TEST_NAME.tcl > TEST_NAME.ok 2>&1
# Remove the openroad banner from the .ok file if present
# The .ok file should contain only the test's stdoutIf the test uses diff_file, also generate the golden output file
(e.g., TEST_NAME.defok) by running once and copying the result file.
This is the most common mistake. Every test must be in both CMake AND Bazel. CMake-only tests silently pass locally but are missing from Bazel CI.
src/MODULE/test/CMakeLists.txtFind the or_integration_tests() call. The first positional argument
is the module name, followed by the TESTS keyword and the list:
or_integration_tests(
"MODULE" # <-- module name (e.g. "rsz")
TESTS
existing_test1
existing_test2
TEST_NAME # <-- add here
)Some modules also have a PASSFAIL_TESTS section after TESTS -- add
to the appropriate list. Look at the module's existing CMakeLists.txt
before editing.
src/MODULE/test/BUILDThe typical pattern is a TESTS list consumed by a list comprehension
that calls regression_test() for each name:
TESTS = [
"buffer_ports1",
"buffer_ports10",
"buffer_ports11",
"TEST_NAME", # <-- add here, in the existing sort order
# (other tests omitted)
]
[
regression_test(
name = test_name,
)
for test_name in TESTS
]Some modules split tests across multiple lists (TESTS,
PASSFAIL_TESTS, BIG_TESTS, etc.) and define a combined
ALL_TESTS = TESTS + PASSFAIL_TESTS + ... that the comprehension
iterates over. Read the existing BUILD to find which list to
extend, and insert the new test name in whatever sort order that
file already uses (most modules are alphabetical).
Prefer C++ unit tests over Tcl for testing internal logic, algorithms, and data structure operations. Use Tcl integration tests for command-level behavior and end-to-end flows.
Create src/MODULE/test/cpp/TestName.cpp:
#include "gtest/gtest.h"
#include "odb/db.h"
// Simple test (no fixture)
namespace module {
namespace {
TEST(ModuleTest, TestDescription) {
// ARRANGE - ACT - ASSERT
EXPECT_EQ(expected, actual);
}
} // namespace
} // namespace moduleOpenROAD provides a fixture hierarchy for tests that need database or tool setup. Choose the simplest one that covers your needs:
| Fixture | Use when |
|---|---|
tst::Fixture | Need bare dbDatabase + STA, load LEFs manually |
tst::Nangate45Fixture | Need pre-loaded Nangate45 tech/lib |
tst::Sky130Fixture | Need pre-loaded Sky130 tech/lib |
tst::IntegratedFixture | Need full tool integration (STA, DPL, GRT, RSZ) |
#include "gtest/gtest.h"
#include "tst/nangate45_fixture.h"
class TestFeature : public tst::Nangate45Fixture
{
protected:
void SetUp() override { /* additional setup */ }
};
TEST_F(TestFeature, HandlesEdgeCase) {
// block_, lib_ are available from the fixture
EXPECT_TRUE(condition);
}src/MODULE/test/cpp/CMakeLists.txtadd_executable(TestName TestName.cpp)
target_link_libraries(TestName
MODULE_lib
GTest::gtest
GTest::gtest_main
tst
odb
)
gtest_discover_tests(TestName
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
)
add_dependencies(build_and_test TestName)src/MODULE/test/BUILDAdd the cc_test target alongside the existing regression_test
entries. Most modules keep C++ tests in the same BUILD file:
load("@rules_cc//cc:cc_test.bzl", "cc_test")
cc_test(
name = "TestName",
srcs = ["cpp/TestName.cpp"],
deps = [
"//src/MODULE",
"//src/tst",
"//src/tst:nangate45_fixture", # if using Nangate45Fixture
"@googletest//:gtest",
"@googletest//:gtest_main",
],
)./regression is a thin ctest wrapper that filters by module label, so
the standard ctest flags apply. Use -R to match a single test by name:
cd src/MODULE/test
./regression -R TEST_NAME
# Verify test is discoverable in both systems
cd ../../../build
ctest -N | grep MODULE.*TEST_NAME# Format any C++ files (NEVER format src/sta/* or *.i files)
clang-format -i <changed-cpp-files>
git add src/MODULE/test/TEST_NAME.tcl \
src/MODULE/test/TEST_NAME.ok \
src/MODULE/test/CMakeLists.txt \
src/MODULE/test/BUILD
git commit -s -m "MODULE: add TEST_NAME test
Test for DESCRIPTION."./regression -R TEST_NAMECMakeLists.txtBUILD-s)© The-OpenROAD-Project, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/add-test of The-OpenROAD-Project/OpenROAD.
Open the folder on GitHubat commit 22b7c53
OpenROAD Module Test Adder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| OpenROAD Module Test Adder this skillThe-OpenROAD-Project/OpenROAD | 3.2k | — | ~1.8k | Automated safety check: Pass | BSD-3-Clause | |
| Write Testsgrafana/synthetic-monitoring-app | 171 | — | ~1.2k | Automated safety check: Pass | AGPL-3.0 | |
| Test Specialistailabs-393/ai-labs-claude-skills | 454 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Memstack Development Test Writercwinvestments/memstack | 423 | — | ~3.7k | Automated safety check: Pass | Proprietary | |
| Test Case ReducerArabelaTso/Skills-4-SE | 253 | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| Test Experteinverne/dotfiles | 121 | — | ~2.3k | Automated safety check: Pass | GPL-3.0 |
grafana/synthetic-monitoring-app
Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.
ailabs-393/ai-labs-claude-skills
This skill should be used when writing test cases, fixing bugs, analyzing code for potential issues, or improving test coverage for JavaScript/TypeScript applications.
cwinvestments/memstack
A skill your agent uses when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with…
ArabelaTso/Skills-4-SE
Automatically reduces bug-triggering test cases to minimal form while preserving the failure.
einverne/dotfiles
Testing methodologies, test-driven development (TDD), unit and integration testing, and testing best practices across multiple frameworks.
aiskillstore/marketplace
This skill should be used when writing tests, validating features, or needing to verify code works.
The-OpenROAD-Project/OpenROAD
Fixes an OpenROAD bug from a GitHub issue or error code: finds the root cause, implements the fix, adds a regression test and prepares a signed-off commit.
The-OpenROAD-Project/OpenROAD
Reviews an OpenROAD pull request in the project's priority order and prints draft review notes for a human reviewer to inspect and post.
The-OpenROAD-Project/OpenROAD
Reproduces an OpenROAD GitHub bug from an attached tarball and shrinks the failing design with whittle.py so maintainers get a minimal test case.
Works with
Categories
Adds integration or unit tests to an OpenROAD module: writes the Tcl test, generates golden files and registers it in both CMake and Bazel. The agent takes a module name such as rsz, drt or gpl plus what to test, studies the module's existing tests to learn its conventions, and writes a Tcl integration test. Existing design data is reused where possible, and new LEF or DEF files are created only for a specific geometry or edge case.
OpenROAD Module Test Adder fits situations like: adding a regression test for a bug fix in an OpenROAD module; improving test coverage for a module that has missing tests; checking that a new test is registered in both CMake and Bazel; generating the golden log for a new Tcl test.
Run `npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a claude-code`. Or copy the skill folder (.agents/skills/add-test in The-OpenROAD-Project/OpenROAD) into .claude/skills/add-test in your project. Claude Code loads it when a task matches its description.
Run `npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a codex`. Or copy the skill folder (.agents/skills/add-test in The-OpenROAD-Project/OpenROAD) into .agents/skills/add-test in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add The-OpenROAD-Project/OpenROAD --skill add-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-test, .gemini/skills/add-test, .github/skills/add-test and .opencode/skills/add-test in your project.
Going by SKILL.md and its folder, OpenROAD Module Test Adder needs the command-line tools its instructions call (git). Our summary lists: An OpenROAD source checkout with a built openroad binary; CMake and Bazel build files in the module's test folder.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
OpenROAD Module Test Adder is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with OpenROAD Module Test Adder: Write Tests (grafana/synthetic-monitoring-app, 171 stars), Test Specialist (ailabs-393/ai-labs-claude-skills, 454 stars), Memstack Development Test Writer (cwinvestments/memstack, 423 stars) and Test Case Reducer (ArabelaTso/Skills-4-SE, 253 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
The-OpenROAD-Project (a GitHub organization) maintains it in The-OpenROAD-Project/OpenROAD, which has 3,159 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.
Source: The-OpenROAD-Project/OpenROAD on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.