-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ability to specify a header for an XML report
- Loading branch information
Showing
13 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...functionalTest/kotlin/kotlinx/kover/gradle/plugin/test/functional/cases/XmlReportTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2017-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
package kotlinx.kover.gradle.plugin.test.functional.cases | ||
|
||
import kotlinx.kover.gradle.plugin.test.functional.framework.checker.defaultReportsDir | ||
import kotlinx.kover.gradle.plugin.test.functional.framework.configurator.* | ||
import kotlinx.kover.gradle.plugin.test.functional.framework.starter.* | ||
import kotlin.test.assertContains | ||
|
||
internal class XmlReportTests { | ||
|
||
@SlicedGeneratedTest(allTools = true) | ||
fun BuildConfigurator.testDefaultXmlTitle() { | ||
addProjectWithKover { | ||
|
||
} | ||
|
||
addProjectWithKover(":nested") { | ||
sourcesFrom("simple") | ||
} | ||
|
||
run("koverXmlReport") { | ||
subproject(":nested") { | ||
file("$defaultReportsDir/report.xml") { | ||
assertContains(readText(), "Kover Gradle Plugin XML report for :nested") | ||
} | ||
} | ||
} | ||
} | ||
|
||
@SlicedGeneratedTest(allTools = true) | ||
fun BuildConfigurator.testCustomXmlTitle() { | ||
val title = "My Custom XML title" | ||
|
||
addProjectWithKover { | ||
|
||
} | ||
|
||
addProjectWithKover(":nested") { | ||
sourcesFrom("simple") | ||
|
||
koverReport { | ||
defaults { | ||
xml { | ||
this.title.set("My Custom XML title") | ||
} | ||
} | ||
} | ||
} | ||
|
||
run("koverXmlReport") { | ||
subproject(":nested") { | ||
file("$defaultReportsDir/report.xml") { | ||
assertContains(readText(), title) | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters