突变测试

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用

当用户出现以下情况时,请使用此技能: 提及“mewt”、“muton”或“突变测试” 需要配置或优化突变测试活动 想要运行 mewt run 并且需要先进行设置帮助

何时不使用

当用户出现以下情况时,请勿使用此技能: 想要分析或报告已完成的活动结果 询问测试或覆盖率但未提及突变测试

快速入门

加载工作流程/configuration.md — 从mewt init到经过验证、准备运行的活动的 5 阶段指南。一般问题或不熟悉的命令?运行mewt --help或mewt <subcommand> --help,然后进行协助。

参考索引

文件 · 内容工作流程/configuration.md · 5 阶段指南:初始化、范围、优化、验证、运行引用/optimization-strategies.md · 每个文件定位、两阶段活动、突变类型过滤

结果意味着什么

Caught/TestFail:测试检测到突变(好) Uncaught:突变幸存 - 表示未经测试的逻辑 Timeout:测试花费太长时间,没有结论 Skipped:更严重的突变已经在同一行失败

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@trailofbits · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Mutation Testing — Campaign Configuration (mewt/muton)

> **Note**: muton and mewt share identical interfaces but target different languages — mewt for general-purpose languages (Rust, Solidity, Go, TypeScript, JavaScript), muton for TON smart contracts (Tact, Tolk, FunC). All examples use `mewt` commands, but they work exactly the same with `muton`. File names change accordingly: `mewt.toml` → `muton.toml`, `mewt.sqlite` → `muton.sqlite`.

## When to Use

Use this skill when the user:
- Mentions "mewt", "muton", or "mutation testing"
- Needs to configure or optimize a mutation testing campaign
- Wants to run `mewt run` and needs help getting set up first

## When NOT to Use

Do not use this skill when the user:
- Wants to analyze or report on completed campaign results
- Asks about tests or coverage without mentioning mutation testing

---

## Quick Start

Load [workflows/configuration.md](workflows/configuration.md) — a 5-phase guide from `mewt init` to a validated, ready-to-run campaign.

**General question or unfamiliar command?**
Run `mewt --help` or `mewt <subcommand> --help`, then assist.

---

## Reference Index

| File | Content |
|------|---------|
| [workflows/configuration.md](workflows/configuration.md) | 5-phase guide: init, scope, optimize, validate, run |
| [references/optimization-strategies.md](references/optimization-strategies.md) | Per-file targeting, two-phase campaigns, mutation type filtering |

---

## Essential Commands

```bash
# Initialize and mutate
mewt init                    # Create mewt.toml and mewt.sqlite
mewt mutate [paths]          # Generate mutants without running tests
mewt run [paths]             # Run the full campaign

# Inspect configuration and scope
mewt print config            # View effective configuration
mewt print targets           # Table of all targeted files
mewt print mutations --language [lang]  # Available mutation types
mewt status                  # Mutant count and per-file breakdown

# Investigate specific mutants
mewt print mutants --target [path]   # All mutants for a file
mewt print mutants --severity high   # Filter by severity
mewt print mutant --id [id]          # View mutated code diff
mewt test --ids [ids]                # Re-test specific mutants
```

---

## What Results Mean

- **Caught/TestFail**: Tests detected the mutation (good)
- **Uncaught**: Mutation survived — indicates untested logic
- **Timeout**: Tests took too long, inconclusive
- **Skipped**: A more severe mutant already failed on the same line

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。