Package com.shaft.tools.io.internal
Class ReportManagerHelper
java.lang.Object
com.shaft.tools.io.internal.ReportManagerHelper
- 
Method Summary
Modifier and TypeMethodDescriptionstatic voidattach(String attachmentType, String attachmentName, InputStream attachmentContent) Adds a new attachment using the input parameters provided.static voidAdds a new attachment using the input parameters provided.static voidstatic voidattachAsStep(String attachmentType, String attachmentName, InputStream attachmentContent) Adds a new attachment using the input parameters provided.static voidattachEngineLog(String executionEndTimestamp) static voidattachIssuesLog(String executionEndTimestamp) static voidattachTestLog(String currentMethodName, String testLog) Returns the log of the current test, and attaches it in the end of the test execution report.static voidstatic voidcreateLogEntry(String logText, org.apache.logging.log4j.Level loglevel) static Stringstatic Stringstatic Stringstatic booleanstatic StringgetExecutionDuration(long startTime, long endTime) static intstatic intstatic Stringstatic Stringstatic Booleanstatic booleanstatic voidstatic voidFormat an exception message and stack trace, and calls attach to add it as a log entry.static voidlogConfigurationMethodInformation(String className, String testMethodName, String configurationMethodType) static voidlogDiscrete(String logText, org.apache.logging.log4j.Level logLevel) Creates a custom log entry that will not be added as a step in the execution report, but you can see it in the attached execution log txt filestatic voidstatic voidlogDiscrete(Throwable t, org.apache.logging.log4j.Level logLevel) static voidstatic voidstatic voidlogExecutionSummary(String total, String passed, String failed, String skipped) static voidlogFinishedTestInformation(String className, String testMethodName, String testDescription, String testStatus) static voidlogImportantEntry(String logText, org.apache.logging.log4j.Level logLevel) static voidstatic voidstatic voidlogNestedSteps(String logText, List<List<Object>> attachments) static voidlogScenarioInformation(String keyword, String name, String steps) static voidlogTestInformation(String className, String testMethodName, String testDescription) static voidstatic Stringstatic voidsetDebugMode(Boolean debugMode) static voidsetDiscreteLogging(boolean discreteLogging) static voidsetFailedTestsWithoutOpenIssuesCounter(int failedTestsWithoutOpenIssuesCounter) static voidsetFeatureName(String featureName) static voidsetListOfNewIssuesForFailedTests(List<List<String>> listOfNewIssuesForFailedTests) static voidsetListOfOpenIssuesForFailedTests(List<List<String>> listOfOpenIssuesForFailedTests) static voidsetListOfOpenIssuesForPassedTests(List<List<String>> listOfOpenIssuesForPassedTests) static voidsetOpenIssuesForFailedTestsCounter(int openIssuesForFailedTestsCounter) static voidsetOpenIssuesForPassedTestsCounter(int openIssuesForPassedTestsCounter) static voidsetTestCaseDescription(String scenarioSteps) static voidsetTestCaseName(String scenarioName) static voidsetTotalNumberOfTests(int totalNumberOfTests) static voidwriteStepToReport(String logText) Formats logText and adds timestamp, then logs it as a step in the execution report. 
- 
Method Details
- 
setOpenIssuesForFailedTestsCounter
public static void setOpenIssuesForFailedTestsCounter(int openIssuesForFailedTestsCounter)  - 
setOpenIssuesForPassedTestsCounter
public static void setOpenIssuesForPassedTestsCounter(int openIssuesForPassedTestsCounter)  - 
setFailedTestsWithoutOpenIssuesCounter
public static void setFailedTestsWithoutOpenIssuesCounter(int failedTestsWithoutOpenIssuesCounter)  - 
setListOfOpenIssuesForFailedTests
 - 
setListOfOpenIssuesForPassedTests
 - 
setListOfNewIssuesForFailedTests
 - 
getIssueCounter
public static int getIssueCounter() - 
getOpenIssuesForFailedTestsCounters
public static int getOpenIssuesForFailedTestsCounters() - 
logIssue
 - 
prepareIssuesLog
 - 
getDiscreteLogging
public static boolean getDiscreteLogging()- Returns:
 - the discreteLogging
 
 - 
setDiscreteLogging
public static void setDiscreteLogging(boolean discreteLogging) - Parameters:
 discreteLogging- the discreteLogging to set
 - 
setTotalNumberOfTests
public static void setTotalNumberOfTests(int totalNumberOfTests)  - 
setDebugMode
 - 
logImportantEntry
 - 
logEngineVersion
public static void logEngineVersion() - 
logEngineClosure
public static void logEngineClosure() - 
logTestInformation
 - 
logScenarioInformation
 - 
logConfigurationMethodInformation
 - 
logExecutionSummary
 - 
logFinishedTestInformation
 - 
formatStackTraceToLogEntry
 - 
attach
public static void attach(String attachmentType, String attachmentName, InputStream attachmentContent) Adds a new attachment using the input parameters provided. The attachment is displayed as a step in the execution report. Used for Screenshots.- Parameters:
 attachmentType- the type of this attachmentattachmentName- the name of this attachmentattachmentContent- the content of this attachment
 - 
attach
Adds a new attachment using the input parameters provided. The attachment is displayed as a step in the execution report. Used for Screenshots.- Parameters:
 attachmentType- the type of this attachmentattachmentName- the name of this attachmentattachmentContent- the content of this attachment
 - 
attachTestLog
Returns the log of the current test, and attaches it in the end of the test execution report.- Parameters:
 currentMethodName- name of the current test method to be used in the attachment nametestLog- content of the text log to be used as the attachment value
 - 
attachEngineLog
 - 
attachIssuesLog
 - 
getCallingMethodFullName
 - 
getCallingClassFullName
 - 
getTestClassName
 - 
getTestMethodName
 - 
setTestCaseName
 - 
setTestCaseDescription
 - 
isCurrentTestPassed
 - 
setFeatureName
 - 
createLogEntry
 - 
writeStepToReport
Formats logText and adds timestamp, then logs it as a step in the execution report.- Parameters:
 logText- the text that needs to be logged in this action
 - 
isInternalStep
public static boolean isInternalStep() - 
attachAsStep
@Step("Attachment: {attachmentType} - {attachmentName}") public static void attachAsStep(String attachmentType, String attachmentName, InputStream attachmentContent) Adds a new attachment using the input parameters provided. The attachment is displayed as a step in the execution report. Used for Screenshots.- Parameters:
 attachmentType- the type of this attachmentattachmentName- the name of this attachmentattachmentContent- the content of this attachment
 - 
cleanExecutionSummaryReportDirectory
public static void cleanExecutionSummaryReportDirectory() - 
openExecutionSummaryReportAfterExecution
public static void openExecutionSummaryReportAfterExecution() - 
log
 - 
logNestedSteps
 - 
logNestedSteps
 - 
attach
 - 
log
Format an exception message and stack trace, and calls attach to add it as a log entry.- Parameters:
 throwable- the throwable (exception or error) that will be logged in this action
 - 
logDiscrete
 - 
logDiscrete
 - 
logDiscrete
Creates a custom log entry that will not be added as a step in the execution report, but you can see it in the attached execution log txt file- Parameters:
 logText- the text that will be logged by actionlogLevel- Level.ERROR, TRACE, INFO, WARN, DEBUG, FATAL
 - 
getExecutionDuration
 
 -