Skip to content

Increase score from infection/infection#981

Closed
fredden wants to merge 1 commit intoergebnis:mainfrom
fredden:test-coverage
Closed

Increase score from infection/infection#981
fredden wants to merge 1 commit intoergebnis:mainfrom
fredden:test-coverage

Conversation

@fredden
Copy link
Copy Markdown
Contributor

@fredden fredden commented Oct 3, 2023

This pull request

  • Increases the time-out for mutation tests, allowing more tests to run to completion
  • Require 100% mutation coverage
  • Marks certain code paths as not relevant for mutation testing
  • Replaces regular expression with simple string comparison in src/Format/NewLine.php
  • Increases test coverage
  • Increases mutation coverage score
  • Resolves two psalm complaints

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eba9b55) 97.90% compared to head (fa3107b) 98.03%.

❗ Current head fa3107b differs from pull request most recent head b44a2ef. Consider uploading reports for the commit b44a2ef to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #981      +/-   ##
============================================
+ Coverage     97.90%   98.03%   +0.12%     
+ Complexity      194      179      -15     
============================================
  Files            32       30       -2     
  Lines           813      763      -50     
============================================
- Hits            796      748      -48     
+ Misses           17       15       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fredden fredden force-pushed the test-coverage branch 3 times, most recently from 86999d3 to c751d9f Compare October 5, 2023 08:31
@localheinz localheinz self-assigned this Oct 10, 2023
@localheinz
Copy link
Copy Markdown
Member

Let me think about this, @fredden - I almost fell asleep running mutation tests here!

@fredden
Copy link
Copy Markdown
Contributor Author

fredden commented Oct 10, 2023

Let me think about this

No problem; it's your repository/code after all. :)

I almost fell asleep running mutation tests here!

On my set-up, the mutation tests take around 1.5 minutes on the main branch and around 3.5 minutes here. If I put the time-out back to 10 seconds in infection.json, then then tests take around 1 minute, but half of the tests are skipped again (like they already are on the main branch).

Would you be interested in a pull request which just improves test coverage and doesn't add any "ignore infection test" comments and leaves the infection.json as-is?

@fredden fredden mentioned this pull request Oct 11, 2023
@localheinz
Copy link
Copy Markdown
Member

@fredden

Would you be interested in a pull request which just improves test coverage and doesn't add any "ignore infection test" comments and leaves the infection.json as-is?

Yes, that would be great!

@localheinz
Copy link
Copy Markdown
Member

@fredden

Can we close this in favour of #993?

@fredden
Copy link
Copy Markdown
Contributor Author

fredden commented Dec 6, 2023

I've rebased this following the merge of #993. It looks like there are a couple of mutants escaping still here. I'll try to find some time to sort these out.

@localheinz you're welcome to close this. I don't particularly like all the "ignore" comments that were needed to get to 100% from this tool, and I recall that you seemed against increasing the timeout to get better coverage/reporting.

@localheinz
Copy link
Copy Markdown
Member

Thank you for your work on this, @fredden - but I have decided to close this!

@localheinz localheinz closed this Dec 13, 2023
@fredden fredden deleted the test-coverage branch December 13, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants