public class KlovReporter extends AbstractReporter
authorContext, categoryContext, configContext, configMap, endTime, exceptionContext, filePath, levels, sc, startTime, systemAttributeContext, templateMap, testList, testRunnerLogs| Constructor and Description |
|---|
KlovReporter()
Initializes the KlovReporter
|
KlovReporter(java.lang.String projectName,
java.lang.String reportName)
Initializes the KlovReporter with project and report names
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
java.lang.String |
getKlovUrl() |
org.bson.types.ObjectId |
getProjectId()
Returns the active Project ID
|
java.lang.String |
getProjectName() |
org.bson.types.ObjectId |
getReportId()
Returns the active Report ID
|
java.lang.String |
getReportName() |
java.util.List<Test> |
getTestList() |
void |
initKlovServerConnection(java.lang.String url)
Initializes the Mongo DB connection with a connection url
|
void |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds)
Initializes the Mongo DB connection with a list of
ServerAddress addresses |
void |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
java.util.List<com.mongodb.MongoCredential> credentialsList)
Initializes the Mongo DB connection with a list of
ServerAddress and MongoCredential |
void |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
java.util.List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress, MongoCredential
and MongoClientOptions |
void |
initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress and MongoClientOptions |
void |
initMongoDbConnection(com.mongodb.MongoClientURI uri)
Initialize Mongo DB connection with a
MongoClientURI |
void |
initMongoDbConnection(com.mongodb.ServerAddress addr)
Initializes the Mongo DB connection with
ServerAddress |
void |
initMongoDbConnection(com.mongodb.ServerAddress addr,
java.util.List<com.mongodb.MongoCredential> credentialsList)
Initializes the Mongo DB connection with
ServerAddress and a list of MongoCredential credentials |
void |
initMongoDbConnection(com.mongodb.ServerAddress addr,
java.util.List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a list of
ServerAddress, MongoCredential
and MongoClientOptions |
void |
initMongoDbConnection(com.mongodb.ServerAddress addr,
com.mongodb.MongoClientOptions options)
Initializes the Mongo DB connection with a
ServerAddress and MongoClientOptions |
void |
initMongoDbConnection(java.lang.String host)
Initialize Mongo DB connection with host and default port: 27017
|
void |
initMongoDbConnection(java.lang.String host,
int port)
Initialize Mongo DB connection with host and post
|
void |
initMongoDbConnection(java.lang.String host,
com.mongodb.MongoClientOptions options)
Initialize Mongo DB connection with host and
MongoClientOptions |
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 |
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(args) |
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 |
onTestStarted(Test test)
Invoked when a test is started using
createTest(args) |
void |
setKlovUrl(java.lang.String url)
Sets the Klov url
|
void |
setProjectName(java.lang.String projectName)
Sets the project name
|
void |
setReportName(java.lang.String reportName)
Sets the report name
|
void |
setTestList(java.util.List<Test> reportTestList)
Allows sharing the complete list of tests with the reporter
|
void |
start()
Starts passing run information to the reporter
|
void |
stop()
Stops the reporter.
|
getAnalysisStrategy, getAuthorContextInfo, getCategoryContextInfo, getEndTime, getExceptionContextInfo, getRunDuration, getStartTime, getStatusCount, getSystemAttributeContext, getTestRunnerLogs, loadConfig, loadConfig, loadConfig, loadXMLConfig, loadXMLConfig, setAnalysisStrategy, setAuthorContextInfo, setCategoryContextInfo, setEndTime, setExceptionContextInfo, setStartTime, setStatusCount, setSystemAttributeContext, setTestRunnerLogspublic KlovReporter()
public KlovReporter(java.lang.String projectName,
java.lang.String reportName)
projectName - Name of the projectreportName - Name of the reportpublic java.lang.String getProjectName()
public void setProjectName(java.lang.String projectName)
projectName - Name of the projectpublic java.lang.String getReportName()
public void setReportName(java.lang.String reportName)
reportName - Name of the reportpublic java.lang.String getKlovUrl()
public void setKlovUrl(java.lang.String url)
Note: its mandatory to set the url if you plan to view images on the Klov server
url - Url of Klov Serverpublic void initMongoDbConnection(java.lang.String host)
host - host namepublic void initMongoDbConnection(java.lang.String host,
com.mongodb.MongoClientOptions options)
MongoClientOptionshost - host nameoptions - MongoClientOptions optionspublic void initMongoDbConnection(java.lang.String host,
int port)
host - host nameport - port numberpublic void initMongoDbConnection(com.mongodb.MongoClientURI uri)
MongoClientURIuri - MongoClientURI uripublic void initMongoDbConnection(com.mongodb.ServerAddress addr)
ServerAddressaddr - ServerAddress server addresspublic void initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds)
ServerAddress addressesseeds - A list of ServerAddress server addressespublic void initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
java.util.List<com.mongodb.MongoCredential> credentialsList)
ServerAddress and MongoCredentialseeds - A list of ServerAddress server addressescredentialsList - A list of MongoCredential credentialspublic void initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
java.util.List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
ServerAddress, MongoCredential
and MongoClientOptionsseeds - A list of ServerAddress server addressescredentialsList - A list of MongoCredential credentialsoptions - MongoClientOptions optionspublic void initMongoDbConnection(java.util.List<com.mongodb.ServerAddress> seeds,
com.mongodb.MongoClientOptions options)
ServerAddress and MongoClientOptionsseeds - A list of ServerAddress server addressesoptions - MongoClientOptions optionspublic void initMongoDbConnection(com.mongodb.ServerAddress addr,
java.util.List<com.mongodb.MongoCredential> credentialsList)
ServerAddress and a list of MongoCredential credentialsaddr - ServerAddress server addresscredentialsList - A list of MongoCredential credentialspublic void initMongoDbConnection(com.mongodb.ServerAddress addr,
java.util.List<com.mongodb.MongoCredential> credentialsList,
com.mongodb.MongoClientOptions options)
ServerAddress, MongoCredential
and MongoClientOptionsaddr - A list of ServerAddress server addressescredentialsList - A list of MongoCredential credentialsoptions - MongoClientOptions optionspublic void initMongoDbConnection(com.mongodb.ServerAddress addr,
com.mongodb.MongoClientOptions options)
ServerAddress and MongoClientOptionsaddr - A list of ServerAddress server addressesoptions - MongoClientOptions optionspublic void initKlovServerConnection(java.lang.String url)
url - Url stringpublic void start()
ExtentReporterpublic void stop()
ExtentReporterpublic void flush()
public void onTestStarted(Test test)
TestListenercreateTest(args)test - Test objectpublic void onNodeStarted(Test node)
TestListenercreateNode(args)node - Test objectpublic void onLogAdded(Test test, Log log)
TestListenerpublic void onCategoryAssigned(Test test, Category category)
TestListenerpublic void onAuthorAssigned(Test test, Author author)
TestListenerpublic void onScreenCaptureAdded(Test test, ScreenCapture screenCapture) throws java.io.IOException
TestListenertest - 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
TestListenerlog - Log objectscreenCapture - ScreenCapture objectjava.io.IOException - Exception thrown if the media object is not foundpublic void onScreencastAdded(Test test, Screencast screencast) throws java.io.IOException
TestListenertest - Test objectscreencast - Screencast objectjava.io.IOException - Exception thrown if the media object is not foundpublic void setTestList(java.util.List<Test> reportTestList)
ReportAggregatesListenerreportTestList - list of all tests created by ExtentReportspublic java.util.List<Test> getTestList()
public org.bson.types.ObjectId getProjectId()
ObjectId objectpublic org.bson.types.ObjectId getReportId()
ObjectId objectCopyright © 2018. All Rights Reserved.