public class ExtentKlovReporter extends ConfigurableReporter
| Constructor and Description |
|---|
ExtentKlovReporter(java.lang.String projectName)
Initializes the KlovReporter with the project name and default report name
|
ExtentKlovReporter(java.lang.String projectName,
java.lang.String reportName)
Initializes the KlovReporter with project and report names
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Attribute> |
assignAttribute(Test test,
Attribute attribute,
java.util.Map<java.lang.String,org.bson.types.ObjectId> nameObjectIdCollection,
com.mongodb.client.MongoCollection<org.bson.Document> mongoCollection,
TestAttributeTestContextStore<T> attributeContext) |
void |
flush(ReportAggregates reportAggregates)
Write to or update the target source (file, database)
|
java.util.List<org.bson.types.ObjectId> |
getCollectionValues(java.util.Map<java.lang.String,org.bson.types.ObjectId> collection) |
org.bson.types.ObjectId |
getProjectId()
Returns the active Project ID
|
java.lang.String |
getReporterName()
Get the reporter name
|
org.bson.types.ObjectId |
getReportId()
Returns the active Report ID
|
ExtentKlovReporter |
initKlovServerConnection(java.lang.String url)
Initializes the Mongo DB connection with a connection url
|
ExtentKlovReporter |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds)
Initializes the Mongo DB connection with a list of
ServerAddress
addresses |
ExtentKlovReporter |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress and
MongoClientOptions |
ExtentKlovReporter |
initMongoDbConnection(com.mongodb.MongoClientURI uri)
Initialize Mongo DB connection with a
MongoClientURI |
ExtentKlovReporter |
initMongoDbConnection(com.mongodb.ServerAddress addr)
Initializes the Mongo DB connection with
ServerAddress |
ExtentKlovReporter |
initMongoDbConnection(com.mongodb.ServerAddress addr,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a
ServerAddress and
MongoClientOptions |
ExtentKlovReporter |
initMongoDbConnection(java.lang.String host)
Initialize Mongo DB connection with host and default port: 27017
|
ExtentKlovReporter |
initMongoDbConnection(java.lang.String host,
int port)
Initialize Mongo DB connection with host and post
|
ExtentKlovReporter |
initMongoDbConnection(java.lang.String host,
com.mongodb.MongoClientOptions options)
Initialize Mongo DB connection with host and
MongoClientOptions |
void |
loadInitializationParams(java.io.InputStream is) |
void |
loadInitializationParams(java.util.Properties props) |
void |
loadInitializationParams(java.lang.String propertiesPath) |
void |
onAuthorAssigned(Test test,
Author author)
Invoked each time an author is assigned to any test/node
|
void |
onCategoryAssigned(Test test,
Category category)
Invoked each time a category is assigned to any test/node
|
void |
onDeviceAssigned(Test test,
Device device)
Invoked each time a device is assigned to any test/node
|
void |
onLogAdded(Test test,
Log log)
Invoked each time a log is added to any test/node
|
void |
onNodeStarted(Test node)
Invoked when a node is started using
createNode() |
void |
onScreenCaptureAdded(Log log,
ScreenCapture screenCapture)
Invoked each time a screencapture is added to log
|
void |
onScreenCaptureAdded(Test test,
ScreenCapture screenCapture)
Invoked each time a screencapture is added to test
|
void |
onTestRemoved(Test test)
Invoked when a test is removed using
removeTest() |
void |
onTestStarted(Test test)
Invoked when a test is started using
createTest() |
ExtentKlovReporter |
setProjectName(java.lang.String projectName)
Sets the project name
|
ExtentKlovReporter |
setReportName(java.lang.String reportName)
Sets the report name
|
void |
start()
Starts passing run information to the reporter
|
void |
stop()
Stops the reporter.
|
getConfigurationStore, init, loadConfig, loadConfig, loadConfig, loadInternalReporterConfiguration, loadUserConfig, loadXMLConfig, loadXMLConfig, loadXMLConfig, loadXMLConfigautoCreateRelativePathMedia, getAnalysisStrategy, getAuthorContextInfo, getCategoryContextInfo, getDeviceContextInfo, getEndTime, getExceptionContextInfo, getLongRunDuration, getReportStatusStats, getRunDuration, getStartTime, getStatusCollection, getSystemAttributeContext, getTestList, getTestRunnerLogs, setAnalysisStrategy, setEndTime, setStartTimepublic ExtentKlovReporter(java.lang.String projectName)
The reportName will be created using the current timestamp
projectName - Name of the projectpublic ExtentKlovReporter(java.lang.String projectName,
java.lang.String reportName)
projectName - Name of the projectreportName - Name of the reportpublic ExtentKlovReporter setProjectName(java.lang.String projectName)
projectName - Name of the projectExtentKlovReporter objectpublic ExtentKlovReporter setReportName(java.lang.String reportName)
reportName - Name of the reportExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(java.lang.String host)
host - host nameExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(java.lang.String host, com.mongodb.MongoClientOptions options)
MongoClientOptionshost - host nameoptions - MongoClientOptions optionsExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(java.lang.String host, int port)
host - host nameport - port numberExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.MongoClientURI uri)
MongoClientURIuri - MongoClientURI uriExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr)
ServerAddressaddr - ServerAddress server addressExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds)
ServerAddress
addressesseeds - A list of ServerAddress server addressesExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds, com.mongodb.MongoClientOptions options)
ServerAddress and
MongoClientOptionsseeds - A list of ServerAddress server addressesoptions - MongoClientOptions optionsExtentKlovReporter objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr, com.mongodb.MongoClientOptions options)
ServerAddress and
MongoClientOptionsaddr - A list of ServerAddress server addressesoptions - MongoClientOptions optionsExtentKlovReporter objectpublic ExtentKlovReporter initKlovServerConnection(java.lang.String url)
url - Url stringExtentKlovReporter objectpublic void loadInitializationParams(java.io.InputStream is)
public void loadInitializationParams(java.lang.String propertiesPath)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void loadInitializationParams(java.util.Properties props)
public void start()
ExtentReporterpublic void stop()
ExtentReporterstop in interface ExtentReporterstop in class AbstractReporterpublic void flush(ReportAggregates reportAggregates)
ExtentReporterflush in interface ExtentReporterflush in class AbstractReporterreportAggregates - a ReportAggregates objectpublic java.util.List<org.bson.types.ObjectId> getCollectionValues(java.util.Map<java.lang.String,org.bson.types.ObjectId> collection)
public void onTestStarted(Test test)
TestListenercreateTest()onTestStarted in interface TestListeneronTestStarted in class AbstractReportertest - Test objectpublic void onNodeStarted(Test node)
TestListenercreateNode()onNodeStarted in interface TestListeneronNodeStarted in class AbstractReporternode - Test objectpublic void onLogAdded(Test test, Log log)
TestListeneronLogAdded in interface TestListeneronLogAdded in class AbstractReportertest - Test objectlog - Log objectpublic <T extends Attribute> void assignAttribute(Test test, Attribute attribute, java.util.Map<java.lang.String,org.bson.types.ObjectId> nameObjectIdCollection, com.mongodb.client.MongoCollection<org.bson.Document> mongoCollection, TestAttributeTestContextStore<T> attributeContext)
public void onCategoryAssigned(Test test, Category category)
TestListeneronCategoryAssigned in interface TestListeneronCategoryAssigned in class AbstractReportertest - Test objectcategory - Category objectpublic void onAuthorAssigned(Test test, Author author)
TestListeneronAuthorAssigned in interface TestListeneronAuthorAssigned in class AbstractReportertest - Test objectauthor - Author objectpublic void onScreenCaptureAdded(Test test, ScreenCapture screenCapture) throws java.io.IOException
TestListeneronScreenCaptureAdded in interface TestListeneronScreenCaptureAdded in class AbstractReportertest - Test objectscreenCapture - ScreenCapture
objectjava.io.IOException - Exception thrown if the media object is not foundpublic void onScreenCaptureAdded(Log log, ScreenCapture screenCapture) throws java.io.IOException
TestListeneronScreenCaptureAdded in interface TestListeneronScreenCaptureAdded in class AbstractReporterlog - Log objectscreenCapture - ScreenCapture
objectjava.io.IOException - Exception thrown if the media object is not foundpublic org.bson.types.ObjectId getProjectId()
ObjectId objectpublic org.bson.types.ObjectId getReportId()
ObjectId objectpublic void onTestRemoved(Test test)
TestListenerremoveTest()onTestRemoved in interface TestListeneronTestRemoved in class AbstractReportertest - Test objectpublic void onDeviceAssigned(Test test, Device device)
TestListeneronDeviceAssigned in interface TestListeneronDeviceAssigned in class AbstractReportertest - Test objectdevice - Device objectpublic java.lang.String getReporterName()
ExtentReporterCopyright © 2020. All Rights Reserved.