Skip to content

Commit b57cc1d

Browse files
committed
build(model-server): generate a JUnit report from cucumber tests
This is required for enabling test reporting in GitHub PRs later on.
1 parent 87481c3 commit b57cc1d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

model-server/build.gradle.kts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,18 @@ val cucumber = task("cucumber") {
114114
javaexec {
115115
mainClass.set("io.cucumber.core.cli.Main")
116116
classpath = cucumberRuntime + sourceSets.main.get().output + sourceSets.test.get().output
117-
// Change glue for your project package where the step definitions are.
118-
// And where the feature files are.
119-
args = listOf("--plugin", "pretty", "--glue", "org.modelix.model.server.functionaltests", "src/test/resources/functionaltests")
117+
args = listOf(
118+
"--plugin",
119+
"pretty",
120+
// Enable junit reporting so that GitHub actions can report on these tests, too
121+
"--plugin",
122+
"junit:${project.layout.buildDirectory.dir("test-results/cucumber.xml").get()}",
123+
// Change glue for your project package where the step definitions are.
124+
"--glue",
125+
"org.modelix.model.server.functionaltests",
126+
// Specify where the feature files are.
127+
"src/test/resources/functionaltests",
128+
)
120129
}
121130
}
122131
}

0 commit comments

Comments
 (0)