Class AbstractReportParser
java.lang.Object
org.opentestfactory.report.interpreter.base.application.report.AbstractReportParser
- Author:
- akatz
Collection of methods allowing the parsing and retrieval of informations contained in a test report (currently an xml file).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractReportParser(String reportName, String passStatus, String failStatus) AbstractReportParser(String reportName, String passStatus, String failStatus, String skippedStatus) AbstractReportParser(String reportName, String passStatus, String failStatus, String skippedStatus, String notRunStatus) -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegercalculateDurationFromNodes(Document document, String targetedDurationQuery) protected Stringorg.opentestfactory.dto.v1.OTFTestStatusconvertToInternalStatus(String status) org.opentestfactory.dto.v1.OTFTestStatusprotected StringextractAttribute(Node node, String name) protected abstract ExtendedOTFTestStatusextractExtendedStatus(Document document, String testDefinition) extractFailureDetails(Document document, String targetQuery) protected IntegerextractNodeDuration(Node testCase) protected abstract StringextractValidatingReference(String testDefinition) protected StringgetTestStepStatusesByStepNumber(Document document, String testDefinition) retrieveExtendedStatus(String testDefinition, List<String> attachments) Retrieves the status of a test xml reportretrieveXmlStepStatuses(String testDefinition, List<String> attachments) Retrieves the step statuses from the test report XML.protected abstract booleanprotected IntegerupdateDuration(Integer currentDuration, Integer additionalDuration)
-
Field Details
-
PARSING_ERROR_MESSAGE
- See Also:
-
REPORT_FILE_NOT_LISTED_IN_ATTACHMENTS_ERROR_MESSAGE
- See Also:
-
FAILURE_NODE_NAME
- See Also:
-
MESSAGE_FIELD_NAME
- See Also:
-
-
Constructor Details
-
AbstractReportParser
-
AbstractReportParser
-
AbstractReportParser
-
-
Method Details
-
retrieveXmlStepStatuses
public Map<Integer, org.opentestfactory.dto.v1.OTFTestStatus> retrieveXmlStepStatuses(String testDefinition, List<String> attachments) Retrieves the step statuses from the test report XML.- Parameters:
testDefinition- String representing the full name of the testattachments- The list of paths to the test generated reports.- Returns:
- A map of step statuses.
-
supportStepStatusParsing
protected abstract boolean supportStepStatusParsing() -
retrieveExtendedStatus
public ExtendedOTFTestStatus retrieveExtendedStatus(String testDefinition, List<String> attachments) Retrieves the status of a test xml report- Parameters:
testDefinition- String representing the full name of the testattachments- List of paths to the test generated reports- Returns:
- A status as OTFTestStatus
-
extractExtendedStatus
protected abstract ExtendedOTFTestStatus extractExtendedStatus(Document document, String testDefinition) -
updateDuration
-
calculateDurationFromNodes
-
extractNodeDuration
-
extractFailureDetails
-
extractAttribute
-
getTestStepStatusesByStepNumber
-
extractValidatingReference
-
convertToInternalStatus
-
convertToInternalStatusForTestStep
-
computeSafeXpathValueExpression
-
getReportName
-