kt3k / coveralls-gradle-plugin

👨‍🔧 gradle plugin for coveralls
https://plugins.gradle.org/plugin/com.github.kt3k.coveralls
MIT License
253 stars 54 forks source link

Add a SourceReportFactory for PIT reports #70

Closed thejohnfreeman closed 7 years ago

thejohnfreeman commented 7 years ago

I'd like to use mutation coverage with PIT for my coverage report. It can report in XML. Any assistance would be appreciated, from doing all the work (thank you!) to offering advice for implementing a SourceReportFactory. As a note to myself, I can probably best deduce the requirements by reading the comments in CoberturaSourceReportFactory).

thejohnfreeman commented 7 years ago

Here is my plan after browsing the code.

  1. Check out the commit when the test fixture was added.
  2. ~Configure PIT to run on the code and tests as they existed at that time and report in XML.~ Blocked because PIT cannot mutate Groovy 2.a. Copy kt3k/BankAccount-DCI sources as an example of a "small Java project with tests" to the fixture directory. 2.b. Run PIT on that project to generate an XML report.
  3. Copy the PIT report to the test fixture directory as it exists today.
  4. Write org.kt3k.gradle.plugin.coveralls.domain.PITSourceReportFactoryTest based on CoberturaSourceReportFactoryTest, associating the PIT report with the sources in the fixture directory.
  5. Write org.kt3k.gradle.plugin.coveralls.domain.PITSourceReportFactory based on CoberturaSourceReportFactory.
  6. Add some instructions to the README for configuring the plugin for PIT.
thejohnfreeman commented 7 years ago

This plugin is written entirely in Groovy, and PIT doesn't work with Groovy source, so I cannot generate a report based on the existing fixture. Instead, I'll add one of @kt3k's (unlicensed) small Java projects as a second fixture and continue.