0

I have created scalatest for my spark project and when I am running gradle task "test" then it doesn't execute a single test. It shows zero tests.

Even as part of the build process, gradle doesn't execute any test case. It seems that gradle is not able to discover any test.

Build.gradle:
============
plugins {
    id "maven-publish"
    id "scala"
    id 'java'
    id 'jacoco'
}
scala {
    zincVersion = "1.2.1"
}

repositories {
    mavenLocal()
    jcenter()
    mavenCentral()
    maven {
        url 'http://conjars.org/repo'
    }
}
dependencies {
    compile "org.scala-lang:scala-library:"+scalaVersion
    compile "org.scala-lang:scala-reflect:"+scalaVersion
    compile "org.scala-lang:scala-compiler:"+scalaVersion
    compile('org.apache.spark:spark-core_2.12:2.4.6')
    compile('org.apache.spark:spark-sql_2.12:2.4.6')
    compile('com.typesafe.scala-logging:scala-logging-slf4j_2.11:2.1.2')
    compile('ch.hsr:geohash:1.3.0')
    compile('joda-time:joda-time:2.3')
    compile('org.json4s:json4s-jackson_2.11:3.7.0-M4')
    compile('org.apache.httpcomponents:httpclient:4.5.6')
    compile('com.fasterxml.jackson.datatype:jackson-datatype-joda:2.5.1')
    compile 'com.typesafe:config:1.4.1'
    implementation 'com.google.guava:guava:29.0-jre'
    testCompile 'junit:junit:4.12'
    testCompile 'org.scalatest:scalatest_2.12:3.2.0'
    testCompile ("org.mockito:mockito-scala_2.12:1.16.42")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.7.0")
    testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.2")
    testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.2")
    testCompile group: 'com.holdenkarau', name: 'spark-testing-base_2.12', version: '2.4.5_1.0.0'
    compile 'org.scala-lang.modules:scala-xml_2.12:1.2.0'
}
test {
    useJUnitPlatform()
    testLogging {
        events "passed", "skipped", "failed"
    }
}

0 Answers0