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

Ban TestNG dependency #174

Merged
merged 2 commits into from
Apr 2, 2019
Merged

Ban TestNG dependency #174

merged 2 commits into from
Apr 2, 2019

Conversation

automatictester
Copy link
Member

As a big fan of TestNG, this was my default choice when selecting unit test framework for my Jenkins plugin. As I wanted to add an end-to-end integration test and make use of Jenkins test harness provided (JenkinsRule and BuildWatcher), I configured my Maven project to use TestNG for unit tests and JUnit for ITs. I soon realised having two test frameworks in a single project is (slightly) overengineered and moved my unit tests to JUnit. It was a surprise for me when I noticed there were now 5 more tests (InjectedTest) - failing - which were not running before when I used TestNG for my unit tests. Having Maven run both TestNG and JUnit tests has always been problematic and required sometimes "not so nice" workarounds. There are many resources on this topic, including this one. My preference is to avoid such situation in first place, if possible.

Long story short, even if I don't have a single TestNG unit test in my test codebase, but define TestNG dependency in pom.xml, InjectedTest will not run. I'm opening this PR to ban TestNG dependency, so that people do not unknowingly disable InjectedTest.

@oleg-nenashev
Copy link
Member

It would be nice to have a brief comment with explanation directly in pom.xml, e.g. as a comment

Jenkins Test Harness is largely based on JUnit, and it is not trivial to have a TestNG equivalent (or JUnit 5 for the same reason)

@automatictester
Copy link
Member Author

Hi @oleg-nenashev, I have added comment as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants