public abstract class BasicFileReporter extends AbstractReporter
Modifier and Type | Field and Description |
---|---|
protected String |
destination |
protected String |
filePath |
protected Map<String,Object> |
templateMap |
endTime, levels, startTime
configContext
Modifier | Constructor and Description |
---|---|
protected |
BasicFileReporter(File path) |
protected |
BasicFileReporter(String path) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsStatus(Status status) |
boolean |
containsStatus(String status) |
protected Boolean |
enforceOfflineMode() |
void |
flush(ReportAggregates reportAggregates)
Write to or update the target source (file, database)
|
TestAttributeTestContextProvider<Author> |
getAuthorContextInfo() |
TestAttributeTestContextProvider<Category> |
getCategoryContextInfo() |
TestAttributeTestContextProvider<Device> |
getDeviceContextInfo() |
Date |
getEndTime() |
ExceptionTestContextImpl |
getExceptionContextInfo() |
File |
getFileFile() |
String |
getFilePath() |
protected freemarker.template.Configuration |
getFreemarkerConfig() |
ReportStatusStats |
getReportStatusStats() |
protected String |
getSource() |
Date |
getStartTime() |
List<Status> |
getStatusList() |
SystemAttributeContext |
getSystemAttributeContext() |
List<Test> |
getTestList() |
List<String> |
getTestRunnerLogs() |
protected void |
init(String[] configFilePath,
BasicFileConfiguration userConfig) |
protected void |
loadUserConfig() |
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() |
protected void |
processTemplate(freemarker.template.Template template,
File outputFile) |
protected void |
setFilePath(String filePath) |
void |
start()
Starts passing run information to the reporter
|
void |
stop()
Stops the reporter.
|
getAnalysisStrategy, getLongRunDuration, getRunDuration, setAnalysisStrategy, setEndTime
getConfigContext, loadConfig, loadConfig, loadConfig, loadXMLConfig, loadXMLConfig, loadXMLConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReporterName
protected BasicFileReporter(String path)
protected BasicFileReporter(File path)
protected void setFilePath(String filePath)
public String getFilePath()
public File getFileFile()
protected void init(String[] configFilePath, BasicFileConfiguration userConfig)
protected void loadUserConfig()
public void start()
ExtentReporter
public void flush(ReportAggregates reportAggregates)
ExtentReporter
flush
in interface ExtentReporter
flush
in class AbstractReporter
reportAggregates
- a ReportAggregates
objectpublic TestAttributeTestContextProvider<Category> getCategoryContextInfo()
public TestAttributeTestContextProvider<Author> getAuthorContextInfo()
public TestAttributeTestContextProvider<Device> getDeviceContextInfo()
public ExceptionTestContextImpl getExceptionContextInfo()
public SystemAttributeContext getSystemAttributeContext()
public ReportStatusStats getReportStatusStats()
public List<Status> getStatusList()
getStatusList
in class AbstractReporter
public void onTestStarted(Test test)
TestListener
createTest()
test
- Test
objectpublic void onTestRemoved(Test test)
TestListener
removeTest()
test
- Test
objectpublic void onNodeStarted(Test node)
TestListener
createNode()
node
- Test
objectpublic void onLogAdded(Test test, Log log)
TestListener
public void onCategoryAssigned(Test test, Category category)
TestListener
public void onAuthorAssigned(Test test, Author author)
TestListener
public void onDeviceAssigned(Test test, Device device)
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 stop()
ExtentReporter
public Date getStartTime()
getStartTime
in class AbstractReporter
public Date getEndTime()
getEndTime
in class AbstractReporter
public void onScreencastAdded(Test test, Screencast screencast) throws IOException
TestListener
test
- Test
objectscreencast
- Screencast
objectIOException
- Exception thrown if the media object is not foundpublic boolean containsStatus(String status)
public boolean containsStatus(Status status)
protected void processTemplate(freemarker.template.Template template, File outputFile) throws freemarker.template.TemplateException, IOException
freemarker.template.TemplateException
IOException
protected String getSource()
protected freemarker.template.Configuration getFreemarkerConfig()
protected Boolean enforceOfflineMode()
Copyright © 2018. All rights reserved.