pytest-gremlins vs Stryker Mutator
pytest-gremlins
github.comStryker Mutator
stryker-mutator.ioSide by side
| Figure | pytest-gremlins | Stryker Mutator |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Linux | Yes | — |
| API | — | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 1 |
| Spec score · Mutation Testing Tools | 7.7 (#10) | 7.2 (#18) |
| License | The project is MIT licensed. | Stryker is released under the Apache 2.0 license. |
| Purpose | pytest-gremlins is a pytest plugin that injects small code mutations and checks whether tests catch them. | Stryker performs mutation testing by inserting changes into code and running unit tests against the changed code to assess test effectiveness. |
| Setup | The project says mutation testing can be started with `pip install pytest-gremlins` and `pytest --gremlins`. | Stryker.NET is installed using NuGet, while the Stryker4s guide provides sbt, Mill, and Maven plugin setup paths. |
Plans
In their own words
pytest-gremlins
pytest-gremlins is a pytest plugin for checking whether an existing test suite catches small changes to code. It runs mutation tests against Python projects and can report results in the console, HTML, or JSON, including multiple formats in one run. Getting started requires Python 3.11 or later, pytest 7.0 or later, and existing tests; installation is documented with pip, uv, and Poetry. The project’s quick-start command is `pytest --gremlins`. To manage execution, it uses mutation switching, coverage-guided test selection, incremental analysis, and parallel execution, and it works with pytest-xdist. Options can be set in `pyproject.toml` or with command-line flags, while inline pragmas can pardon specific mutations. A GitHub Action can run the checks and fail a workflow if its score misses a threshold; CI examples also cover GitLab CI, CircleCI, and Dagger. It is a free, MIT-licensed package for Linux, classified as Alpha. The guide warns that an initial run may take 10–100 times as long as a normal test run, though caching can shorten later runs. It also notes that equivalent mutations can make a perfect score unattainable and unnecessary.
Stryker Mutator
Stryker Mutator is mutation-testing software for JavaScript, TypeScript, C#, and Scala. It changes source code in more than 30 defined ways, then runs unit tests against those variants to show how effectively the tests detect faults. The project supports incremental analysis, parallel execution, surviving-mutant reports, and mutation quality gates. It is test-runner agnostic, with listed integrations including Cucumber, Jasmine, Jest, Karma, Mocha, Tap, Vitest, and a command runner. Code analysis and parallel test-runner processes are used to speed runs, although the FAQ notes that mutation jobs can be slow and recommends improving unit-test performance or limiting files. Stryker is free, released under Apache 2.0, and available through API or self-hosted use. Its cloud dashboard stores reports and mutation-score badges, free for open source, with GitHub account setup and github.com as the supported Git provider. Reports can be sent directly or by HTTP PUT with an API key.