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.

wrong count of tests

See original GitHub issue

Running below tests shows me total test count as 3 and failed test as 2. com.x.HelloWorldTest > test2 FAILED java.lang.AssertionError at HelloWorldTest.kt:17 Caused by: java.lang.AssertionError at HelloWorldTest.kt:17

com.x.HelloWorldTest > executionError FAILED java.lang.AssertionError at HelloWorldTest.kt:17 Caused by: java.lang.AssertionError at HelloWorldTest.kt:17

3 tests completed, 2 failed

class HelloWorldTest: AnnotationSpec(){
    @Test
    fun test1() {
        1 shouldBe 1
    }

    @Test
    fun test2() {
        3 shouldBe 2
    }
}

Using testImplementation ‘io.kotest:kotest-runner-junit5-jvm:4.0.1’ testImplementation ‘io.kotest:kotest-assertions-core-jvm:4.0.1’ JDK 11 GRADLE 5.5.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
sksamuelcommented, Mar 31, 2020

It was probably always happening. It’s just the way gradle reports things, it doesn’t really support nested tests. There’s not a lot we can do, short of writing our own gradle plugin.

On Tue, 31 Mar 2020 at 11:25, ashish kumar joy notifications@github.com wrote:

@sksamuel https://github.com/sksamuel Its happening after b1820a7 https://github.com/kotest/kotest/commit/b1820a70425490f14ef55663831f9c3bd7f804c4

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest/issues/1330#issuecomment-606733181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGTVY7ZCBDYVEPDS3ODRKIKPPANCNFSM4LXP5JCA .

0reactions
ashishkujoycommented, Sep 4, 2020

Fixed in master by #1655

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven test execution gives wrong test count - Stack Overflow
Maven executing the test scripts successfully but it gives wrong test count. Here is the scenario: Right now, I have 18 test cases...
Read more >
Wrong Test count on Maven surefire Test reporting
Hello Team, when I execute Tests in the pipeline multiple XML gets scanned in the target output directory. Pipeline scan all the XML...
Read more >
Maven: Total Test Count Incorrect - Visual Studio Feedback
It appears that VSTS is including the results total in with the unit test totals, which will double the tests ran count on...
Read more >
Issues when running tests (counts wrong, output, ...)
If I run the "test" Rake task (attached Test::Unit) there are some issues with that. The main thing is that the count above...
Read more >
Maven Surefire Plugin – Rerun failing tests
Tests will be run until they pass or the number of reruns has been ... The type of the failure (failed test or...
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