Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ test-output
z_others
testng_Local_Edge.xml
testng_Local_Only1TestCase.xml
ExtentReports
ExtentReports.zip
README.md
Binary file modified ExtentReports.zip
Binary file not shown.
2,878 changes: 323 additions & 2,555 deletions ExtentReports/AutomationReport.html

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/main/java/org/selenium/constants/FrameworkConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ public class FrameworkConstants {
// public static final String ICON_BROWSER_SAFARI = "<i class=\"fa fa-safari\" aria-hidden=\"true\"></i>";

public static final String ICON_Navigate_Right = "<i class='fa fa-arrow-circle-right' ></i>";

public static final String ICON_LAPTOP = "<i class='fa fa-laptop' style='font-size:18px'></i>";
public static final String ICON_BUG = "<i class='fa fa-bug' ></i>";
/* style="text-align:center;" */
public static final String ICON_SOCIAL_LINKEDIN_URL = "https://www.linkedin.com/in/rajat-v-3b0685128/";
public static final String ICON_SOCIAL_GITHUB_URL = "https://github.com/rajatt95";
public static final String ICON_SOCIAL_LINKEDIN = "<a href='"+ICON_SOCIAL_LINKEDIN_URL+"'><i class='fa fa-linkedin-square' style='font-size:24px'></i></a>";
public static final String ICON_SOCIAL_GITHUB = "<a href='" + ICON_SOCIAL_GITHUB_URL+"'><i class='fa fa-github-square' style='font-size:24px'></i></a>";

public static final String ICON_SOCIAL_LINKEDIN = "<a href='" + ICON_SOCIAL_LINKEDIN_URL
+ "'><i class='fa fa-linkedin-square' style='font-size:24px'></i></a>";
public static final String ICON_SOCIAL_GITHUB = "<a href='" + ICON_SOCIAL_GITHUB_URL
+ "'><i class='fa fa-github-square' style='font-size:24px'></i></a>";

// public static final String ICON_SOCIAL_LINKEDIN = "<i class='fa fa-linkedin-square' style='font-size:24px'></i>";
// public static final String ICON_SOCIAL_GITHUB = "<i class='fa fa-github-square' style='font-size:24px'></i>";
// public static final String ICON_SOCIAL_LINKEDIN_VALUE = "<a href='https://www.linkedin.com/in/rajat-v-3b0685128/'>LinkedIn</a>";
// public static final String ICON_SOCIAL_GITHUB_VALUE = "https://github.com/rajatt95";


public static final String ICON_CAMERA = "<i class=\"fa fa-camera\" aria-hidden=\"true\"></i>";

public static final String ICON_BROWSER_EDGE = "edge";
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/org/selenium/listeners/ListenerClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.selenium.constants.FrameworkConstants.ICON_SMILEY_FAIL;
import static org.selenium.constants.FrameworkConstants.ICON_SMILEY_PASS;
import static org.selenium.constants.FrameworkConstants.ICON_BUG;

import java.util.Arrays;

Expand Down Expand Up @@ -75,7 +76,7 @@ public void onTestSuccess(ITestResult result) {
@Override
public void onTestFailure(ITestResult result) {
count_failedTCs = count_failedTCs + 1;
ExtentLogger.fail("<b><i>" + result.getThrowable().toString() + "</i></b>");
ExtentLogger.fail(ICON_BUG + " " + "<b><i>" + result.getThrowable().toString() + "</i></b>");
String exceptionMessage = Arrays.toString(result.getThrowable().getStackTrace());
String message = "<details><summary><b><font color=red> Exception occured, click to see details: "
+ ICON_SMILEY_FAIL + " </font></b>" + "</summary>" + exceptionMessage.replaceAll(",", "<br>")
Expand All @@ -93,7 +94,9 @@ public void onTestFailure(ITestResult result) {
public void onTestSkipped(ITestResult result) {

count_skippedTCs = count_skippedTCs + 1;
ExtentLogger.skip("<b><i>" + result.getThrowable().toString() + "</i></b>");

ExtentLogger.skip(ICON_BUG + " " + "<b><i>" + result.getThrowable().toString() + "</i></b>");
// ExtentLogger.skip("<b><i>" + result.getThrowable().toString() + "</i></b>");
String logText = "<b>" + result.getMethod().getMethodName() + " is skipped.</b>" + " " + ICON_SMILEY_FAIL;
Markup markup_message = MarkupHelper.createLabel(logText, ExtentColor.YELLOW);
ExtentLogger.skip(markup_message, true);
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/selenium/reports/ExtentReport.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.selenium.reports;

import static org.selenium.constants.FrameworkConstants.ICON_LAPTOP;
import static org.selenium.constants.FrameworkConstants.ICON_SOCIAL_GITHUB;
import static org.selenium.constants.FrameworkConstants.ICON_SOCIAL_LINKEDIN;
import static org.selenium.constants.FrameworkConstants.ICON_SOCIAL_LINKEDIN_URL;
import static org.selenium.constants.FrameworkConstants.ICON_SOCIAL_GITHUB_URL;

import java.awt.Desktop;
import java.io.File;
Expand Down Expand Up @@ -57,7 +56,7 @@ public static void initReports() {
extent.setSystemInfo("Organization", "Nagarro");
extent.setSystemInfo("Employee",
"<b> Rajat Verma </b>" + " " + ICON_SOCIAL_LINKEDIN + " " + ICON_SOCIAL_GITHUB);
extent.setSystemInfo("Domain", "Engineering (IT - Software)");
extent.setSystemInfo("Domain", "Engineering (IT - Software)"+" "+ICON_LAPTOP);
extent.setSystemInfo("Skill", "Test Automation Engineer");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/stg_config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ request_details_in_reports=yes
#Override_ExtentReports --> yes or no
#If no -> Report name will be like - Windows_10_Tue_Oct_05_02_30_46_IST_2021_AutomationReport.html
#If yes -> Report name will be AutomationReport.html
override_reports=no
override_reports=yes

#send_email_to_users --> yes or no
#If yes -> then, provide your mail credentials -> src/main/java -> package org.selenium.java_Mail_API.EmailConfig;
Expand Down