Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

testing-workflow

/testing-workflow

Planuje, uruchamia i segreguje testy Rust z Cargo: jednostkowe, integracyjne, dokumentacyjne, przykłady, ponowne uruchomienia, macierze cech, wybór pakietów workspace i wyjaśnianie porażek.

Repozytorium
socket ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.08.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.08.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Planuje, uruchamia i segreguje testy Rust z Cargo: jednostkowe, integracyjne, dokumentacyjne, przykłady, ponowne uruchomienia, macierze cech, wybór pakietów workspace i wyjaśnianie porażek.

Oryginalny opis (EN)

Plan, run, and triage Rust tests with Cargo, including unit tests, integration tests, documentation tests, examples compiled by cargo test, targeted reruns, feature matrices, workspace package selection, and failure explanation. Use when adding tests, running Rust validation, or diagnosing cargo test failures.

Jak działa

  1. Purpose
  2. Source Check
  3. Test Layout
  4. Command Selection
  5. Failure Triage
  6. Implementation Guidance
  7. Output Shape
  8. Guardrails
Sekcje z nagłówków SKILL.md, w oryginale · 110 linii, 533 słów
Podgląd SKILL.md
---
name: testing-workflow
description: Plan, run, and triage Rust tests with Cargo, including unit tests, integration tests, documentation tests, examples compiled by cargo test, targeted reruns, feature matrices, workspace package selection, and failure explanation. Use when adding tests, running Rust validation, or diagnosing cargo test failures.
license: Apache-2.0
metadata:
  owner: gaelic-ghost
  repo: socket
  category: rust-testing
allowed-tools: Read Bash(rg:*) Bash(git:*) Bash(cargo:*) Bash(rustc:*) Bash(rustup:*)
---

# Rust Testing Workflow

## Purpose

Run the narrowest useful Rust tests, explain failures clearly, and keep test layout aligned with Cargo's model.

Cargo test behavior matters because one command can compile and run unit tests, integration tests, documentation tests, and examples. The skill should make that scope explicit instead of treating `cargo test` as a black box.

## Source Check

Use repo-local Rust files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Rust docsets, and then official Rust documentation when Dash/local coverage is missing or stale:

- [Cargo tests guide](https://doc.rust-lang.org/cargo/guide/tests.html)
- [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html)
- [The Rust book testing chapter](https://doc.rust-lang.org/book/ch11-00-testing.html)
- [Cargo features reference](https://doc.rust-lang.org/cargo/reference/features.html)

Translate test behavior into the concrete command and failure mode in the repository.

## Test Layout

- Put unit tests near implementation when they need private module access.
- Put integration tests under `tests/` when they should use the crate like an external caller.
- Use documentation tests when examples in public API docs should compile and run.
- Use `examples/` when sample binaries should compile as part of validation.
- Use feature-gated tests only when the crate's feature matrix is part of the public behavior.

## Command Selection

Start narrow, then widen:

```bash
cargo test
```

Target one package in a workspace:

```bash
cargo test -p package-name
```

Run all workspace tests:

```bash
cargo test --workspace
```

Run all targets and features when feature interactions matter:

```bash
cargo test --all-targets --all-features
```

Filter by test name:

```bash
cargo test some_test_name
```

Show test output:

```bash
cargo test some_test_name -- --nocapture
```

Run documentation tests only when public docs are the focus:

```bash
cargo test --doc
```

## Failure Triage

Classify failures by the first concrete break:

- compile failure: source, dependency, feature, target, or MSRV problem
- unit test failure: internal behavior changed
- integration test failure: public behavior or crate boundary changed
- doctest failure: public example or documentation drifted
- feature failure: optional dependency or cfg path broke
- workspace failure: package selection, shared dependency, or target matrix issue

Read the first relevant compiler or test error before changing code. Rust output is usually precise; preserve that precision in the user-facing explanation.

## Implementation Guidance

- Add tests at the same boundary the user cares about.
- Prefer deterministic tests over sleeps, timing assumptions, or network calls.
- Use temporary directories for filesystem behavior.
- Avoid snapshot tests unless the repo already uses them or the output is intentionally broad.
- Keep error-message assertions focused on stable, user-visible text.

## Output Shape

Return:

1. `Test scope`: package, workspace, target, feature, or doc-test boundary.
2. `Commands`: exact commands run or recommended.
3. `Result`: pass, fail, or skipped with the concrete reason.
4. `Failure mode`: compile, unit, integration, doctest, feature, or workspace issue.
5. `Fix direction`: the smallest code, test, dependency, or docs change that addresses the failure.

## Guardrails

- Do not run broad feature or workspace matrices first when a targeted command proves the change.
- Do not hide compile failures behind test summaries.
- Do not weaken tests to match broken behavior unless the user explicitly approves the behavior change.
- Do not add network-dependent tests without a repo-owned test strategy for them.

Wersje

RepozytoriumWynikLicencja
Ta strona · gaelic-ghost/socket100Apache-2.0
netalertx/NetAlertX100GPL-3.0
VilnaCRM-Org/rust-service-template96CC0-1.0

Migawka bazy z 13.11.2026 · wersja paczki 7a96bf75b56e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100cargo-test
    Wspiera testowanie w Rust przez cargo test: testy jednostkowe, integracyjne i benchmarki oraz debugowanie nieudanych testów.
  • 100rust-testing
    Pomaga pisać i uruchamiać testy w Rust przez cargo test: jednostkowe, integracyjne, doc testy i oparte na własnościach, oraz konfigurować infrastrukturę testową.
  • 90rust-testing
    Pisze testy w aplikacjach Rust poza cargo test: jednostkowe, integracyjne, tokio, katalogi tymczasowe i proptest.
  • 100rust-testing
    Opisuje testowanie w Rust z cargo test, tokio-test i mockall: testy jednostkowe i integracyjne, testy async, mockowanie i benchmarki.
  • 100testing
    Pisze i uruchamia testy aplikacji Frappe: jednostkowe, integracyjne i UI, oraz pomaga w debugowaniu porażek i konfiguracji CI.
  • 100rust-testing-quality
    Pomaga pisać, organizować i uruchamiać testy w Rust: jednostkowe, integracyjne, doc testy, proptest, benchmarki criterion i cargo-mutants.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.