rpau/junit4git

How to integrate with Sputnik runner?

Opened this issue · 1 comments

I want to integrate this with Spock and we are not using any runner explicitly.

We have 500+ Spec classes and we are not using @RunWith explicitly.

How to integrate Junit4Git when we are not using @RunWith? or How to integrate it for Spock?

Does it works only on master branch?
As we are following git flow, and we want to run this on any feature branch or develop branch.

rpau commented

How to integrate Junit4Git when we are not using @RunWith?

It depends. If you are running it with Maven, you can rely on the listener that is configured in the pom.xml file. If you are running your build with gradle, you need to manually add those @RunWith annotations or create a code transformation with walkmod for that. The reason is that the junit gradle module does not allow (or did not allow) to configure listeners and thus, this is what the runner is doing.

How to integrate it for Spock?

This should not be any problem if Spock is based on JUnit4. At the end everything is translated at bytecode.

Does it works only on master branch?

Yes, but happy to receive contributions to make it configurable. (#5)

By the way, sorry for the delayed response.