Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] Improve Infection performance executed against slow test suites #1539

Merged
merged 8 commits into from Jul 25, 2021

Commits on Jul 22, 2021

  1. Run only those test cases that cover mutated line

    Previously, we ran **files** that contains tests that cover mutated line. In `phpunit.xml` this is all we can do.
    
    To run **test cases** that cover mutated line from that files, we can only use `--filter` options. This is what this change does
    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    97677c8 View commit details
    Browse the repository at this point in the history
  2. Split ArgumentsAndOptionsBuilder::build into 2 methods: for initial…

    … tests run and for mutant
    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    e0cc2b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7ae27ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a47acff View commit details
    Browse the repository at this point in the history
  5. Use more performant way of building --filter option, not escaping n…

    …on-unique test cases and using `foreach`
    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    bd4316c View commit details
    Browse the repository at this point in the history
  6. Add --only-covering-test-cases option to enable/disable filtering b…

    …y covering test cases
    
    By default, Infection runs all tests cases from **files** that contain at least 1 test case that cover mutated line
    
    Using `--only-covering-test-cases`, we can enable filtering and run only those test cases from files, that cover mutated line.
    
    For very fast test suites this decreases performance (see #1539).
    
    For slow test suites (like functional / integration tests) - this can dramatically improve performance of Mutation Testing / Infection
    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    b185ad9 View commit details
    Browse the repository at this point in the history
  7. Use preg_quote() instead of escapeshellcmd to prepare string to b…

    …e a regular expression
    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    7a23d0b View commit details
    Browse the repository at this point in the history
  8. Fix CS

    maks-rafalko committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    64c1591 View commit details
    Browse the repository at this point in the history