public class ExtentManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,com.aventstack.extentreports.ExtentTest> |
classList |
static String |
ENABLE_EMAIL_REPORT |
static String |
ENABLE_SLACK_NOTIFICATION |
static String |
HTML_REPORT_TYPE |
static String |
KLOV_MONGODB_URL |
static String |
KLOV_REPORT_TYPE |
static String |
KLOV_SERVER_URL |
static com.aventstack.extentreports.reporter.ExtentKlovReporter |
klovReporter |
static String |
LAUNCH_AFTER_REPORT |
static String |
NOTIFY_EMAIL_ON_FAIL_ONLY |
static String |
NOTIFY_SLACK_ON_FAIL_ONLY |
static String |
REPORT_DEFAULT_NAME |
static String |
REPORT_EXPIRE_DAYS |
static String |
REPORT_TYPE |
static String |
TEST_OUTPUT_FULL_PATH |
static String |
TEST_OUTPUT_PATH |
| Constructor and Description |
|---|
ExtentManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearOldTestReports() |
static void |
clearTestReport()
deletes test report for particular run based on test run name
|
static void |
clearTestReport(String suitename)
deletes test report for particular run based on test run name
|
static com.aventstack.extentreports.ExtentReports |
createInstance(String fileName) |
static void |
emailTestReport(String message)
zips up And emails test report with screenshot to specified email address
|
static String |
getMediaFolderFullPath() |
static String |
getMediaFolderRelativePathFromHtmlReport() |
static String |
getMediaFolderRelativePathFromRoot() |
static com.aventstack.extentreports.ExtentReports |
getReporter() |
static String |
getReportHTMLFullPath() |
static String |
getReportName()
returns the test report name the report name is stored in default test object
if test suit runs, Then suit name is the report name if test is run without
suit, Then app name is used for report name
|
static String |
getReportRootFullPath() |
static String |
getReportRootRelativePath()
gets report folder path eg.selenium/test-output/testReports/20181124/core/
|
static String |
getScreenshotsFolderFullPath() |
static String |
getScreenshotsFolderRelativePath() |
static void |
launchReportAfterTest()
launches the report html page after test run
|
static String |
parseTestName(String value)
formats test name to format from: "loginTest" to "Login Test"
|
static void |
printReportLink()
prints the test report link for klov or html report type
|
static void |
removeEmptyTestNodesFromReport()
Note: currently disabled as we're only adding test nodes to report removes
empty logs from the test report these are logs that are initialized, But no
test steps have been added to them note: test suite is removed, cause the
feature When empty cannot be removed.
|
static void |
reportSetup()
setup report only for test methods, including before and after test not
including: before suite, after suite, before class, after class this means
only logs for test methods will show up in the reports reason: test report
treats before/after suite, before/after class as tests and increases test
count
|
static void |
setKlovReportReporter()
if test are run through suite, set project name as suite if test are run
outside of suite, use the module/app name
|
static void |
setupReportPage() |
static void |
slackNotification(String message)
sends test report to slack slack notification must be enabled in properties
file
|
static void |
writeTestReport() |
public static final String LAUNCH_AFTER_REPORT
public static final String NOTIFY_SLACK_ON_FAIL_ONLY
public static final String NOTIFY_EMAIL_ON_FAIL_ONLY
public static final String ENABLE_SLACK_NOTIFICATION
public static final String ENABLE_EMAIL_REPORT
public static final String REPORT_EXPIRE_DAYS
public static final String REPORT_TYPE
public static final String HTML_REPORT_TYPE
public static final String KLOV_REPORT_TYPE
public static final String KLOV_SERVER_URL
public static final String KLOV_MONGODB_URL
public static String REPORT_DEFAULT_NAME
public static com.aventstack.extentreports.reporter.ExtentKlovReporter klovReporter
public static String TEST_OUTPUT_PATH
public static String TEST_OUTPUT_FULL_PATH
public static com.aventstack.extentreports.ExtentReports getReporter()
public static String getScreenshotsFolderFullPath()
public static String getScreenshotsFolderRelativePath()
public static String getMediaFolderFullPath()
public static String getMediaFolderRelativePathFromHtmlReport()
public static String getMediaFolderRelativePathFromRoot()
public static String getReportHTMLFullPath()
public static String getReportRootFullPath()
public static String getReportRootRelativePath()
public static com.aventstack.extentreports.ExtentReports createInstance(String fileName)
public static void setupReportPage()
public static void reportSetup()
public static void setKlovReportReporter()
public static void launchReportAfterTest()
Exceptionpublic static void writeTestReport()
public static void removeEmptyTestNodesFromReport()
public static void printReportLink()
public static String getReportName()
public static void slackNotification(String message)
message - public static void emailTestReport(String message)
Exceptionpublic static void clearTestReport()
public static void clearTestReport(String suitename)
public static void clearOldTestReports()
Copyright © 2020. All rights reserved.