testing
Skill875 starsChanged 3 months agoApache-2.0View on GitHub
Select, run, and write CCF unit, end-to-end, partition, compatibility, coverage, and Python SDK tests. Covers prerequisites, the tests.sh wrapper, test labels, and e2e registration.
- Installs packages
123 other projects use a version of this.
Adopted by
Most recently taken up by
- timmo001/skillstheir own version, first seen Oct 5, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- shinpr/codex-workflowstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
ffsshhttiikkSkillnetworking
Practical application and coding skills for Networking
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 9 projects that use this
Cogni-AI-OUSkilldotfiles
Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.
Also in 3 projects that use this
- +2 more from CES-Ltd
- +1 more from ffsshhttiikk
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- lobehub/lobehub★ 83ksame name
- iOfficeAI/AionUi★ 33ksame name
- JetBrains/intellij-community★ 21ksame name
- kortix-ai/suna★ 20ksame name
- modelcontextprotocol/inspector★ 11ksame name
- microsoft/fast★ 9.7ksame name
- bytebase/dbhub★ 3.6ksame name
- theopenco/llmgateway★ 1.7ksame name
- BankrBot/skills★ 1.2ksame name
- rshankras/claude-code-apple-skills★ 777same name
113 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- formatting-and-lintingSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow the global validation policy for choosing relevant tests and reporting blockers.
- Very specific: line 78
Follow a nearby test for the same application.
- Very specific: line 83
Ensure the case is called by a runner.
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing
Running tests
Follow the global validation policy for choosing relevant tests and reporting blockers. Before running tests, configure and build the affected targets using the documented development environment. The Copilot formatting/lint setup alone is not a full test environment.
From the repository root, enter the configured build directory (shown here as build). Use its generated tests.sh wrapper for e2e tests: it creates/activates a Python venv, installs the SDK and test dependencies, then invokes ctest. First-time setup requires Python venv support and network access; subsequent runs still invoke dependency installation.
cd build
./tests.sh -N # Discover registered tests; does not run them
./tests.sh -L '^unit$' --no-tests=error
./tests.sh -L '^e2e$' --no-tests=error
./tests.sh -L '^partitions$' --no-tests=error # Requires NET_ADMIN
./tests.sh -VV --timeout 360 -R '^recovery_test$' --no-tests=errorUse -R for name regexes and -L for labels. ./tests.sh without a filter runs all registered tests; do not make this the default for a small change. Pure C++ unit tests and test discovery may use ctest directly from the build directory without Python setup. Use --no-tests=error for execution so an empty selection is not mistaken for passing tests.
Labels include unit, e2e, partitions, perf, benchmark, raft_scenario, suite, lts_compatibility, snp, and CI routing labels bucket_a, bucket_b, bucket_c. Registration depends on build options; inspect the configured inventory rather than assuming a named test exists.
Compatibility
For changes affecting older releases, configure the intended build directory with -DLONG_TESTS=ON (a CMake option, not just a shell variable), rebuild affected targets, then run from that directory:
./tests.sh -R '^lts_compatibility$' --no-tests=errorLONG_TESTS enables additional ledger compatibility coverage. This test is not registered with SAN=ON; use a suitable separate build rather than silently skipping it. It also needs access to older releases; report unavailable downloads as blockers.
Python SDK
SDK tests are separate from e2e. From the repository root, in an activated Python venv meeting python/pyproject.toml's Python requirement, install the SDK and pytest as the SDK CI job does:
uv pip install -e ./python pytest
cd python
pytestExit status 0 indicates success; report the selected tests and their actual result, not merely a successful setup step.
Code coverage
Configure with -DCOVERAGE=ON, build instrumented targets, and run the selected tests. From that build directory, with llvm-profdata and llvm-cov available:
../scripts/coverage.sh # Print summary
../scripts/coverage.sh --html report/ # Generate HTML reportThese paths assume build is immediately under the repository root. For another layout, use the actual path to scripts/coverage.sh while retaining the build working directory. The script consumes .profraw files and the generated coverage_binaries.txt; building alone does not produce coverage.
To combine coverage from another build directory of the same revision, compiler and options, such as one on a different platform, run ../scripts/coverage.sh --merge-only -o <name>.profdata there, then pass the resulting file to the reporting run with --add-profile <name>.profdata. llvm-cov excludes functions compiled differently from reports and warns that they have mismatched data.
Text and HTML reports include only framework sources under src/ and include/, excluding test and performance code. First-party C++ static libraries are instrumented, but only linked binaries are report inputs; archives are not counted a second time. Their coverage runtime link requirement also applies to consumers of installed instrumented libraries. Rust is not instrumented by the C++ coverage flags.
For a baseline, use a fresh coverage build/profile directory and record the source revision, build options and exact test selection. Targeted tests do not establish a full-suite baseline. Reports predating library instrumentation have a different denominator and are not directly comparable; including previously invisible code can lower the headline percentage.
End-to-end test infrastructure
E2e tests use the infrastructure in tests/infra/. The key classes are:
infra.network.Network: manages a multi-node network; use the existinginfra.network.network(...)context-manager pattern for lifecycle cleanup.infra.node.Node: represents one node process.infra.consortium.Consortium: member governance operations.infra.runner.ConcurrentRunner: schedulesrun_*(args)functions, each owning its network.
Writing e2e tests
Follow a nearby test for the same application. In tests/e2e_logging.py, individual test cases accept (network, args), while run(args) creates/opens the network and calls those cases. Requirement decorators from suite.test_requirements express the case's prerequisites.
- Register the network-owning
run_*(args)function withConcurrentRunner.add, not a(network, args)case. The runner invokes its target with one argument. ConcurrentRunner.add(prefix, target, **args_overrides)already deep-copies arguments and assigns a distinct label. Prefer its overrides for separate configurations rather than duplicating that work. Deep-copy arguments and set a distinct label yourself only when manually creating an additional independent configuration outside that mechanism.- Reuse network/client/governance helpers; assert observable behaviour and clean up through existing context managers.
- Ensure the case is called by a runner. For a new e2e executable entry point, follow existing CMake
add_e2e_testregistration, including its CI bucket. Runscripts/test-buckets-checks.shfrom the repository root when changing inventory, and updatetests/ci-buckets.txtonly for intentional registration changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

