public class Reporter extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addScenarioLog(String message)
Adds an info message to the current scenario
|
static void |
addScreenCaptureFromPath(String imagePath)
Adds the screenshot from the given path to the current step
|
static void |
addScreenCaptureFromPath(String imagePath,
String title)
Adds the screenshot from the given path with the given title to the current step
|
static void |
addScreenCast(String screenCastPath)
Adds the screen cast from the given path to the current step
|
static void |
addStepLog(String message)
Adds an info message to the current step
|
static void |
assignAuthor(String... authorName)
Sets the author name for the current scenario
|
static com.aventstack.extentreports.reporter.ExtentHtmlReporter |
getExtentHtmlReport()
Gets the
ExtentHtmlReporter instance created through listener |
static com.aventstack.extentreports.ExtentReports |
getExtentReport()
Gets the
ExtentReports instance created through the listener |
static com.aventstack.extentreports.reporter.KlovReporter |
getKlovReport()
Gets the
KlovReporter instance created through listener |
static void |
loadXMLConfig(File file)
Loads the XML config file
|
static void |
loadXMLConfig(String xmlPath)
Loads the XML config file
|
static void |
setSystemInfo(String key,
String value)
Sets the system information with the given key value pair
|
static void |
setTestRunnerOutput(List<String> log)
Sets the test runner output with the given list of strings
|
static void |
setTestRunnerOutput(String outputMessage)
Sets the test runner output with the given string
|
public static com.aventstack.extentreports.reporter.ExtentHtmlReporter getExtentHtmlReport()
ExtentHtmlReporter instance created through listenerExtentHtmlReporter instancepublic static com.aventstack.extentreports.reporter.KlovReporter getKlovReport()
KlovReporter instance created through listenerKlovReporter instancepublic static com.aventstack.extentreports.ExtentReports getExtentReport()
ExtentReports instance created through the listenerExtentReports instancepublic static void loadXMLConfig(String xmlPath)
xmlPath - The xml path in stringpublic static void loadXMLConfig(File file)
file - The file path of the XMLpublic static void addStepLog(String message)
message - The message to be logged to the current steppublic static void addScenarioLog(String message)
message - The message to be logged to the current scenariopublic static void addScreenCaptureFromPath(String imagePath) throws IOException
imagePath - The image pathIOException - Exception if imagePath is erroneouspublic static void addScreenCaptureFromPath(String imagePath, String title) throws IOException
imagePath - The image pathtitle - The title for the imageIOException - Exception if imagePath is erroneouspublic static void addScreenCast(String screenCastPath) throws IOException
screenCastPath - The screen cast pathIOException - Exception if imagePath is erroneouspublic static void setSystemInfo(String key, String value)
key - The name of the keyvalue - The value of the given keypublic static void setTestRunnerOutput(List<String> log)
log - The list of string messagespublic static void setTestRunnerOutput(String outputMessage)
outputMessage - The message to be shown in the test runner output screenpublic static void assignAuthor(String... authorName)
authorName - The author name of the current scenarioCopyright © 2018. All rights reserved.