Skip to content

Commit

Permalink
chore : kotest 보고서 출력을 위한 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
HamBP committed Apr 18, 2024
1 parent 0c7c430 commit dc1e1c3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
8 changes: 8 additions & 0 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

tasks.getByName<Test>("test") {
useJUnitPlatform()
reports {
junitXml.required.set(false)
}
systemProperty("gradle.build.dir", project.buildDir)
}

dependencies {
implementation(libs.javax.inject)
implementation(libs.kotlinx.coroutines.core)
Expand Down
16 changes: 16 additions & 0 deletions domain/src/test/java/com/nexters/boolti/domain/KoTestConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.nexters.boolti.domain

import io.kotest.core.config.AbstractProjectConfig
import io.kotest.core.extensions.Extension
import io.kotest.extensions.junitxml.JunitXmlReporter

class KoTestConfig : AbstractProjectConfig() {

override fun extensions(): List<Extension> = listOf(
JunitXmlReporter(
includeContainers = false,
useTestPathAsName = true,
outputDir = "../build/test-results"
)
)
}
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ hilt-android-gradle-plugin = { module = "com.google.dagger:hilt-android-gradle-p
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" }
javax-inject = { module = "javax.inject:javax.inject", version.ref = "javax-inject" }
junit = { module = "junit:junit", version.ref = "junit" }
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
kotest-runner-junit5-jvm = { module = "io.kotest:kotest-runner-junit5-jvm", version.ref = "kotest" }
kotest-extentions-junitxml = { group = "io.kotest", name = "kotest-extensions-junitxml", version.ref = "kotest"}
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-core-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "coroutines" }
Expand Down Expand Up @@ -129,6 +129,6 @@ android-test = ["junit", "androidx-junit", "androidx-espresso-core", "kotlinx-co
network = ["retrofit", "logging-interceptor"]
db = ["androidx-datastore", "androidx-datastore-preferences-core", "androidx-room-runtime", "androidx-room-ktx"]
firebase = ["firebase-analytics-ktx", "firebase-crashlytics-ktx", "firebase-messaging-ktx", "firebase-dynamic-links"]
kotest = ["kotest-assertions-core", "kotest-property", "kotest-runner-junit5"]
kotest = ["kotest-property", "kotest-runner-junit5", "kotest-extentions-junitxml"]
coil = ["coil", "coil-compose"]
compose = ["androidx-activity-compose", "androidx-navigation-compose", "androidx-material3-android", "androidx-compose-ui-ui", "androidx-compose-ui-ui-graphics", "androidx-compose-ui-tooling-preview", "androidx-compose-ui-ui-util", "androidx-lifecycle-runtime-compose"]

0 comments on commit dc1e1c3

Please sign in to comment.