diff --git a/test_runner/src/main/kotlin/ftl/reports/api/CreateJUnitTestCase.kt b/test_runner/src/main/kotlin/ftl/reports/api/CreateJUnitTestCase.kt index 7b89c705d7..c0e06e00a7 100644 --- a/test_runner/src/main/kotlin/ftl/reports/api/CreateJUnitTestCase.kt +++ b/test_runner/src/main/kotlin/ftl/reports/api/CreateJUnitTestCase.kt @@ -34,9 +34,7 @@ private fun createJUnitTestCase( // skipped = true is represented by null. skipped = false is "absent" skipped = if (testCase.status == "skipped") null else "absent" ).apply { - if (errors != null || failures != null) { - webLink = getWebLink(toolResultsStep, testCase.testCaseId) - } + webLink = getWebLink(toolResultsStep, testCase.testCaseId) if (testCase.flaky) { flaky = true } diff --git a/test_runner/src/test/kotlin/ftl/reports/api/CreateJUnitTestCaseKtTest.kt b/test_runner/src/test/kotlin/ftl/reports/api/CreateJUnitTestCaseKtTest.kt index df58eb811e..11cb8eea1f 100644 --- a/test_runner/src/test/kotlin/ftl/reports/api/CreateJUnitTestCaseKtTest.kt +++ b/test_runner/src/test/kotlin/ftl/reports/api/CreateJUnitTestCaseKtTest.kt @@ -49,20 +49,27 @@ class CreateJUnitTestCaseKtTest { name = "test1", classname = "TestClassName", time = "2.200" - ), + ).apply { + webLink = + "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test1" + }, JUnitTestCase( name = "test2", classname = "TestClassName", time = "2.200", skipped = null - ), + ).apply { + webLink = + "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test2" + }, JUnitTestCase( name = "test3", classname = "TestClassName", time = "2.200", errors = listOf("exception") ).apply { - webLink = "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test3" + webLink = + "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test3" }, JUnitTestCase( name = "test4", @@ -70,7 +77,8 @@ class CreateJUnitTestCaseKtTest { time = "2.200", failures = listOf("exception") ).apply { - webLink = "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test4" + webLink = + "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test4" }, JUnitTestCase( name = "test5", @@ -78,7 +86,8 @@ class CreateJUnitTestCaseKtTest { time = "2.200", failures = listOf("exception") ).apply { - webLink = "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test5" + webLink = + "https://console.firebase.google.com/project/projectId/testlab/histories/historyId/matrices/executionId/executions/stepId/testcases/test5" flaky = true } )