raneomik/infection-tester-adapter
Composer 安装命令:
composer require raneomik/infection-tester-adapter
包简介
Tester Adapter for Infection
README 文档
README
Disclaimer: AI agent experiment - chat-gpt5.2 & claude sonnet 4.5 wrote ~60-75% of this project, by my lack of knowledge on this topic and lack of time to learn... I thought it would be interesting to ask AI "Hey, I discovered this framework, and it comes with its own testing framework. But I love Infection and its metrics to push you to test your tests, and could be cool to add an adapter to it... Are we in ? - yes, Here's your code" (it wasn't this simple, here's some copilot's very verbose journals & reports for french speakers - it's a real mess, sorry, all dev problems seem to be included) and share the result.
The remaining ~20% was based on PhpSpec Adapter and Codeception Adapter. Big shoutout to Maks Rafalko & Infection community for this amazing tool
This package provides test framework adapter of Tester for infection.
Installation
composer require --dev [infection/infection] raneomik/infection-tester-adapter
The adapter should be automatically registered in Infection's runtime through its auto-discovery mechanism.
Usage
Once installed, you can run Infection:
vendor/bin/infection # optional: --test-framework=tester
Configuration
This adapter works directly with your existing Tester tests, with some limitations:
- Tester provides jUnit.xml and Clover.xml coverage reports, but Infection expects a more complete phpunit-like report. This adapter embeds transformation of Testers' reports & generation during the mutation process, so it is NOT recomended to use
--skip-initial-testswith--coverageoptions (it just results in xpath read/FQCN error, unless you are using a script which does the needed trasformation). - Test cases are recommended for a better report result. But seem slower.
- other forms of tests are supported, but need namespaces to be identified by Infection and referenced in report as covering code.
- conflict with files may occur using
--debugoption and result in mutation coverge gen errors. Removing '<configured tmp dir|/tmp>/infection' should fix it.
No additional configuration needed, "Convention over configuration" principle. ("have tests in 'tests/' dir and bootstrap.php file in your tests root" is the main requirement)
Infection configuration file infection.json5.dist.
For more information on configuring Infection, see the Infection documentation.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
License
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
raneomik/infection-tester-adapter 适用场景与选型建议
raneomik/infection-tester-adapter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 96 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 raneomik/infection-tester-adapter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 raneomik/infection-tester-adapter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 96
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-02-17
