public interface ReportManager extends Manager
Modifier and Type | Method and Description |
---|---|
void |
closeReport()
Closes the active report and sets it to null (to allow for setting another active report for
the browser).
|
void |
endTest()
Ends the test on the current active thread.
|
void |
flush()
flushes the active report (writes all ended tests for this report file to html).
|
ReportsTest |
getTest() |
void |
setReport(Report report)
Sets the active report for the driver to write to.
|
ReportsTest |
startTest(String testName)
Starts a new test on the driver's report with the specified name and a blank description.
|
ReportsTest |
startTest(String testName,
String description)
Starts a new test on the driver's report with the specified name and description.
|
void setReport(Report report)
getTest()
,
startTest(String)
, startTest(String, String)
, and endTest()
.
Note it will not set the report if the browser currently has an active one.
report
- The report to set as the driver's active report.ReportsTest startTest(String testName)
BrowserConfig.getSaveFolder()
reports
folder with the name set to the current date time.
Note the test is linked to the current thread id (used by getTest()
). If a test is
already active on this thread, a RuntimeException will be thrown.
testName
- The name of the test created.ReportsTest
created.RuntimeException
- if a test is already active on the current thread.ReportsTest startTest(String testName, String description)
BrowserConfig.getSaveFolder()
reports folder
with the name set to the current date time.
Note the test is linked to the current thread id (used by getTest()
). If a test is
already active on this thread, a RuntimeException will be thrown.
testName
- The name of the test created.description
- The description to set for the test.ReportsTest
created.RuntimeException
- if a test is already active on the current thread.ReportsTest getTest()
void endTest()
void flush()
Note, this has a tendency to be resource intensive since it does not append. When you flush a report, it rewrites the entire file. Try flushing as little as possible to avoid unneeded rewrites.
void closeReport()
Closing a report runs an intrusive flush. That means it first flushes all ended tests and then force flushes any tests that were not closed.
Copyright © 2019. All rights reserved.