百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gremlins

> 测试质量
开源

一个用于 Go 的突变测试工具。

379 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个用于 Go 的突变测试工具。

Gremlins

A mutation testing tool for Go Gremlins is a mutation testing tool for Go. It has been made to work well on smallish Go modules, for example microservices, on which it helps validate the tests, aids the TDD process and can be used as a CI quality gate. As of now, Gremlins doesn't work very well on very big Go modules, mainly because a run can take hours to complete.

Gremlins version

Gremlins is still in its 0.x.x release, which, as per SemVer, doesn't guarantee backward compatibility. What this means for Gremlins is that configuration flags and/or configuration files can change among minor releases. This may be important if you use Gremlins in automated builds, for example in continuous integration pipelines.

Also, while in 0.x.x releases, only the current minor release will be maintained; if we are in v0.2.0, no patch releases will be provided for the v0.1.0 line. Once Gremlins will reach it's 1.x.x release, it will start to be backward compatible, and we'll decide how many releases to maintain at the same time (ex. up to two minors before, as Go itself does).

What is Mutation Testing

Code coverage is unreliable as a measure of test quality. It is too easy to have tests that exercise a piece of code but don't test anything at all.

Mutation testing works by mutating the code exercised by the tests and verifying if the mutation is caught by the test suite. Imagine gremlins going into your code and messing around: will your test suit catch their damage?

Here is a nice intro to mutation testing.

How to use Gremlins

Please refer to the documentation for instructions on how to obtain, configure and use Gremlins.

Quick start

This is just to get you started, do not forget to check the complete documentation.

Download the pre-built binary for your OS/ARCH from the release page and put it somewhere in the PATH, then:

bash
gremlins unleash

Gremlins will report each mutation as:

  • RUNNABLE: In dry-run mode, a mutation that can be tested.
  • NOT COVERED: A mutation not covered by tests; it will not be tested.
  • KILLED: The mutation has been caught by the test suite.
  • LIVED: The mutation hasn't been caught by the test suite.
  • TIMED OUT: The tests timed out while testing the mutation: the mutation actually made the tests fail, but not explicitly.
  • NOT VIABLE: The mutation makes the build fail.

What inspired Gremlins

Mutation testing exists since the early days of computer science, so loads of papers and articles do exists. Gremlins is inspired from those.

Among the existing mutation testing tools, Gremlins is inspired especially by PITest.

Other Mutation Testing tools for Go

There is not much around, except from:

  • go-mutesting

Contributing

See contributing.

License

Gremlins is licensed under the Apache 2.0 License. The Gremlins documentation is licensed under CC BY-SA 4.0.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogogolangmutation-testingtesting

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.