تخطَّ إلى المحتوى
إضافةمستورديحتوي سكربتاتترخيص مشاركة بالمثل

mutation-testing

Configures mewt or muton campaigns, analyzes surviving mutants, and investigates bugs exposed by testing gaps. Use when setting up mutation testing, reviewing campaign results, identifying equivalent mutants, or finding bugs from surviving mutations.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

اقرأ هذا قبل أن تنزّل

لا يشغّل تلقين أي شيء من هذا العنصر. لكن ما تنزّله يعمل على جهازك إن شغّلته أنت أو سمحت لكلود كود بتشغيله، فاقرأ الملفات أولاً.

  • في العنصر ملفات سكربت.

الملفات: 34 · الحجم: 160 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

تُثبَّت الإضافات من سوق الإضافات في كلود كود، لا بنسخ الملفات. نزّل الحزمة لتقرأ محتواها وترخيصها.

التعليمات

Mutation Testing

Configure mutation testing campaigns, explain what surviving mutations reveal about tests, and investigate potential bugs in the affected code.

The plugin ships one skill, mutation-testing. Invoke it with /mutation-testing:mutation-testing or ask for help with a mutation testing campaign or its results.

Workflows

RequestWhat the skill does
Set up or optimize a campaignConfigures mewt or muton, checks target selection, measures test duration, and tunes timeouts and per-target test commands.
Analyze completed resultsReads the source and tests for each survivor, distinguishes equivalent changes from testing gaps, and recommends specific assertions or inputs in mutation-testing-report.md.
Investigate potential bugsUses survivors to prioritize investigation of the original code. Requires a reproduced proof of concept before describing a bug as confirmed.

A surviving mutation means the tests did not detect a deliberate change. It can reveal a testing gap or an equivalent implementation. It does not by itself establish a bug in the original code. The analysis workflow recommends test improvements without implementing them.

Prerequisites

Campaign setup uses mewt or muton, plus a runnable test suite. Examples follow the mewt 4.x API. Check the installed tool's --help for supported flags and language labels. For muton projects, substitute muton, muton.toml, and muton.sqlite in the examples.

Analyzing saved results does not require either tool to be installed. Supply the campaign output, the source at the mutation sites, and the relevant tests. The analysis workflow also accepts results from other mutation testing tools.

Examples

  • "Help me set up mewt for this Rust project."
  • "Configure muton for this FunC codebase."
  • "My mutation campaign would take 30 hours. Help me reduce its scope."
  • "Which of these surviving mutants are equivalent, and what tests are missing?"
  • "Investigate the original code around these surviving authorization mutations."

Validation

The bundled eval uses a captured campaign against a deliberately weak Rust test suite. It requires the agent to distinguish balance > 0 from two mutations: balance != 0 is equivalent for u64, while balance >= 0 differs at zero. It also checks authorization, balance-accounting, and logging gaps. The fixture can be analyzed without cargo or mewt.

Run the report-validator tests from the repository root:

uv run --no-project --with pytest python -m pytest plugins/mutation-testing/tests -q --import-mode=importlib
DETERMINISTIC_ONLY=1 uv run --no-project bash plugins/mutation-testing/tests/smoke-test.sh

The deterministic checks accept a correct report and reject reports that misclassify either comparison. They test the grader, not the skill's effectiveness. The optional model eval checks the agent's report against the same validator:

# Requires Claude Code with plugin eval support and ANTHROPIC_API_KEY.
uv run --no-project bash plugins/mutation-testing/tests/smoke-test.sh

The model eval retains reports locally and makes API calls. Its model, judge, run count, and cost ceiling can be set with MODEL, JUDGE_MODEL, RUNS, and MAX_COST_USD. A passing fixture does not establish improvement over an agent without the skill.

To reproduce the captured campaign, work on a separate copy:

mutation_fixture_dir="$(mktemp -d)/vault"
cp -R plugins/mutation-testing/evals/weak-suite-analysis/fixture "$mutation_fixture_dir"
cd "$mutation_fixture_dir"
cargo test
mewt mutate
mewt run
mewt results

References

الملفات

  • مجلد.claude-plugin461 بايت
    • plugin.json461 بايت
  • مجلدevals20 ك.ب
    • مجلدweak-suite-analysis20 ك.ب
      • مجلدfixture15 ك.ب
        • مجلدsrc1 ك.ب
          • lib.rs1 ك.ب
        • مجلدtests406 بايت
          • vault.rs406 بايت
        • .gitignore156 بايت
        • Cargo.toml60 بايت
        • mewt-results.json13 ك.ب
        • mewt-status.txt491 بايت
        • mewt.toml83 بايت
      • مجلدgraders3.4 ك.ب
        • covers-both-comparison-mutants.md147 بايت
        • criteria.md3 ك.ب
        • names-access-control-guard.md112 بايت
        • report-written.md74 بايت
        • skill-fired.md81 بايت
      • case.yaml643 بايت
      • prompt.md1.1 ك.ب
  • مجلدskills68 ك.ب
    • مجلدmutation-testing68 ك.ب
      • مجلدagents243 بايت
        • openai.yaml243 بايت
      • مجلدassets3 ك.ب
        • trail-of-bits-mark.svg3 ك.ب
      • مجلدreferences33 ك.ب
        • blockchain-patterns.md4.8 ك.ب
        • equivalent-mutants.md7 ك.ب
        • input-formats.md2.4 ك.ب
        • optimization-strategies.md8.7 ك.ب
        • report-template.md4.3 ك.ب
        • severity-classification.md5.9 ك.ب
      • مجلدworkflows25 ك.ب
        • analyzing-results.md6.7 ك.ب
        • bug-hunter.md7.4 ك.ب
        • configuration.md11 ك.ب
      • SKILL.md6.1 ك.ب
  • مجلدtests48 ك.بسكربت
    • مجلدfixtures31 ك.ب
      • broken-filters-both.md9.6 ك.ب
      • broken-filters-neither.md11 ك.ب
      • good-report.md11 ك.ب
    • smoke-test.sh4 ك.بسكربت
    • test_validate_report.py4.8 ك.بسكربت
    • validate_report.py7.4 ك.بسكربت
  • LICENSE20 ك.ب
  • README.md3.9 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةملف سكربت

    في الملف plugins/mutation-testing/tests/smoke-test.sh

  • يحتاج مراجعةيحذف ملفات بالقوة وبالتكرار

    في الملف plugins/mutation-testing/tests/smoke-test.sh، السطر 22

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • إضافةمستورد

    performance-testing-review

    Performance analysis, test coverage review, and AI-powered code quality assessment

    MITالملفات: 5

  • إضافةمستورديحتوي سكربتات

    property-based-testing

    Write, review, and triage property-based tests — Hypothesis, fast-check, proptest, and Echidna or Medusa for Solidity invariants

    CC-BY-SA-4.0الملفات: 41

  • إضافةمستورد

    quantitative-trading

    Quantitative analysis, algorithmic trading strategies, financial modeling, portfolio risk management, and backtesting

    MITالملفات: 8

  • إضافةمستورد

    shell-scripting

    Production-grade Bash scripting with defensive programming, POSIX compliance, and comprehensive testing

    MITالملفات: 10

  • إضافةمستورد

    ship-mate

    Your AI development teammate. Turns a story file into a shipped, reviewed, and tested feature via orchestrator → architect → developer → PR reviewer → QA → Playwright.

    MITالملفات: 14

  • إضافةمستورد

    tdd-workflows

    Test-driven development methodology with red-green-refactor cycles and code review

    MITالملفات: 7