Strive for 100% mutation coverage #3708

Open
rnveach opened this Issue Jan 10, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@rnveach
Member

rnveach commented Jan 10, 2017

Now that we implemented pitest in #3271, we should try to increase the mutation coverage for our different checks.
Currently, header package has the lowest percentage at 78%, followed by metrics package at 83%.

FYI: Mutation coverage means a test should prove a line of production code exists. Mutation fails if a line or production code is distorted but no unchanged tests fail. At least one test should fail if production code is changed somehow.

Attention: it is recommended to start with the most easy to fix cases to raise level close to 100%. Only as we reach 100% we could guaranty no leak in testing. It would be better ti finish packages that executed less in time make them 100% and group them in one profile.

To run report on blocks package (profiles are exists for all packages):
mvn clean verify -Ppitest-checks-blocks org.pitest:pitest-maven:mutationCoverage

Current state:

$ grep -E "pitest-checks|mutationThreshold" pom.xml | sed -E "s/(<\/?id>|<\/?mutationThreshold>)//g"
      pitest-checks-blocks
              97
      pitest-checks-coding
              93
      pitest-checks-design
              98
      pitest-checks-header
              78
      pitest-checks-imports
              94
      pitest-checks-indentation
              94
      pitest-checks-javadoc
              95
      pitest-checks-metrics
              83
      pitest-checks-modifier
              100
      pitest-checks-naming
              98
      pitest-checks-regexp
              93
      pitest-checks-sizes
              94
      pitest-checks-whitespace
              96

rnveach added a commit to rnveach/checkstyle that referenced this issue Jan 14, 2017

romani added a commit that referenced this issue Jan 14, 2017

romani added a commit that referenced this issue Jan 14, 2017

Issue #3708: com.puppycrawl.tools.checkstyle.checks.metrics.AbstractC…
…omplexityCheck exluded as it is deprecated

romani added a commit that referenced this issue Jan 14, 2017

@rnveach rnveach added the medium label Mar 2, 2017

@romani romani added the GSoC2017 label May 5, 2017

romani added a commit that referenced this issue Sep 9, 2017

Issue #3708: introduction of check_survived for coding, blocks, impor…
…ts, whitespace profiles to avoid extra leacks

romani added a commit that referenced this issue Sep 9, 2017

Issue #3708: introduction of check_survived for coding, blocks, impor…
…ts, whitespace profiles to avoid extra leacks

romani added a commit that referenced this issue Feb 26, 2018

romani added a commit that referenced this issue Feb 26, 2018

romani added a commit that referenced this issue Feb 26, 2018

@romani romani removed the GSoC2017 label Mar 11, 2018

@romani romani removed this from To Do in Practice What You Preach Mar 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment