Package com.qcefast.reports
Class HTMLReport
- java.lang.Object
-
- com.qcefast.reports.HTMLReport
-
public class HTMLReport extends java.lang.Object
This class is used to create the html reports that show the status of test runs- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description Status
overallStatus
-
Constructor Summary
Constructors Constructor Description HTMLReport()
Default constructorHTMLReport(java.lang.String resultsFolder)
Instantiates a new HtmlReport using a results folder filepath
-
Method Summary
Modifier and Type Method Description Status
getOverallStatus()
Returns the overall status of a test runjava.lang.String
getOverAllSumFilePath()
Gets path of the overall summary filejava.util.List<TestFileLog>
getTestFileLogs()
Returns a list of all the test file logsvoid
reset()
Clears testFileLogsvoid
setOverallStatus(Status status)
Sets the overall status of a test runvoid
setOverallSumFilePath(java.lang.String path)
SetsoverAllSumFilePath
void
setTestFileLogs(java.util.List<TestFileLog> testFileLogs)
SetstestFileLogs
static void
updateFStepResultHeader(java.lang.String detailedReportPath, FunctionalStepLog fStepLog)
Updates the execution status of the functional step header from RUNNING to the appropriate valuestatic void
updateTestScriptResultHeader(TestFileLog fileLog)
Updates the execution status in the detailed report of a testscript from running the appropriate statusvoid
updateTestSuiteResultFile(java.lang.String path, double totalTests, double passedTests, double failedTests, double skippedTests)
Updates the overall summary file after all tests have been completedstatic void
writeDebugLog(java.lang.String testRunPath, java.lang.String debugLine)
Used to write to the debug logstatic void
writeDivFooter(java.lang.String resultPath)
Writes closing tag for an html divvoid
writeOverAllTestScriptHeader()
Writes the headers for the overall summary of a testscript to the overall summary reportstatic void
writeTblFooter(java.lang.String resultPath)
Writes closing tag for an html tablevoid
writeTCOverAllStatus(TestFileLog log)
Writes the overall summary of a testscript to the overall summary reportstatic void
writeTestScriptResultHeader(TestFileLog fileLog)
Writes the header of the detailed report file for a testscriptvoid
writeTestSuiteResultHeader(FastXml fastXml, java.util.Set<java.lang.String> scenarioTagsToRun, java.util.Set<java.lang.String> scenarioTagsToSkip, java.util.Set<java.lang.String> functionalTagsToRun, java.util.Set<java.lang.String> functionalTagsToSkip)
Writes the overall summary reportstatic void
writeTScriptResultHeader(java.lang.String detailedReportPath, FunctionalStepLog fStepLog)
Writes the header for a functional stepstatic void
writeTStepException(TestStep tStep)
Writes an exception to the specified path for the current teststepstatic void
writeTStepResult(java.lang.String detailedReportPath, int fStepNum, TestStep tStep)
Writes the results of the completed test step to the detailed reportstatic void
writeTStepResultHeader(java.lang.String detailedReportPath, int ftsNumber)
Writes the table header for the teststeps in the detailed report
-
-
-
Field Detail
-
overallStatus
public Status overallStatus
-
-
Method Detail
-
getOverallStatus
public Status getOverallStatus()
Returns the overall status of a test run- Returns:
- The status
- Since:
- 1.0.0
-
setOverallStatus
public void setOverallStatus(Status status)
Sets the overall status of a test run- Parameters:
status
- AStatus
- Since:
- 1.0.0
-
getOverAllSumFilePath
public java.lang.String getOverAllSumFilePath()
Gets path of the overall summary file- Returns:
- a filepath
- Since:
- 1.0.0
-
setOverallSumFilePath
public void setOverallSumFilePath(java.lang.String path)
SetsoverAllSumFilePath
- Parameters:
path
- a filepath- Since:
- 1.0.0
-
getTestFileLogs
public java.util.List<TestFileLog> getTestFileLogs()
Returns a list of all the test file logs- Returns:
- A list of
TestFileLog
- Since:
- 1.0.0
-
setTestFileLogs
public void setTestFileLogs(java.util.List<TestFileLog> testFileLogs)
SetstestFileLogs
- Parameters:
testFileLogs
- A list ofTestFileLog
- Since:
- 1.0.0
-
writeDebugLog
public static void writeDebugLog(java.lang.String testRunPath, java.lang.String debugLine) throws FastException
Used to write to the debug log- Parameters:
testRunPath
- The path of the debug filedebugLine
- The content being written to the file- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTestSuiteResultHeader
public void writeTestSuiteResultHeader(FastXml fastXml, java.util.Set<java.lang.String> scenarioTagsToRun, java.util.Set<java.lang.String> scenarioTagsToSkip, java.util.Set<java.lang.String> functionalTagsToRun, java.util.Set<java.lang.String> functionalTagsToSkip) throws FastException
Writes the overall summary report- Parameters:
fastXml
- A driverscenarioTagsToRun
- Scenario tags that a test was runningscenarioTagsToSkip
- Scenario tags that a test was skippingfunctionalTagsToRun
- Functional tags that a test was runningfunctionalTagsToSkip
- Functional tags that a test was skipping- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
updateTestSuiteResultFile
public void updateTestSuiteResultFile(java.lang.String path, double totalTests, double passedTests, double failedTests, double skippedTests) throws FastException
Updates the overall summary file after all tests have been completed- Parameters:
path
- The path of the overall summary filetotalTests
- The total number of testspassedTests
- The total number of tests that passedfailedTests
- The total number of tests that failedskippedTests
- The total number of tests that were skipped- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeOverAllTestScriptHeader
public void writeOverAllTestScriptHeader() throws FastException
Writes the headers for the overall summary of a testscript to the overall summary report- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTCOverAllStatus
public void writeTCOverAllStatus(TestFileLog log) throws FastException
Writes the overall summary of a testscript to the overall summary report- Parameters:
log
- The log containing the results of a testscript- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTestScriptResultHeader
public static void writeTestScriptResultHeader(TestFileLog fileLog) throws FastException
Writes the header of the detailed report file for a testscript- Parameters:
fileLog
- The log containing the results of a testscript- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
updateTestScriptResultHeader
public static void updateTestScriptResultHeader(TestFileLog fileLog) throws FastException
Updates the execution status in the detailed report of a testscript from running the appropriate status- Parameters:
fileLog
- The log containing the results of a testscript- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTScriptResultHeader
public static void writeTScriptResultHeader(java.lang.String detailedReportPath, FunctionalStepLog fStepLog) throws FastException
Writes the header for a functional step- Parameters:
detailedReportPath
- The path to the detailed reportfStepLog
- The log containing the results of a functional step- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
updateFStepResultHeader
public static void updateFStepResultHeader(java.lang.String detailedReportPath, FunctionalStepLog fStepLog) throws FastException
Updates the execution status of the functional step header from RUNNING to the appropriate value- Parameters:
detailedReportPath
- The path to the detailed reportfStepLog
- The log containing the results of a functional step- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTStepResultHeader
public static void writeTStepResultHeader(java.lang.String detailedReportPath, int ftsNumber) throws FastException
Writes the table header for the teststeps in the detailed report- Parameters:
detailedReportPath
- The path to the detailed reportftsNumber
- The functional step number the current teststep is in- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTStepResult
public static void writeTStepResult(java.lang.String detailedReportPath, int fStepNum, TestStep tStep) throws FastException
Writes the results of the completed test step to the detailed report- Parameters:
detailedReportPath
- The path to the detailed reportfStepNum
- The functional step number the current teststep is intStep
- The current teststep- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTStepException
public static void writeTStepException(TestStep tStep) throws FastException
Writes an exception to the specified path for the current teststep- Parameters:
tStep
- The current teststep- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeTblFooter
public static void writeTblFooter(java.lang.String resultPath) throws FastException
Writes closing tag for an html table- Parameters:
resultPath
- Path of the file to write to- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeDivFooter
public static void writeDivFooter(java.lang.String resultPath) throws FastException
Writes closing tag for an html div- Parameters:
resultPath
- Path of the file to write to- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
reset
public void reset()
Clears testFileLogs- Since:
- 1.0.0
-
-