### Check browser runner setup with ripgrep Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/user-behavior-testing/tools.md Lists files and filters for common browser automation framework configurations. ```bash rg --files | rg "playwright|cypress|selenium|webdriver|appium" ``` -------------------------------- ### Install Workersio Skills Source: https://github.com/workersio/skills/blob/main/README.md Commands to install the skills package via various CLI tools or local paths. ```bash npx skills add workersio/skills ``` ```bash codex plugin marketplace add workersio/skills ``` ```bash claude plugin marketplace add workersio/skills claude plugin install wio@workersio-skills ``` ```bash codex plugin marketplace add . ``` -------------------------------- ### Workersio Command Usage Source: https://github.com/workersio/skills/blob/main/README.md Examples of using the wio CLI tool for scanning, testing, and maintaining test suites. ```bash $wio scan checkout ``` ```bash $wio test billing eligibility regression ``` ```bash $wio workload onboarding session ``` ```bash $wio review tests/billing_eligibility_test.py ``` ```bash $wio doctor API test suite ``` -------------------------------- ### Integration Testing with Testcontainers Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-automation-pyramid/tools.md Example of an integration test using Testcontainers to manage a PostgreSQL database instance during test execution. ```java import org.junit.jupiter.api.Test; import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.sql.DriverManager; import static org.junit.jupiter.api.Assertions.assertEquals; @Testcontainers class AccountRepositoryIT { @Container static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:16-alpine"); @Test void storesAndReadsAccountRows() throws Exception { try (var connection = DriverManager.getConnection( postgres.getJdbcUrl(), postgres.getUsername(), postgres.getPassword())) { connection.createStatement() .execute("create table accounts(id int primary key, email text)"); connection.createStatement() .execute("insert into accounts values (1, 'a@example.com')"); var rows = connection.createStatement() .executeQuery("select count(*) from accounts"); rows.next(); assertEquals(1, rows.getInt(1)); } } } ``` -------------------------------- ### Unit Testing with Jest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-automation-pyramid/tools.md Example of a unit test using Jest to verify invoice calculation and event publishing with mock functions. ```javascript // invoice.test.js const { calculateInvoice } = require('./invoice'); test('publishes invoice event with calculated total', () => { const publish = jest.fn(); const invoice = calculateInvoice( [{ sku: 'A-1', priceCents: 1000, quantity: 2 }], { publish } ); expect(invoice.totalCents).toBe(2000); expect(publish).toHaveBeenCalledWith(expect.objectContaining({ type: 'invoice.created', totalCents: 2000, })); }); ``` -------------------------------- ### Enable Codex Agents for Current Project Source: https://github.com/workersio/skills/blob/main/README.md Creates the local project agents directory and copies configuration files from the skills path. ```bash mkdir -p .codex/agents cp /path/to/wio-skills/.codex/agents/wio-*.toml .codex/agents/ ``` -------------------------------- ### Configure and Run FsCheck Property Tests in C# Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/property-based-testing/tools.md Demonstrates using FsCheck with xUnit to verify idempotency and character constraints on a slug normalization function. ```csharp using System.Linq; using FsCheck; using Xunit; public class SlugProperties { [Fact] public void NormalizeSlugIsIdempotent() { var config = Config.QuickThrowOnFailure .WithMaxTest(300) .WithQuietOnSuccess(true); Prop.ForAll(input => { var once = Slug.Normalize(input ?? ""); return Slug.Normalize(once) == once && once.All(c => c == '-' || ('a' <= c && c <= 'z') || ('0' <= c && c <= '9')); }).Check(config); } } ``` -------------------------------- ### Run Stryker.NET for .NET Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/mutation-testing/tools.md Execute mutation testing for C# projects by specifying source and test project paths with threshold gates. ```bash dotnet stryker \ --project src/Billing/Billing.csproj \ --test-project tests/Billing.Tests/Billing.Tests.csproj \ --threshold-high 80 \ --threshold-low 70 \ --threshold-break 70 \ --reporter html ``` -------------------------------- ### Configure and Run Gitleaks Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/security-testing-beyond-sast/tools.md Creates a custom configuration file to allowlist test fixtures and performs a secret scan on the current Git commit range. ```bash cat > .gitleaks.toml <<'EOF' [extend] useDefault = true [[allowlists]] description = "checked-in test fixtures" paths = ['''(^|/)testdata/fixtures/'''] EOF git fetch --depth=50 origin main:refs/remotes/origin/main gitleaks git --log-opts="origin/main..HEAD" \ --config .gitleaks.toml --redact \ --report-format sarif --report-path gitleaks.sarif \ --exit-code 1 . ``` -------------------------------- ### Implement Go Fuzzing with testing.F Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/fuzz-testing-continuous-fuzzing/tools.md Uses the standard Go testing package to perform coverage-guided fuzzing on query parsing logic. ```go package query import ( "net/url" "reflect" "testing" ) func FuzzParseQueryRoundTrip(f *testing.F) { f.Add("user=alice&role=admin") f.Add("q=a%2Bb&empty=") f.Fuzz(func(t *testing.T, raw string) { values, err := url.ParseQuery(raw) if err != nil { return } reparsed, err := url.ParseQuery(values.Encode()) if err != nil { t.Fatalf("encoded query is not parseable: %v", err) } if !reflect.DeepEqual(values, reparsed) { t.Fatalf("round trip changed values: %#v != %#v", values, reparsed) } }) } // CI smoke run: // go test ./... -run=FuzzParseQueryRoundTrip -fuzz=FuzzParseQueryRoundTrip -fuzztime=60s ``` -------------------------------- ### Inspect CI loops Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-feedback-loops/tools.md Search CI configuration files for keywords related to testing, coverage, and execution strategies. ```bash rg "test|coverage|junit|artifact|matrix|schedule|retry|allow_failure|continue-on-error|shard|parallel" .github .gitlab-ci.yml buildkite* .circleci azure-pipelines.yml ``` -------------------------------- ### Enable Codex Hook Config for Current Project Source: https://github.com/workersio/skills/blob/main/README.md Creates the local .codex directory and copies the hooks configuration file. ```bash mkdir -p .codex cp /path/to/wio-skills/.codex/hooks.json .codex/hooks.json ``` -------------------------------- ### Configure and Run mutmut for Python Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/mutation-testing/tools.md Set mutation paths in pyproject.toml and execute mutation testing or result browsing. ```toml # pyproject.toml [tool.mutmut] paths_to_mutate = ["src/"] pytest_add_cli_args_test_selection = ["tests/"] mutmut run mutmut browse ``` -------------------------------- ### Run OWASP ZAP Baseline Scans in Docker Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/risk-based-testing/tools.md Use these commands to generate a baseline configuration file and subsequently execute a scan with custom rules for CI/CD gating. ```bash # Generate once, then edit selected rules from WARN to FAIL or IGNORE: docker run --rm -v "$(pwd):/zap/wrk/:rw" ghcr.io/zaproxy/zaproxy:stable \ zap-baseline.py -t "$APP_URL" -g zap-rules.conf # CI gate: docker run --rm -v "$(pwd):/zap/wrk/:rw" ghcr.io/zaproxy/zaproxy:stable \ zap-baseline.py -t "$APP_URL" -c zap-rules.conf -r zap-report.html ``` -------------------------------- ### Enable Codex Agents Globally Source: https://github.com/workersio/skills/blob/main/README.md Creates the global agents directory and copies configuration files to enable Codex agents for the user. ```bash mkdir -p ~/.codex/agents cp .codex/agents/wio-*.toml ~/.codex/agents/ ``` -------------------------------- ### Configure and Run StrykerJS Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/mutation-testing/tools.md Define mutation testing parameters in stryker.conf.json and execute the runner. ```json // stryker.conf.json { "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", "packageManager": "npm", "testRunner": "vitest", "mutate": ["src/**/*.ts", "!src/**/*.d.ts"], "reporters": ["html", "clear-text", "progress"], "thresholds": { "high": 80, "low": 70, "break": 70 } } npx stryker run ``` -------------------------------- ### Find concept documentation Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/testing-core-concepts/tools.md Search for documentation related to testing concepts like assertions, invariants, and property-based testing. ```bash rg -n "assertion|assertions|invariant|invariants|safety propert|liveness|property-based|metamorphic|oracle" docs references README* . ``` -------------------------------- ### Configure ESLint for JavaScript Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/static-testing-static-analysis/tools.md Define linting rules and file patterns in the flat configuration format. Use the provided CI command to enforce zero-warning thresholds. ```javascript // eslint.config.js import { defineConfig } from "eslint/config"; export default defineConfig([ { files: ["src/**/*.js"], ignores: ["dist/**"], rules: { "no-console": ["error", { allow: ["warn", "error"] }], }, }, ]); // CI: npx eslint src --max-warnings 0 ``` -------------------------------- ### Define k6 Load Test Scenario and Thresholds Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/performance-load-and-stress-testing/tools.md Configures a ramping virtual user scenario and performance thresholds for API testing. Requires the k6 environment to execute the exported default function. ```javascript import http from 'k6/http'; import { check, sleep } from 'k6'; export const options = { scenarios: { steady_api_load: { executor: 'ramping-vus', startVUs: 0, stages: [ { duration: '30s', target: 20 }, { duration: '2m', target: 20 }, { duration: '30s', target: 0 }, ], }, }, thresholds: { http_req_failed: ['rate<0.01'], http_req_duration: ['p(95)<400'], checks: ['rate>0.95'], }, }; export default function () { const baseUrl = __ENV.BASE_URL || 'https://staging.example.com'; const res = http.get(`${baseUrl}/api/products?limit=20`); check(res, { 'status is 200': (r) => r.status === 200, 'returns JSON': (r) => String(r.headers['Content-Type']).includes('application/json'), }); sleep(1); } ``` -------------------------------- ### Workload Documentation Template Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Use this markdown template to document the design, coverage, and implementation details of a new workload. ```markdown ## Workload Actor: [...] Goal: [...] Shape: [browser/API/CLI/job/load/synthetic/stateful] References used: [...] ## Existing Coverage Existing workloads found: [...] What they cover: [...] Gap this workload fills: [...] Why this is not only a wrapper/runner/seed sweep: [...] ## Coverage Interactions: [...] Bug-prone areas: [...] New failure surface/adversarial class/oracle: [...] Invariants/assertions: [...] ## Adversarial Model Misuse paths: [...] Invalid transitions: [...] Boundary inputs: [...] Duplicate/replayed actions: [...] Permission/tenant edges: [...] Dependency/time/concurrency faults: [...] ## Variance And Replay Seed: [...] Variable inputs/branches/timing/scale: [...] Replay command or notes: [...] ## Implementation And Validation Tooling: [...] Files changed: [...] Command/result: [...] ## Falsification Check Plausible bug caught: [...] Assertion/invariant that fails: [...] Manual mutation or fault tried, if any: [...] ## Limits [environment, data, dependency, runtime, cleanup, or flake risk] ``` -------------------------------- ### Defining Performance Thresholds in k6 Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/risk-based-testing/tools.md Configure scenario-specific thresholds to enforce SLOs and trigger non-zero exit codes upon failure. ```javascript import http from 'k6/http'; import { check } from 'k6'; export const options = { scenarios: { checkout: { executor: 'constant-vus', vus: 20, duration: '3m' }, }, thresholds: { http_req_failed: ['rate<0.01'], 'http_req_duration{scenario:checkout}': ['p(95)<500'], checks: ['rate>0.99'], }, }; export default function () { const res = http.post(`${__ENV.BASE_URL}/checkout`, JSON.stringify({ sku: 'plan-pro' }), { headers: { 'Content-Type': 'application/json' }, }); check(res, { 'checkout accepted': (r) => r.status === 201, }); } ``` -------------------------------- ### Find property tests Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/testing-core-concepts/tools.md Search for property-based testing frameworks and patterns within the source code. ```bash rg -n "@given|hypothesis|forAll|fc\.property|quickcheck|proptest|jqwik|invariant" test tests src ``` -------------------------------- ### Configure and Run PIT for JVM Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/mutation-testing/tools.md Configure PIT via Maven plugin settings and execute mutation coverage analysis. ```xml org.pitest pitest-maven com.acme.billing.service* com.acme.billing* 75 80 HTML XML true mvn test-compile org.pitest:pitest-maven:mutationCoverage ``` -------------------------------- ### Configure Ruff for Python Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/static-testing-static-analysis/tools.md Set target versions and linting rules within the pyproject.toml file. The CI command supports GitHub-specific output formats. ```toml # pyproject.toml [tool.ruff] target-version = "py311" line-length = 100 exclude = ["build", "dist", ".venv"] [tool.ruff.lint] select = ["E4", "E7", "E9", "F", "B"] ignore = ["E501"] unfixable = ["B"] # CI: ruff check . --output-format=github ``` -------------------------------- ### Configure ChaosEngine with LitmusChaos Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/resilience-testing-and-fault-injection/tools.md Sets up a network latency experiment for the checkout-api deployment using a specific chaos service account. ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: checkout-network-latency namespace: checkout spec: engineState: "active" annotationCheck: "false" appinfo: appns: "checkout" applabel: "app=checkout-api" appkind: "deployment" chaosServiceAccount: pod-network-latency-sa experiments: - name: pod-network-latency spec: components: env: - name: NETWORK_LATENCY value: '2000' - name: TOTAL_CHAOS_DURATION value: '60' ``` -------------------------------- ### Configure SpotBugs for Java Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/static-testing-static-analysis/tools.md Integrate the SpotBugs Maven plugin to enforce build failures on detected violations. Use an exclude filter file to suppress specific warnings. ```xml com.github.spotbugs spotbugs-maven-plugin true 0 spotbugs-exclude.xml check ``` -------------------------------- ### Configure golangci-lint for Go Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/static-testing-static-analysis/tools.md Define enabled linters and execution timeouts in the configuration file. The CI command allows checking only new issues from the latest revision. ```yaml # .golangci.yml version: "2" linters: default: none enable: - govet - staticcheck - errcheck - gosec issues: max-issues-per-linter: 0 max-same-issues: 0 run: timeout: 5m modules-download-mode: readonly # CI: golangci-lint run ./... --new-from-rev=HEAD~ ``` -------------------------------- ### Configure pytest with Coverage and Reporting Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-suite-health-diagnostics/tools.md Sets up pytest options in pyproject.toml for duration profiling, branch coverage, and XML report generation. ```toml # pyproject.toml [tool.pytest.ini_options] testpaths = ["tests"] addopts = [ "-ra", "--durations=10", "--durations-min=0.5", "--cov=src/payments", "--cov-branch", "--cov-report=term-missing:skip-covered", "--cov-report=xml:reports/coverage.xml", "--cov-fail-under=85", "--junitxml=reports/pytest.xml" ] ``` -------------------------------- ### Run OWASP Dependency-Check via CLI Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/security-testing-beyond-sast/tools.md Executes a vulnerability scan on the current directory and generates both HTML and JUnit reports with a CVSS failure threshold. ```bash dependency-check.sh \ --project "payments-api" \ --scan . \ --format HTML \ --format JUNIT \ --out build/dependency-check \ --nvdApiKey "$NVD_API_KEY" \ --junitFailOnCVSS 7 \ --failOnCVSS 7 ``` -------------------------------- ### $wio test [target] Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Discovers a valuable candidate, selects a strategy, writes one test, validates, reviews, and keeps only if valuable. ```APIDOC ## $wio test [target] ### Description Discovers a valuable candidate, picks a strategy, writes one test, validates, reviews, and keeps only if valuable. ### Parameters - **target** (string) - Required - The behavior, code path, or regression risk to test. ``` -------------------------------- ### Execute @workersio/skills command modes Source: https://github.com/workersio/skills/blob/main/README.md List of available command modes for the wio CLI tool to manage testing workflows. ```text $wio scan # Find high-value tests to add next. $wio test # Run candidate discovery, strategy, implementation, and review. $wio workload # Generate realistic, replayable workloads with new bug-finding value. $wio review # Judge whether a test should be kept, redone, or removed. $wio doctor # Audit suite health, weak assertions, flakes, mocks, and CI blind spots. ``` -------------------------------- ### Execute Gradle tests with build cache Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/tools.md Runs tests with build cache enabled and fail-fast behavior for faster CI feedback. ```bash # Preserve Gradle User Home between CI runs so test outputs can be reused. ./gradlew test --build-cache --fail-fast ``` -------------------------------- ### Find routes and workflows with ripgrep Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/user-behavior-testing/tools.md Searches source and application directories for routing and controller definitions. ```bash rg "router|route|Controller|Handler|screen|page|endpoint|mutation|command" src app ``` -------------------------------- ### Configure and Run OWASP ZAP Baseline Scan Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/security-testing-beyond-sast/tools.md Defines custom alert rules in a configuration file and executes a passive baseline scan against a target URL using the official Docker image. ```bash cat > zap-rules.conf <<'EOF' 10020 FAIL (X-Frame-Options Header Scanner) 10021 FAIL (X-Content-Type-Options Header Missing) 10015 WARN (Cache-control headers) * OUTOFSCOPE .*\.(png|jpg|css|js)$ EOF docker run --rm -v "$PWD:/zap/wrk:rw" ghcr.io/zaproxy/zaproxy:stable \ zap-baseline.py -t "$APP_URL" -c zap-rules.conf -I -J zap-report.json -m 3 -s ``` -------------------------------- ### Configure Istio VirtualService for Fault Injection Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/resilience-testing-and-fault-injection/tools.md Defines a VirtualService that injects a 2-second delay for 25% of requests when the x-resilience-test header is present. ```yaml apiVersion: networking.istio.io/v1 kind: VirtualService metadata: name: payments-delay namespace: checkout spec: hosts: - payments.checkout.svc.cluster.local http: - match: - headers: x-resilience-test: exact: "true" fault: delay: fixedDelay: 2s percentage: value: 25 route: - destination: host: payments.checkout.svc.cluster.local - route: - destination: host: payments.checkout.svc.cluster.local ``` -------------------------------- ### Find report configuration Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-feedback-loops/tools.md Locate configuration settings for test reports, coverage outputs, and diagnostic artifacts. ```bash rg "junit|lcov|coverage.xml|html-report|trace|screenshot|artifact|upload-artifact|reports:junit" . ``` -------------------------------- ### Run cargo-mutants for Rust Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/mutation-testing/tools.md Execute mutation testing on a specific Rust package with defined timeouts and output directories. ```bash cargo mutants \ --in-place \ --package billing-core \ --timeout 60 \ --output target/mutants ``` -------------------------------- ### Run Clippy for Rust Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/static-testing-static-analysis/tools.md Execute Clippy via Cargo with specific flags to treat warnings as errors and enable pedantic checks. ```bash # CI lint gate cargo clippy --workspace --all-targets --all-features -- \ -Dwarnings \ -Wclippy::pedantic \ -Dclippy::unwrap_used ``` -------------------------------- ### Find liveness/progress checks Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/testing-core-concepts/tools.md Search for liveness and progress-related checks such as timeouts, retries, and SLOs. ```bash rg -n "eventually|retry|terminal|drain|progress|fairness|timeout|deadline|SLO|poll" . ``` -------------------------------- ### Run AFL++ Fuzzing Campaign Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/fuzz-testing-continuous-fuzzing/tools.md Builds an instrumented target and executes a fuzzing campaign with a 300-second timeout for path discovery. ```bash mkdir -p seeds findings printf '{"schema":1,"items":[]}\n' > seeds/valid.json CC=afl-cc CXX=afl-c++ cmake -S . -B build -DENABLE_FUZZING=ON cmake --build build --target json_parser_fuzz AFL_NO_UI=1 AFL_EXIT_ON_TIME=300 \ afl-fuzz -i seeds -o findings -- ./build/json_parser_fuzz @@ ``` -------------------------------- ### Find permissions and roles with ripgrep Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/user-behavior-testing/tools.md Searches for authorization-related logic and role-based access control patterns. ```bash rg "role|permission|authorize|policy|can\(|forbidden|unauthorized|admin" src test tests ``` -------------------------------- ### Test Documentation Template Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Use this markdown template to document the rationale, strategy, and validation results for new tests. ```markdown ## Candidate [behavior/failure mode chosen and why it beat alternatives] ## Strategy [test level, oracle, data/fixtures, doubles, feedback loop, references used, and why this preserves the real risk] ## Changes [files changed and concise implementation summary] ## Validation [command run and result, or why it was not run] ## Review Verdict: KEEP | REDO | REMOVE Protected behavior: [...] Value: [...] Signal strengths: [...] False-confidence risks: [...] Falsification check: [plausible bug and assertion/invariant that would fail] ## Remaining Risk [what this test does not cover] ``` -------------------------------- ### Implement unit tests with pytest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-automation-pyramid/tools.md Uses fixtures and parametrization for efficient Python unit testing. ```python # tests/unit/test_pricing.py import pytest from shop.pricing import total_cents @pytest.fixture def cart(): return [{"sku": "A-1", "price_cents": 1200, "qty": 2}] @pytest.mark.parametrize( "coupon, expected", [("NONE", 2400), ("TEN_OFF", 2160)], ) def test_total_cents_applies_coupon(cart, coupon, expected): assert total_cents(cart, coupon=coupon) == expected ``` -------------------------------- ### Execute Vegeta Load Attack and Report Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/performance-load-and-stress-testing/tools.md Runs a constant-rate HTTP attack, generates a binary report, and validates results using JSON output and jq. ```bash mkdir -p build/vegeta cat > targets.http < build/vegeta/products.json jq -e \ '.success >= 0.99 and .latencies["95th"] < 400000000' \ build/vegeta/products.json ``` -------------------------------- ### Execute tests with gotestsum Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/flaky-test-detection-and-management/tools.md Runs Go tests with retry logic and report generation enabled. ```bash gotestsum \ --format=pkgname \ --junitfile=reports/go-tests.xml \ --jsonfile=reports/go-tests.jsonl \ --rerun-fails=2 \ --rerun-fails-max-failures=5 \ --packages="./..." \ -- -count=1 -race ``` -------------------------------- ### Configure and Run PITest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-suite-health-diagnostics/tools.md Configures mutation testing thresholds and execution targets in Maven, and provides the command to trigger mutation coverage analysis. ```xml org.pitest pitest-maven com.acme.billing.service* com.acme.billing* 75 80 HTML XML true ``` ```bash mvn test-compile org.pitest:pitest-maven:mutationCoverage ``` -------------------------------- ### $wio workload [target] Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Generates a realistic workload that adds new bug-finding value with adversarial edge cases and invariants. ```APIDOC ## $wio workload [target] ### Description Generates a realistic workload that adds new bug-finding value beyond existing workloads, with important user tasks, adversarial edge cases, assertions, invariants, and controlled variance. ### Parameters - **target** (string) - Required - The target for workload generation. ``` -------------------------------- ### $wio review [target] Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Reviews a test for meaningful customer or developer value and returns a status of KEEP, REDO, or REMOVE. ```APIDOC ## $wio review [target] ### Description Review a test for meaningful customer or developer value and return KEEP, REDO, or REMOVE. ### Parameters - **target** (string) - Required - The test to review. ``` -------------------------------- ### Scan Output Template Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Use this markdown structure to report findings, ranked candidates, and recommended next steps after performing a scan. ```markdown ## Scope And Evidence [target, files/commands inspected, tests/CI found] ## Ranked Candidates 1. [behavior] - impact: [why it matters], risk: [fault mechanism], references: [files used], strategy: [level/tool], cost: [small/medium/large] ## Best Next Test [first investment and why it beats the alternatives] ## Avoid [coverage-padding or low-signal tests to skip] ## Open Questions [only questions that would materially change the ranking] ``` -------------------------------- ### Find local test commands Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-feedback-loops/tools.md Use ripgrep to search for common test-related script definitions across various project configuration files. ```bash rg "\"test|test:|ci|coverage|e2e|integration\"" package.json pyproject.toml tox.ini noxfile.py Makefile justfile Taskfile.yml pom.xml build.gradle Cargo.toml ``` -------------------------------- ### Execute JMeter Load Test via CLI Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/performance-load-and-stress-testing/tools.md Run a JMX test plan in non-GUI mode using command-line arguments to override configuration properties. ```bash # perf/orders.jmx contains: # Thread Group + HTTP Request Defaults + HTTP Samplers + JSON/Response Assertions. jmeter -n \ -t perf/orders.jmx \ -l build/jmeter/orders.jtl \ -j build/jmeter/jmeter.log \ -e -o build/jmeter/html \ -Jbase_url=https://staging.example.com \ -Jusers=200 \ -Jramp_seconds=120 \ -Jduration_seconds=600 ``` -------------------------------- ### Simulate TCP Latency with Toxiproxy CLI Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/resilience-testing-and-fault-injection/tools.md Configures a proxy for a Redis instance and injects latency to test application timeout and retry logic. ```bash toxiproxy-cli create -l localhost:26379 -u localhost:6379 checkout_test_redis redis-cli -p 26379 SET cart:42 ready toxiproxy-cli toxic add \ -t latency \ -a latency=1000 \ -a jitter=200 \ checkout_test_redis redis-cli -p 26379 GET cart:42 toxiproxy-cli toxic remove \ -n latency_downstream \ checkout_test_redis ``` -------------------------------- ### Configure and implement Playwright tests Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-automation-pyramid/tools.md Includes the base configuration for test environments and a sample end-to-end test case for a checkout flow. ```typescript // playwright.config.ts import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './e2e', forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, use: { baseURL: 'http://localhost:3000', trace: 'on-first-retry', }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], webServer: { command: 'npm run start', url: 'http://localhost:3000', reuseExistingServer: !process.env.CI, }, }); // e2e/checkout.spec.ts import { test, expect } from '@playwright/test'; test('checkout reaches payment step', async ({ page }) => { await page.goto('/cart'); await page.getByRole('button', { name: 'Checkout' }).click(); await expect(page.getByRole('heading', { name: 'Payment' })).toBeVisible(); }); ``` -------------------------------- ### Configure NetworkChaos with Chaos Mesh Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/resilience-testing-and-fault-injection/tools.md Defines a network delay experiment targeting the checkout-api deployment within the checkout namespace. ```yaml apiVersion: chaos-mesh.org/v1alpha1 kind: NetworkChaos metadata: name: checkout-api-delay spec: action: delay mode: one selector: namespaces: - checkout labelSelectors: app: checkout-api delay: latency: '250ms' correlation: '100' jitter: '50ms' duration: '5m' ``` -------------------------------- ### Run affected tests and builds in Nx Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/overview.md Suitable for monorepos where project boundaries and reverse dependencies are explicitly maintained. ```sh nx affected -t test --base="$BASE_SHA" --head="$HEAD_SHA" nx affected -t build --base="$BASE_SHA" --head="$HEAD_SHA" ``` -------------------------------- ### fast-check Property Test in JavaScript/TypeScript Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/property-based-testing/tools.md Configures global run settings and uses fc.property to verify round-trip logic within a test runner like Vitest. ```javascript import fc from 'fast-check'; import { expect, test } from 'vitest'; import { parseMoneyCents } from './money'; fc.configureGlobal({ numRuns: Number(process.env.FC_NUM_RUNS ?? 250) }); test('parseMoneyCents round-trips formatted cents', () => { fc.assert( fc.property(fc.integer({ min: 0, max: 1_000_000 }), (cents) => { const text = `$${(cents / 100).toFixed(2)}`; expect(parseMoneyCents(text)).toBe(cents); }), ); }); ``` -------------------------------- ### Define a Gatling Load Simulation Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/performance-load-and-stress-testing/tools.md Configures an HTTP protocol, scenario, injection model, and performance assertions using the Gatling Java SDK. ```java import static io.gatling.javaapi.core.CoreDsl.*; import static io.gatling.javaapi.http.HttpDsl.*; import java.time.Duration; import io.gatling.javaapi.core.*; import io.gatling.javaapi.http.*; public class OrdersSimulation extends Simulation { HttpProtocolBuilder httpProtocol = http .baseUrl(System.getProperty("baseUrl", "https://staging.example.com")) .acceptHeader("application/json"); ScenarioBuilder scn = scenario("orders-api") .exec(http("list orders") .get("/api/orders?limit=20") .check(status().is(200))); { setUp( scn.injectOpen( rampUsersPerSec(1).to(25).during(Duration.ofSeconds(60)), constantUsersPerSec(25).during(Duration.ofMinutes(3)) ).protocols(httpProtocol) ).assertions( global().responseTime().percentile3().lt(500), forAll().failedRequests().percent().lte(1.0) ); } } ``` -------------------------------- ### Configure Jest for Coverage and Diagnostics Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-suite-health-diagnostics/tools.md Defines coverage thresholds and performance settings in a Jest configuration file. ```javascript // jest.config.cjs const { defineConfig } = require('jest'); module.exports = defineConfig({ collectCoverage: true, collectCoverageFrom: ['src/**/*.{js,ts}', '!src/**/*.d.ts'], coverageProvider: 'v8', slowTestThreshold: 3, openHandlesTimeout: 1000, coverageThreshold: { global: { branches: 75, functions: 80, lines: 85, statements: 85 }, './src/security/': { branches: 90, lines: 90 }, }, }); ``` -------------------------------- ### Find incidents and regressions with ripgrep Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/user-behavior-testing/tools.md Searches the repository for keywords related to bugs, incidents, and technical debt markers. ```bash rg "regression|incident|bug|support|postmortem|TODO.*test|FIXME.*test" . ``` -------------------------------- ### Find quarantine and skipped tests Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-feedback-loops/tools.md Identify tests marked as skipped, flaky, or quarantined within the source code. ```bash rg "skip|xfail|todo|quarantine|flaky|only\(" test tests e2e src ``` -------------------------------- ### Define a property test with jqwik Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/property-based-testing/tools.md Uses @Property and @ForAll annotations to test round-trip logic with generated integer inputs. ```java import net.jqwik.api.ForAll; import net.jqwik.api.Property; import net.jqwik.api.constraints.IntRange; import org.junit.jupiter.api.Assertions; class MoneyProperties { @Property(tries = 500) void parseCentsRoundTrips( @ForAll @IntRange(min = 0, max = 1_000_000) int cents ) { String text = String.format("$%d.%02d", cents / 100, cents % 100); Assertions.assertEquals(cents, Money.parseCents(text)); } } ``` -------------------------------- ### Select and run impacted tests with Bazel Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/tools.md Uses bazel query to identify tests that depend on a specific target and executes them. ```bash # Run tests that reverse-depend on a changed library target. impacted="$(bazel query 'tests(rdeps(//..., //lib/payments:payments))')" test -z "$impacted" || bazel test $impacted ``` -------------------------------- ### Find user-facing tests with ripgrep Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/user-behavior-testing/tools.md Searches test directories for common testing framework patterns and BDD keywords. ```bash rg "getByRole|getByLabelText|getByText|cy\.|page\.|Scenario|Given|When|Then" test tests e2e src ``` -------------------------------- ### Run Jest Leak Diagnostics Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-suite-health-diagnostics/tools.md Executes Jest with coverage reporting and open handle detection enabled. ```bash npx jest --coverage --detectOpenHandles ``` -------------------------------- ### Define a property test with proptest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/property-based-testing/tools.md Uses the proptest! macro to define idempotent property tests with custom configuration for test case counts. ```rust use proptest::prelude::*; fn normalize_ids(mut ids: Vec) -> Vec { ids.sort_unstable(); ids.dedup(); ids } proptest! { #![proptest_config(ProptestConfig::with_cases(512))] #[test] fn normalize_ids_is_idempotent( ids in prop::collection::vec(0u32..10_000, 0..200) ) { let once = normalize_ids(ids); let twice = normalize_ids(once.clone()); prop_assert_eq!(&once, &twice); prop_assert!(once.windows(2).all(|w| w[0] < w[1])); } } ``` -------------------------------- ### Find safety/security invariants Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/testing-core-concepts/tools.md Search for code patterns related to safety, isolation, and security invariants. ```bash rg -n "tenant|isolation|permission|authz|deny|cannot|never|must not|corrupt|bounds|quota|schema" . ``` -------------------------------- ### $wio scan [target] Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/SKILL.md Finds the highest-value test candidates for a specified codebase, change, or scope. ```APIDOC ## $wio scan [target] ### Description Finds the highest-value test candidates for a codebase, change, or scope. ### Parameters - **target** (string) - Required - The codebase, change, or scope to scan. ``` -------------------------------- ### Implement Risk-Tiered Testing with pytest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/risk-based-testing/tools.md Use custom markers to categorize tests by risk level and execute them selectively via the CLI. ```python # tests/test_transfer_limits.py import pytest @pytest.mark.risk_high @pytest.mark.parametrize("amount, expected_status", [(100, "approved"), (10_001, "review")]) def test_transfer_limit_policy(api_client, amount, expected_status): response = api_client.post("/transfers", json={"amount": amount, "currency": "USD"}) assert response.status_code == 200 assert response.json()["status"] == expected_status # CI example: # pytest --strict-markers -m risk_high --maxfail=1 ``` -------------------------------- ### Configure Playwright Test retries and tracing Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/flaky-test-detection-and-management/tools.md Sets up retry logic and trace capture for CI environments in the Playwright configuration file. ```typescript // playwright.config.ts import { defineConfig } from '@playwright/test'; export default defineConfig({ retries: process.env.CI ? 2 : 0, reporter: [['list'], ['junit', { outputFile: 'test-results/junit.xml' }]], use: { trace: 'on-first-retry', }, }); ``` -------------------------------- ### Implement parameterized tests with JUnit Jupiter Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-automation-pyramid/tools.md Uses CsvSource for data-driven testing in JVM-based projects. ```java import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import static org.junit.jupiter.api.Assertions.assertEquals; class TaxCalculatorTest { private final TaxCalculator calculator = new TaxCalculator(); @ParameterizedTest @CsvSource({ "10000, CA, 10725", "10000, OR, 10000" }) void totalsIncludeStateTax(int subtotalCents, String state, int expectedCents) { assertEquals(expectedCents, calculator.totalCents(subtotalCents, state)); } } ``` -------------------------------- ### Run localized tests with Jest Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/overview.md Use for localized TypeScript utilities with static imports. This approach is not a substitute for full integration or end-to-end validation. ```sh npx jest --findRelatedTests src/pricing/discount.ts --coverage ``` -------------------------------- ### Define Locust User Journey Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/performance-load-and-stress-testing/tools.md Create a Python locustfile to simulate user behavior with custom tasks and response validation. ```python # CI run: # locust -f locustfile.py --headless --users 200 --spawn-rate 20 \ # --run-time 10m --host https://staging.example.com from locust import HttpUser, task, between class ApiUser(HttpUser): wait_time = between(1, 3) @task(3) def browse_products(self): with self.client.get( "/api/products?limit=20", name="GET /api/products", catch_response=True, ) as resp: if resp.status_code != 200: resp.failure(f"unexpected status {resp.status_code}") return try: items = resp.json().get("items", []) except ValueError: resp.failure("invalid JSON") return if not items: resp.failure("empty product list") @task(1) def view_cart(self): self.client.get("/api/cart", name="GET /api/cart") ``` -------------------------------- ### Avoid brittle filename mapping Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/overview.md This pattern is discouraged as it fails to account for importers, shared modules, and non-standard test naming conventions. ```sh git diff --name-only origin/main...HEAD | sed 's#^src/#tests/#' | sed 's#\.ts$#.test.ts#' ``` -------------------------------- ### Configure ClusterFuzzLite PR Fuzzing Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/fuzz-testing-continuous-fuzzing/tools.md GitHub Actions workflow for continuous fuzzing on pull requests using the address sanitizer. ```yaml name: ClusterFuzzLite PR fuzzing on: pull_request: paths: ['**'] permissions: read-all jobs: fuzz: runs-on: ubuntu-latest steps: - name: Build fuzzers uses: google/clusterfuzzlite/actions/build_fuzzers@v1 with: language: c++ github-token: ${{ secrets.GITHUB_TOKEN }} sanitizer: address - name: Run fuzzers uses: google/clusterfuzzlite/actions/run_fuzzers@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} mode: code-change fuzz-seconds: 600 sanitizer: address output-sarif: true ``` -------------------------------- ### Hypothesis Property Test in Python Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/property-based-testing/tools.md Uses the @given decorator to define input strategies and @settings to control test execution parameters. ```python from hypothesis import given, settings, strategies as st from app.tags import normalize_tags tag_lists = st.lists(st.text(min_size=0, max_size=30), max_size=50) @given(tag_lists) @settings(max_examples=300, deadline=None) def test_normalize_tags_is_idempotent(raw_tags): once = normalize_tags(raw_tags) assert normalize_tags(once) == once assert once == sorted(set(once)) assert all(t and t == t.strip().lower() for t in once) ``` -------------------------------- ### Run affected tests with Nx Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/regression-test/tools.md GitHub Actions step to identify and run tests for projects affected by changes relative to the main branch. ```yaml # GitHub Actions step - run: git fetch origin main --depth=1 - run: npx nx affected -t test --base=origin/main --head=HEAD ``` -------------------------------- ### Configure cargo-nextest for CI Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-suite-health-diagnostics/tools.md Defines a CI profile in nextest.toml to manage test retries, timeouts, and JUnit report generation. ```toml # .config/nextest.toml [profile.ci] retries = 2 slow-timeout = { period = "30s", terminate-after = 4, grace-period = "10s" } leak-timeout = { period = "500ms", result = "fail" } status-level = "slow" final-status-level = "flaky" [profile.ci.junit] path = "junit.xml" store-failure-output = true cargo nextest run --profile ci ``` -------------------------------- ### Execute Trivy Vulnerability and Secret Scans Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/security-testing-beyond-sast/tools.md Performs filesystem and container image scans, gating the pipeline on high or critical severity findings. ```bash set -euo pipefail trivy fs \ --scanners vuln,misconfig,secret \ --severity HIGH,CRITICAL \ --exit-code 1 . trivy image \ --scanners vuln,secret \ --severity HIGH,CRITICAL \ --ignore-unfixed \ --exit-code 1 "$IMAGE" ``` -------------------------------- ### Find weak assertions Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/testing-core-concepts/tools.md Locate potentially weak assertions in the test suite that may only check for truthiness or existence. ```bash rg -n "toBeTruthy|toBeDefined|not\.toThrow|assertTrue|assertNotNull|assert_called|toHaveBeenCalled\(" test tests src ``` -------------------------------- ### Configure cargo-nextest retry policies Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/flaky-test-detection-and-management/tools.md Defines retry profiles and per-test overrides for Rust test execution in nextest. ```toml # .config/nextest.toml # CI command: cargo nextest run --profile ci [profile.ci] fail-fast = false retries = { backoff = "fixed", count = 2, delay = "1s" } flaky-result = "fail" [[profile.ci.overrides]] filter = 'test(remote_api)' retries = { backoff = "exponential", count = 2, delay = "5s", jitter = true } ``` -------------------------------- ### Configure Maven Surefire for flake detection Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/flaky-test-detection-and-management/tools.md Configures the Maven Surefire plugin to rerun failed tests and fail the build if flakes are detected. ```xml org.apache.maven.plugins maven-surefire-plugin 2 1 ``` -------------------------------- ### Find long-running tests Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/test-feedback-loops/tools.md Identify slow tests using built-in runner support flags and configuration options. ```bash pytest --durations=20 ``` -------------------------------- ### Implement Risk-Tiered Testing with JUnit Jupiter Source: https://github.com/workersio/skills/blob/main/plugins/wio/skills/wio/references/risk-based-testing/tools.md Use the @Tag annotation to categorize JVM tests and filter them during build execution. ```java import static org.junit.jupiter.api.Assertions.assertThrows; import java.math.BigDecimal; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @Tag("risk-high") class TransferPolicyTest { private final TransferService service = new TransferService(); @Test void requiresReviewForLargeTransfer() { assertThrows(ReviewRequiredException.class, () -> service.authorizeTransfer("acct-1", "acct-2", BigDecimal.valueOf(10_001))); } } // Gradle selection: // test { useJUnitPlatform { includeTags("risk-high") } } ```