apache / apache/maven-surefire
[SUREFIRE-2236] Surefire plugin absorb exception when TestNG used with Guice
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Laszlo Kalina](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER304234)** opened **[SUREFIRE-2236](https://issues.apache.org/jira/browse/SUREFIRE-2236?redirect=false)** and commented
I have a small Maven demo project where I use Testng a Guice DI. If an error occurs in the Guice initialisation class it is showing up when I use 3.0.0-M3 but from 3.0.0-M4 the exception not appears, only just 0 test executed and the build marked as succeeded.
I attached my example project files. If you build this small project there will be no error. But if you use 3.0.0-M3 Surefire version the java.lang.IllegalArgumentException will came up. I think this is the expected behaviour not the 0 tests executed one.
Please investigate this issue.
---
**Affects:** 3.0.0-M4
**Attachments:**
- [DepInject.java](https://issues.apache.org/jira/secure/attachment/13066943/DepInject.java) (_496 bytes_)
- [ExampleTest.java](https://issues.apache.org/jira/secure/attachment/13066942/ExampleTest.java) (_370 bytes_)
- [pom.xml](https://issues.apache.org/jira/secure/attachment/13066944/pom.xml) (_1.62 kB_)
Contributor guide
Research direction
Start by building the attached example project with Surefire 3.0.0-M4 and compare its behavior with 3.0.0-M3. Trace how TestNG initialization failures are handled, then add a regression test showing that the Guice initialization exception is reported instead of producing a successful zero-test run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100