TestNG 7.3.0 breaks AssertJ assumeThat
See original GitHub issueTestNG Version
7.3.0
Expected behavior
Using AssertJ’s org.assertj.core.api.Assumptions.assumeThat
method should produce a org.testng.SkipException
, skipping the test.
Actual behavior
The code in Assumptions
throws org.junit.AssumptionViolatedException
instead. This exception is not supported by TestNG, causing a test failure instead of a skipped test.
This is because TestNG includes JUnit 4.12, which is detected by Assumptions
.
Is the issue reproductible on runner?
- Shell
- Maven
- Gradle
- Ant
- Eclipse
- IntelliJ
- NetBeans
Test case sample
Gradle: implementation 'org.assertj:assertj-core:3.12.1'
public class FooTest
{
@Test
public void test()
{
org.assertj.core.api.Assumptions.assumeThat(false).isTrue();
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (1 by maintainers)
Top Results From Across the Web
Developers - TestNG 7.3.0 breaks AssertJ assumeThat -
TestNG Version. 7.3.0. Expected behavior. Using AssertJ's org.assertj.core.api.Assumptions.assumeThat method should produce a org.testng.
Read more >Assert - testng 7.3.0 javadoc
https://javadoc.io/doc/org.testng/testng. Current version 7.3.0. https://javadoc.io/doc/org.testng/testng/7.3.0. package-list path (used for javadoc ...
Read more >AssertJ - fluent assertions java library - GitHub Pages
A Swing module provides a simple and intuitive API for functional testing of Swing ... it is simply ignored as a failing assertion...
Read more >Untitled
... asciidoc.spec assertj-core-3.19.0.tar.gz assertj-core.spec at-spi2-atk-2.38.0.tar.xz ... crash-7.3.0.tar.gz crash.spec gdb-7.6.tar.gz lzo_snappy.patch ...
Read more >Untitled
... aspell-en.spec aspell6-en-2020.12.07-0.tar.bz2 assertj-core-3.19.0.tar.gz ... pom.xml testng-7.3.0.tar.gz testng.spec tetex-fonts-hebrew-0.1.tar.gz ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@juherr @cbeust - The link https://github.com/ota4j-team/opentest4j#projects-already-contacted says TestNG has been contacted regarding this. Are you folks aware of this ?
I don’t recall seeing any mail on this on the TestNG dev users list.
@scordio - Maybe you can create a PR (so the technical work related to moving towards this would be done), but we need to get a confirmation from @cbeust on what the plans are for this.
@juherr - WDYT ?
@scordio confirmed. Fails with TestNG 7.3.0 and AssertJ 3.17.0, fixed with 7.3.0 / 3.17.1.