Gradle test execution order

I was wondering if it is possible in some way to get information about the order in which the test is executed.

I have a project in maven and all tests are running fine. After I moved the project to Gradle, one of the tests started to fail. The test itself works, when I execute 'gradle test -Dtest.single = ...' it passes. However, when I run tests for the whole project, it fails.

It is possible that some tests, before they actually fail, do not release resources correctly and hence the test fails. But I need to somehow figure out which tests are causing this issue.

Thanks Matthew

+3


source to share


2 answers


Tell Gradle to log more events related to test processing. There is documentation on how to do this http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.logging.TestLoggingContainer.html



+2


source


Something a little more specific ...



    test {
        beforeTest { testDescriptor ->
            println "${testDescriptor.className} > ${testDescriptor.name} STARTED"
        }
    }

      

+1


source







All Articles