agentleFS
s3s-projects3s-project/s3s/.agents/skills/testing/SKILL.md

testing

Skill313 starsChanged 26 days agoApache-2.0View on GitHub

Add or run tests in this repository. Use when placing a new test, when a test target is not picked up, when the feature sets matter, or when an end-to-end suite is involved.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep fixtures next to their tests (crates/s3s/tests/fixtures/, crates/s3s/src/ops/tests/fixtures/) unless the generator consumes them, in …

    line 27

“Common” is measured: kept by at least 6 in 10 of the 171 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing

Where a test goes

  • Unit tests sit beside the code they exercise, in a #[cfg(test)] mod tests in the same file, with fixtures in a neighbouring directory (for example crates/s3s/src/ops/tests/).
  • Integration tests live under crates/<crate>/tests/. Two layouts work: one file per target (tests/dto.rs becomes the dto target) and a directory with main.rs (tests/protocol/main.rs becomes the protocol target). Cargo discovers both, so a [[test]] declaration is only needed when the defaults are not enough.
  • This repository declares one when a target needs harness = false (a custom harness, as s3s-fs does for its AWS and OpenDAL suites) or required-features (the HTTP/3 suite needs http3). Reach for a declaration only for those reasons.
  • Tests for generated code are generated: see the code-coverage skill before adding one by hand under crates/s3s/tests/generated/.

Running a subset

cargo test -p <crate>, cargo test -p <crate> --test <target>, and --all-features for the second feature set. just test is the workspace command (--workspace --all-features --all-targets). CI runs it on two toolchains, on the MSRV and on two platforms. Exercise both feature sets before calling a change done: a merged generated file has code behind both.

What a test should assert

Compare whole values, exact strings or exact error variants, so that a wrong implementation fails for the reason the test names. A test that only checks "did not panic", "is not empty" or "returned Ok" cannot fail for the right reason; the verification skill describes the red control that proves a test can fail at all.

Fixtures

Keep fixtures next to their tests (crates/s3s/tests/fixtures/, crates/s3s/src/ops/tests/fixtures/) unless the generator consumes them, in which case they belong under data/.

Neighbouring suites

Fuzzing lives in its own workspace and has its own skill (fuzz-testing), as does the scheduled mutation sweep (mutation-testing). What follows is the part of the suite that runs like a test.

End-to-end suites

The end-to-end suites are shell scripts under scripts/ (silo, s3s-fs, s3s-proxy, mint, Ceph s3-tests, rclone, boto3) with their instructions in CONTRIBUTING.md. Two of them are gates with expected-failure baselines: cargo run -p xtask -- report mint <log.json> and cargo run -p xtask -- report s3-tests <junit.xml>, which keep the counters and the allow-list of known failures honest. CI runs them behind path filters, so a green pull request does not mean they ran.

The wasm build

crates/s3s-wasm runs the workspace under WebAssembly with its own suite, covered by the wasm-test CI job; it is the cheapest way to catch a platform assumption.

Download now (ZIP)

  • Other versions191 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 191

    1. modelcontextprotocol/servers★ 92ksame name
    2. lobehub/lobe-chat★ 84ksame name
    3. lobehub/lobehub★ 84ksame name
    4. penpot/penpot★ 62ksame name
    5. meteor/meteor★ 45ksame name
    6. iOfficeAI/AionUi★ 34ksame name
    7. garrytan/gbrain★ 31ksame name
    8. OpenZeppelin/openzeppelin-contracts★ 27ksame name
    9. tursodatabase/turso★ 25ksame name
    10. redis/go-redis★ 22ksame name

    181 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.

  • Used alongsideProjects with it also use bundle-dependency-prs, update-library-template 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.
    • MicrosoftSkill

      bundle-dependency-prs

      Fix broken dependency update PRs and aggregate the ones that work into one PR.

      Also in 6 projects that use this

    • MicrosoftSkill

      update-library-template

      Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.

      Also in 6 projects that use this

    • zetaloopSkill

      assign-copilot

      Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.

      Also in 3 projects that use this

    • NVIDIA-NeMoSkill

      build-and-dependency

      Build and dependency management for NeMo-RL. Covers Docker image building and running, uv usage, venv setup, and adding dependencies.

      Also in 3 projects that use this

    • timmo001Skill

      changeset-scope

      Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.

      Also in 3 projects that use this

    • NVIDIA-NeMoSkill

      linting-and-formatting

      Code style guidelines for NeMo-RL (Python and shell). Covers naming, indentation, comments, docstrings, reflection avoidance, and uv usage.

      Also in 3 projects that use this

  • In this repository11 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.