Infection
← Tilbage til værktøjer

Infection

Mutation testing framework der måler kvaliteten af dine tests

Version: 0.27.x

Foto: Markus Spiske / Unsplash

Features

  • +Mutation testing
  • +Test quality metrics
  • +MSI (Mutation Score Indicator)
  • +Multiple mutator types
  • +Code coverage integration
  • +Incremental analysis
  • +CI/CD friendly
  • +JSON/HTML reports
  • +PHPUnit integration
  • +Parallel execution

Installation

composer require --dev infection/infection

Almindelige Kommandoer

  • infection - Run mutation testing
  • infection --threads=4 - Parallel execution
  • infection --min-msi=80 - Require minimum MSI
  • infection --show-mutations - Show all mutations
  • infection --filter=src/Calculator.php - Test specific file
  • infection --logger-html=report.html - Generate HTML report

Use Cases

  • Measure test suite quality
  • Find weak or missing tests
  • Improve code coverage effectiveness
  • Detect redundant test assertions
  • Validate critical business logic tests
  • Enforce test quality in CI/CD

Quick Info

Kategori
Testing
Version
0.27.x
Sværhedsgrad
Avanceret