1

Using KotlinTest with gradle. Executing the tests in a Jenkins pipeline although the reports generated aren't containing the BehaviorSpec steps. This is making my reports unusable.

Has anyone encountered a similar issue or knows of a different method to generate a more descriptive report.

gradle test task

test {
    useJUnitPlatform()
    systemProperties = System.properties
    // show standard out and standard error of the test JVM(s) on the console
    scanForTestClasses = false

    // show standard out and standard error of the test JVM(s) on the console
    testLogging.showStandardStreams = true

    // Always run tests, even when nothing changed.
    dependsOn 'cleanTest'

    testLogging {
        events "PASSED", "FAILED", "SKIPPED", "STANDARD_OUT", "STANDARD_ERROR"
    }
}

pipeline post step

post {
           always {
           archiveArtifacts artifacts: 'build/libs/**/*.jar', fingerprint: true
                     junit 'build/test-results/test/*.xml'
           }
       }
Zoidburg
  • 159
  • 8
  • with steps do you mean `Given/when/then` hierarchy? if so, I also don't get that, I only get the `then` part. I never really investigated the issue though, for me it is easy enough to count the `then`s, as they are displayed in the same order as they are defined in the source file – ThanksForAllTheFish Jul 10 '19 at 07:09
  • I'm having the same issue (only difference is I'm using Bitrise). But it does render the whole Behavior way of conveying test cases useless. I really wanted to use this approach with KotlinTest in personal app I'm making, but if this has no solution I will probably drop it for StringSpec or just plain JUnit. – Thomas H. Nov 26 '19 at 03:39

0 Answers0