You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/io/github/guidewire/oss/cli/SendCommand.kt
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,11 @@ class SendCommand : CliktCommand(
18
18
return"Send JUnit test reports to Fern"
19
19
}
20
20
21
-
privateval fernUrl by option("-u", "--fern-url", help ="Base URL of the Fern Reporter instance to send test reports to")
22
-
.required()
23
-
24
-
privateval projectName by option("-p", "--project-name", help ="Name of the project to associate test reports with")
25
-
.required()
26
-
21
+
privateval fernUrl by option("-u", "--fern-url", help ="Base URL of the Fern Reporter instance to send test reports to").required()
22
+
privateval projectName by option("-n", "--project-name", help ="Name of the project to associate test reports with").required()
23
+
privateval projectId by option("-i", "--project-id", help ="ID of the project to associate test reports with").required()
27
24
privateval filePatterns:List<String> by option("-f", "--file-pattern", help ="File name pattern of test reports to send to Fern").multiple(required =true)
28
-
29
25
privateval tags by option("-t", "--tags", help ="Comma-separated tags to be included on runs")
30
-
31
26
privateval verbose by option("-v", "--verbose", help ="Enable verbose output").flag()
32
27
33
28
overridefunrun() {
@@ -37,6 +32,7 @@ class SendCommand : CliktCommand(
37
32
val testRun =TestRun(
38
33
testProjectName = projectName,
39
34
testSeed =System.currentTimeMillis(),
35
+
testProjectId = projectId,
40
36
)
41
37
42
38
// Process each report path
@@ -67,6 +63,11 @@ class SendCommand : CliktCommand(
67
63
68
64
echo("Found ${testRun.suiteRuns.size} test suites with a total of ${testRun.suiteRuns.sumOf { it.specRuns.size }} test specs")
69
65
66
+
if (!fernUrl.startsWith("http")) {
67
+
echo("ERROR: Fern URL must start with 'http' or 'https'", err =true)
68
+
exitProcess(1)
69
+
}
70
+
70
71
sendTestRun(testRun, fernUrl, verbose).fold(
71
72
onSuccess = {
72
73
echo("Successfully published test results to Fern")
0 commit comments