spideruci / tacoco

Integrated Software Analysis Framework
https://github.com/spideruci/tacoco
MIT License
8 stars 7 forks source link

feat(testRunner): UnifiedTestRunner and friends #107

Closed VijayKrishna closed 4 years ago

VijayKrishna commented 4 years ago
  1. Setting up the UnifiedTestRunner that will rely on the JUnit Platform to autodiscover the execute tests across Junit 5/4/3 and TestNG. a. Issuing separate code paths for test discovery (containsExecutableTest) and test execution (getExecutableTest). b. Using a different discovery path is useful to answer questions questions like: "Does the testClass have executable tests?", and as such, "Can we use the UnifiedTestRunner?" c. If the discovery path fails, then the UnifiedTest runner is not viable for a given test class.
  2. We give the UnifiedTestRunner first dibs as part of the TestType discovery process in AbstractTestRunner.
  3. UnifiedTestListenerAdapter is a TestExecutionListener (Junit Platform) implementation that hosts a ITacocoTestLister implementation. This is the current approach to listening test events from a variety of test listening implementations (Junit X, TestNG, etc).
  4. Updating pom.xml to pull in a compile time dependency on JUnit Platform a. Also adding runtime dependencies on test engines that confrom to the JUnit Platform spec.

Next Steps: integration tests that run on projects.

VijayKrishna commented 4 years ago

@kajdreef i have not setup the tests yet. Will get the ball rolling on that shortly /within this very PR/. In the meanwhile, feel free to try this out locally and see if this works for your the projects that you were trying Tacoco with.

kajdreef commented 4 years ago

When running the changes on the TestNG project it fails, see output here output_spiderMath_TestNG.txt. maybe for now we should consider TestNG first (not using testng-junit5), and then let it check for JUnit4 and JUnit5 through the unified approach.

Interestingly, if I update the TestNG dependency for spiderMath_TestNG to 7.0.0 the errors go away and I can run the project without a problem.

I will continue testing some things out today.