public class ExtentKlovReporter extends AbstractReporter
endTime, levels, startTime, statusList
configContext
Constructor and Description |
---|
ExtentKlovReporter()
Initializes the KlovReporter
|
ExtentKlovReporter(String projectName,
String reportName)
Initializes the KlovReporter with project and report names
|
Modifier and Type | Method and Description |
---|---|
<T extends TestAttribute> |
assignAttribute(Test test,
TestAttribute attribute,
Map<String,org.bson.types.ObjectId> nameObjectIdCollection,
com.mongodb.client.MongoCollection<org.bson.Document> mongoCollection,
TestAttributeTestContextProvider<T> attributeContext) |
void |
flush(ReportAggregates reportAggregates)
Write to or update the target source (file, database)
|
List<org.bson.types.ObjectId> |
getCollectionValues(Map<String,org.bson.types.ObjectId> collection) |
org.bson.types.ObjectId |
getProjectId()
Returns the active Project ID
|
String |
getReporterName()
Get the reporter name
|
org.bson.types.ObjectId |
getReportId()
Returns the active Report ID
|
ExtentKlovReporter |
initKlovServerConnection(String url)
Initializes the Mongo DB connection with a connection url
|
ExtentKlovReporter |
initMongoDbConnection(List<com.mongodb.ServerAddress> seeds)
Initializes the Mongo DB connection with a list of
ServerAddress
addresses |
ExtentKlovReporter |
initMongoDbConnection(List<com.mongodb.ServerAddress> seeds,
List<com.mongodb.MongoCredential> credentialsList)
Initializes the Mongo DB connection with a list of
ServerAddress
and MongoCredential |
ExtentKlovReporter |
initMongoDbConnection(List<com.mongodb.ServerAddress> seeds,
List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress ,
MongoCredential and MongoClientOptions |
ExtentKlovReporter |
initMongoDbConnection(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,
List<com.mongodb.MongoCredential> credentialsList)
Initializes the Mongo DB connection with
ServerAddress and a list of
MongoCredential credentials |
ExtentKlovReporter |
initMongoDbConnection(com.mongodb.ServerAddress addr,
List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress ,
MongoCredential and MongoClientOptions |
ExtentKlovReporter |
initMongoDbConnection(com.mongodb.ServerAddress addr,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a
ServerAddress and
MongoClientOptions |
ExtentKlovReporter |
initMongoDbConnection(String host)
Initialize Mongo DB connection with host and default port: 27017
|
ExtentKlovReporter |
initMongoDbConnection(String host,
int port)
Initialize Mongo DB connection with host and post
|
ExtentKlovReporter |
initMongoDbConnection(String host,
com.mongodb.MongoClientOptions options)
Initialize Mongo DB connection with host and
MongoClientOptions |
void |
loadInitializationParams(Properties props) |
void |
loadInitializationParams(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 |
onScreencastAdded(Test test,
Screencast screencast)
Invoked each time a screencast is added
|
void |
onTestRemoved(Test test)
Invoked when a test is removed using
removeTest() |
void |
onTestStarted(Test test)
Invoked when a test is started using
createTest() |
void |
setProjectName(String projectName)
Sets the project name
|
void |
setReportName(String reportName)
Sets the report name
|
void |
start()
Starts passing run information to the reporter
|
void |
stop()
Stops the reporter.
|
getAnalysisStrategy, getEndTime, getLongRunDuration, getRunDuration, getStartTime, getStatusList, setAnalysisStrategy, setEndTime
getConfigContext, loadConfig, loadConfig, loadConfig, loadXMLConfig, loadXMLConfig, loadXMLConfig
public void setProjectName(String projectName)
projectName
- Name of the projectpublic void setReportName(String reportName)
reportName
- Name of the reportpublic ExtentKlovReporter initMongoDbConnection(String host)
host
- host nameExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(String host, com.mongodb.MongoClientOptions options)
MongoClientOptions
host
- host nameoptions
- MongoClientOptions
optionsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(String host, int port)
host
- host nameport
- port numberExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.MongoClientURI uri)
MongoClientURI
uri
- MongoClientURI
uriExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr)
ServerAddress
addr
- ServerAddress
server addressExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(List<com.mongodb.ServerAddress> seeds)
ServerAddress
addressesseeds
- A list of ServerAddress
server addressesExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(List<com.mongodb.ServerAddress> seeds, List<com.mongodb.MongoCredential> credentialsList)
ServerAddress
and MongoCredential
seeds
- A list of ServerAddress
server addressescredentialsList
- A list of MongoCredential
credentialsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(List<com.mongodb.ServerAddress> seeds, List<com.mongodb.MongoCredential> credentialsList, com.mongodb.MongoClientOptions options)
ServerAddress
,
MongoCredential
and MongoClientOptions
seeds
- A list of ServerAddress
server addressescredentialsList
- A list of MongoCredential
credentialsoptions
- MongoClientOptions
optionsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(List<com.mongodb.ServerAddress> seeds, com.mongodb.MongoClientOptions options)
ServerAddress
and MongoClientOptions
seeds
- A list of ServerAddress
server addressesoptions
- MongoClientOptions
optionsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr, List<com.mongodb.MongoCredential> credentialsList)
ServerAddress
and a list of
MongoCredential
credentialsaddr
- ServerAddress
server addresscredentialsList
- A list of MongoCredential
credentialsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr, List<com.mongodb.MongoCredential> credentialsList, com.mongodb.MongoClientOptions options)
ServerAddress
,
MongoCredential
and MongoClientOptions
addr
- A list of ServerAddress
server addressescredentialsList
- A list of MongoCredential
credentialsoptions
- MongoClientOptions
optionsExtentKlovReporter
objectpublic ExtentKlovReporter initMongoDbConnection(com.mongodb.ServerAddress addr, com.mongodb.MongoClientOptions options)
ServerAddress
and
MongoClientOptions
addr
- A list of ServerAddress
server addressesoptions
- MongoClientOptions
optionsExtentKlovReporter
objectpublic ExtentKlovReporter initKlovServerConnection(String url)
url
- Url stringExtentKlovReporter
objectpublic void loadInitializationParams(String propertiesPath) throws FileNotFoundException
FileNotFoundException
public void loadInitializationParams(Properties props)
public void start()
ExtentReporter
public void stop()
ExtentReporter
public void flush(ReportAggregates reportAggregates)
ExtentReporter
flush
in interface ExtentReporter
flush
in class AbstractReporter
reportAggregates
- a ReportAggregates
objectpublic List<org.bson.types.ObjectId> getCollectionValues(Map<String,org.bson.types.ObjectId> collection)
public void onTestStarted(Test test)
TestListener
createTest()
test
- Test
objectpublic void onNodeStarted(Test node)
TestListener
createNode()
node
- Test
objectpublic void onLogAdded(Test test, Log log)
TestListener
public <T extends TestAttribute> void assignAttribute(Test test, TestAttribute attribute, Map<String,org.bson.types.ObjectId> nameObjectIdCollection, com.mongodb.client.MongoCollection<org.bson.Document> mongoCollection, TestAttributeTestContextProvider<T> attributeContext)
public void onCategoryAssigned(Test test, Category category)
TestListener
public void onAuthorAssigned(Test test, Author author)
TestListener
public void onScreenCaptureAdded(Test test, ScreenCapture screenCapture) throws IOException
TestListener
test
- Test
objectscreenCapture
- ScreenCapture
objectIOException
- Exception thrown if the media object is not foundpublic void onScreenCaptureAdded(Log log, ScreenCapture screenCapture) throws IOException
TestListener
log
- Log
objectscreenCapture
- ScreenCapture
objectIOException
- Exception thrown if the media object is not foundpublic void onScreencastAdded(Test test, Screencast screencast) throws IOException
TestListener
test
- Test
objectscreencast
- Screencast
objectIOException
- 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)
TestListener
removeTest()
test
- Test
objectpublic void onDeviceAssigned(Test test, Device device)
TestListener
public String getReporterName()
ExtentReporter
Copyright © 2018. All rights reserved.