Skip to content

Commit

Permalink
[starter][allure] Add hash of error to the full name of test
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 0279940d678be0c8042bde4445efcf5bc78d9cf2
  • Loading branch information
Litemn authored and intellij-monorepo-bot committed Jun 14, 2024
1 parent 03af0e4 commit d1ddcfd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ object AllureReport {
Allure.link("CI server", link)
}
Allure.label("layer", "Exception")
val hash = convertToHashCodeWithOnlyLetters(generifyErrorMessage(stackTrace.processStringForTC()).hashCode())
Allure.getLifecycle().updateTestCase {
it.status = Status.FAILED
it.name = "$suffix in ${testName.ifBlank { contextName }}"
it.statusDetails = StatusDetails().setMessage(message).setTrace(stackTrace)
it.fullName = fullName.ifBlank { contextName } + ".exception"
it.fullName = fullName.ifBlank { contextName } + ".${hash}" + ".${suffix.lowercase()}"
it.testCaseName = testCaseName
it.historyId = convertToHashCodeWithOnlyLetters(generifyErrorMessage(stackTrace.processStringForTC()).hashCode())
it.historyId = hash
}
Allure.getLifecycle().stopTestCase(uuid)
Allure.getLifecycle().writeTestCase(uuid)
Expand Down

0 comments on commit d1ddcfd

Please sign in to comment.