Skip to content

Commit

Permalink
Add weblink to all test results, not just failures
Browse files Browse the repository at this point in the history
  • Loading branch information
RainNapper committed Jun 24, 2020
1 parent 1dff550 commit 59772a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,45 @@ 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",
classname = "TestClassName",
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",
classname = "TestClassName",
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
}
)
Expand Down

0 comments on commit 59772a4

Please sign in to comment.