error-prone-support icon indicating copy to clipboard operation
error-prone-support copied to clipboard

Introduce JUnit factory method BugChecker

Open eric-picnic opened this issue 1 year ago • 8 comments

The BugChecker flags JUnit factory methods which do not have a comment with the parameter names of the test method, or which do not follow the naming convention of suffixing the test method name with TestCases.

eric-picnic avatar Oct 27 '22 14:10 eric-picnic

I have broken out some of the changes to a separate PR (https://github.com/PicnicSupermarket/error-prone-support/pull/335), and rebased this branch on top of them.

eric-picnic avatar Nov 04 '22 16:11 eric-picnic

So went through a big rebase. Not sure what made it harder, but I think because there were a lot of overlapping changes.

Let's see what Pitest has to say and let's focus on this one again.

rickie avatar Dec 08 '22 20:12 rickie

  • Surviving mutants in this change: 6
  • Killed mutants in this change: 63
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration 4 43
:zombie:tech.picnic.errorprone.bugpatterns.util.ConflictDetection 1 16
:zombie:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 1 2
:tada:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration$IndexedStatement 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Dec 08 '22 20:12 github-actions[bot]

@rickie, I have pushed a commit for refining some of the tests to get better mutation testing coverage.

eric-picnic avatar Dec 12 '22 15:12 eric-picnic

  • Surviving mutants in this change: 3
  • Killed mutants in this change: 66
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration 1 46
:zombie:tech.picnic.errorprone.bugpatterns.util.ConflictDetection 1 16
:zombie:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 1 2
:tada:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration$IndexedStatement 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Dec 12 '22 15:12 github-actions[bot]

  • Surviving mutants in this change: 3
  • Killed mutants in this change: 66
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration 1 46
:zombie:tech.picnic.errorprone.bugpatterns.util.ConflictDetection 1 16
:zombie:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 1 2
:tada:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration$IndexedStatement 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Dec 19 '22 14:12 github-actions[bot]

  • Surviving mutants in this change: 3
  • Killed mutants in this change: 69
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration 1 46
:zombie:tech.picnic.errorprone.bugpatterns.util.ConflictDetection 1 19
:zombie:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 1 2
:tada:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration$IndexedStatement 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Jan 13 '23 09:01 github-actions[bot]

  • Surviving mutants in this change: 3
  • Killed mutants in this change: 70
class surviving killed
:zombie:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration 1 47
:zombie:tech.picnic.errorprone.bugpatterns.util.ConflictDetection 1 19
:zombie:tech.picnic.errorprone.bugpatterns.util.MoreJUnitMatchers 1 2
:tada:tech.picnic.errorprone.bugpatterns.JUnitFactoryMethodDeclaration$IndexedStatement 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Jan 13 '23 12:01 github-actions[bot]