diff --git a/src/main/java/com/shaft/listeners/JunitListener.java b/src/main/java/com/shaft/listeners/JunitListener.java
index 11651f12e8b..5a5975f1d7b 100644
--- a/src/main/java/com/shaft/listeners/JunitListener.java
+++ b/src/main/java/com/shaft/listeners/JunitListener.java
@@ -133,8 +133,8 @@ private void appendToExecutionSummaryReport(TestIdentifier testIdentifier, Strin
String caseName = testIdentifier.getDisplayName();
String caseDescription = testIdentifier.getLegacyReportingName();
String statusMessage = statusIcon.getValue() + status.name();
- Boolean hasIssue = false;
- ExecutionSummaryReport.casesDetailsIncrement(caseSuite, caseName, caseDescription, errorMessage, statusMessage, hasIssue);
+ // Will add empty strings o the tmsLink and issue params until we figure out how to get the values of the annotations using JUnit
+ ExecutionSummaryReport.casesDetailsIncrement("", caseSuite, caseName, caseDescription, errorMessage, statusMessage, "");
}
}
diff --git a/src/main/java/com/shaft/listeners/TestNGListener.java b/src/main/java/com/shaft/listeners/TestNGListener.java
index 947b0f3961e..64bffbe8f4c 100644
--- a/src/main/java/com/shaft/listeners/TestNGListener.java
+++ b/src/main/java/com/shaft/listeners/TestNGListener.java
@@ -214,9 +214,9 @@ public void onExecutionFinish() {
public void onTestSuccess(ITestResult result) {
// if (isTestNGRun()) {
passedTests.add(result.getMethod());
- ExecutionSummaryReport.casesDetailsIncrement(result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
+ ExecutionSummaryReport.casesDetailsIncrement(TestNGListenerHelper.getTmsLinkAnnotationValue(result), result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
result.getMethod().getMethodName(), result.getMethod().getDescription(), "",
- ExecutionSummaryReport.StatusIcon.PASSED.getValue() + ExecutionSummaryReport.Status.PASSED.name(), TestNGListenerHelper.testHasIssueAnnotation(result));
+ ExecutionSummaryReport.StatusIcon.PASSED.getValue() + ExecutionSummaryReport.Status.PASSED.name(), TestNGListenerHelper.getIssueAnnotationValue(result));
// }
}
@@ -224,9 +224,9 @@ public void onTestSuccess(ITestResult result) {
public void onTestFailure(ITestResult result) {
// if (isTestNGRun()) {
failedTests.add(result.getMethod());
- ExecutionSummaryReport.casesDetailsIncrement(result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
+ ExecutionSummaryReport.casesDetailsIncrement(TestNGListenerHelper.getTmsLinkAnnotationValue(result), result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
result.getMethod().getMethodName(), result.getMethod().getDescription(), result.getThrowable().getMessage(),
- ExecutionSummaryReport.StatusIcon.FAILED.getValue() + ExecutionSummaryReport.Status.FAILED.name(), TestNGListenerHelper.testHasIssueAnnotation(result));
+ ExecutionSummaryReport.StatusIcon.FAILED.getValue() + ExecutionSummaryReport.Status.FAILED.name(), TestNGListenerHelper.getIssueAnnotationValue(result));
// }
}
@@ -234,9 +234,9 @@ public void onTestFailure(ITestResult result) {
public void onTestSkipped(ITestResult result) {
// if (isTestNGRun()) {
skippedTests.add(result.getMethod());
- ExecutionSummaryReport.casesDetailsIncrement(result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
+ ExecutionSummaryReport.casesDetailsIncrement(TestNGListenerHelper.getTmsLinkAnnotationValue(result), result.getMethod().getQualifiedName().replace("." + result.getMethod().getMethodName(), ""),
result.getMethod().getMethodName(), result.getMethod().getDescription(), result.getThrowable().getMessage(),
- ExecutionSummaryReport.StatusIcon.SKIPPED.getValue() + ExecutionSummaryReport.Status.SKIPPED.name(), TestNGListenerHelper.testHasIssueAnnotation(result));
+ ExecutionSummaryReport.StatusIcon.SKIPPED.getValue() + ExecutionSummaryReport.Status.SKIPPED.name(), TestNGListenerHelper.getIssueAnnotationValue(result));
// }
}
}
\ No newline at end of file
diff --git a/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java b/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java
index 30c91998cea..8d4d63fe845 100644
--- a/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java
+++ b/src/main/java/com/shaft/listeners/internal/TestNGListenerHelper.java
@@ -8,6 +8,8 @@
import com.shaft.tools.io.internal.ReportManagerHelper;
import io.qameta.allure.Issue;
import io.qameta.allure.Issues;
+import io.qameta.allure.TmsLink;
+import io.qameta.allure.TmsLinks;
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.Browser;
import org.testng.*;
@@ -259,10 +261,38 @@ public static void skipTestsWithLinkedIssues(ITestResult iTestResult) {
}
}
- public static Boolean testHasIssueAnnotation(ITestResult iTestResult) {
+ public static String getIssueAnnotationValue(ITestResult iTestResult) {
var method = iTestResult.getMethod().getConstructorOrMethod().getMethod();
Issue issue = method.getAnnotation(Issue.class);
- return issue != null;
+ Issues issues = method.getAnnotation(Issues.class);
+ if (issues != null) {
+ return Arrays.toString(issues.value())
+ .replace("[@io.qameta.allure.Issue(\"", "")
+ .replace("@io.qameta.allure.Issue(\"", "")
+ .replace("\")]", "")
+ .replace("\"),", ",");
+ } else if (issue != null) {
+ return issue.value();
+ } else {
+ return "";
+ }
+ }
+
+ public static String getTmsLinkAnnotationValue(ITestResult iTestResult) {
+ var method = iTestResult.getMethod().getConstructorOrMethod().getMethod();
+ TmsLink tmsLink = method.getAnnotation(TmsLink.class);
+ TmsLinks tmsLinks = method.getAnnotation(TmsLinks.class);
+ if (tmsLinks != null) {
+ return Arrays.toString(tmsLinks.value())
+ .replace("[@io.qameta.allure.TmsLink(\"", "")
+ .replace("@io.qameta.allure.TmsLink(\"", "")
+ .replace("\")]", "")
+ .replace("\"),", ",");
+ } else if (tmsLink != null) {
+ return tmsLink.value();
+ } else {
+ return "";
+ }
}
public static void failFast(ITestResult iTestResult) {
diff --git a/src/main/java/com/shaft/tools/internal/support/HTMLHelper.java b/src/main/java/com/shaft/tools/internal/support/HTMLHelper.java
index 963e62de9cb..e47d3e4b18d 100644
--- a/src/main/java/com/shaft/tools/internal/support/HTMLHelper.java
+++ b/src/main/java/com/shaft/tools/internal/support/HTMLHelper.java
@@ -291,9 +291,10 @@ public enum HTMLHelper {
.piechart1 {
display: block;
position: relative;
- width: 120px;
- height: 120px;
+ width: 100px;
+ height: 100px;
border-radius: 50%;
+ margin-top: 20px;
background-image: conic-gradient(
MediumSeaGreen ${VALIDATION_PASSED_PERCENTAGE_PIE}deg,
Tomato 0);
@@ -461,15 +462,18 @@ public enum HTMLHelper {
.table100.ver5 .ps__rail-y .ps__thumb-y::before{
background-color:#ccc
}
+ .column0{
+ width:5%;
+ padding-left:20px
+ }
.column1{
width:5%;
- padding-left:40px
}
.column2{
width:20%
}
.column3{
- width:35%
+ width:30%
}
.column4{
width:25%
@@ -478,7 +482,7 @@ public enum HTMLHelper {
width:10%
}
.column6{
- width:5%
+ width:10%
}
hr.rounded {
border-top: 8px solid #bbb;
@@ -529,10 +533,8 @@ public enum HTMLHelper {
Passed: ${VALIDATION_PASSED} |
Failed: ${VALIDATION_FAILED} ]
-
Id | Suite | Name | Error | Status | -Has issue | +issue id |
---|