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

Make test harness portable #115

Merged
merged 8 commits into from
Feb 5, 2017

Conversation

KengoTODA
Copy link
Member

@KengoTODA KengoTODA commented Feb 2, 2017

Currently AbstractIntegrationTest in test-harness has several hard-coded value which depends on project structure of this repository, such as "../findbugsTestCases", "lib" and "/build/classes/main/". To make this library portable, it's better to remove them.

And one more problem, is that, we provide utilities as abstract class so it might be hard to use with another solution which uses the same way. Basically Rule is better choice for JUnit.

This pull request proposes:

  • several refactorings
    • extract CountMatcher
    • extract AnalysisRunner
  • create new ExternalResource named SpotBugsRule
  • move AbstractIntegrationTest to findbugs subproject
    • this class shouldn't be a part of test-harness, because it contains hard-coded values
  • use SpotBugsRule in FindUnsatisfiedObligationTest

this AbstractIntegrationTest contains several hard-coded path
which depends on structure of spotbugs project.
To let plugin developers code without limitation like this,
it is better to move this Test class to findbugs/src/test.
@KengoTODA KengoTODA self-assigned this Feb 2, 2017
@KengoTODA KengoTODA added this to the SpotBugs 3.1.0 milestone Feb 2, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.728% when pulling e6b40f0 on KengoTODA:make-test-harness-portable into b3f3117 on spotbugs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.728% when pulling 09a09a1 on KengoTODA:make-test-harness-portable into b3f3117 on spotbugs:master.

@@ -0,0 +1,81 @@
package edu.umd.cs.findbugs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably move this to a more appropriate package... maybe edu.umd.cs.findbugs.test?

@@ -0,0 +1,40 @@
package edu.umd.cs.findbugs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@@ -0,0 +1,118 @@
package edu.umd.cs.findbugs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@KengoTODA
Copy link
Member Author

@jsotuyod Renamed at c32aabc. This change needed to change visibility of several legacy classes, please check.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.728% when pulling c32aabc on KengoTODA:make-test-harness-portable into b3f3117 on spotbugs:master.

@jsotuyod jsotuyod merged commit 06d377e into spotbugs:master Feb 5, 2017
@KengoTODA KengoTODA deleted the make-test-harness-portable branch February 5, 2017 22:31
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.

None yet

3 participants