question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestNG 7.3.0 breaks AssertJ assumeThat

See original GitHub issue

TestNG 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:closed
  • Created 3 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
krmahadevancommented, Aug 27, 2020

@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 ?

1reaction
C-Ottocommented, Aug 30, 2020

@scordio confirmed. Fails with TestNG 7.3.0 and AssertJ 3.17.0, fixed with 7.3.0 / 3.17.1.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found