Package de.qytera.qtaf.xray.builder.test
Class XrayTestEntityBuilder<T>
java.lang.Object
de.qytera.qtaf.xray.builder.test.XrayTestEntityBuilder<T>
- Type Parameters:
T- a type describing scenario data to transform into a test entity, e.g.List<TestScenarioLogCollection>
- Direct Known Subclasses:
MultipleIterationsXrayTestEntityBuilder,SingleIterationXrayTestEntityBuilder
A class for building
XrayTestEntity objects. The way these objects are built heavily depends on the test
suite configuration.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @NonNull TestSuiteLogCollectionThe entire test suite logs.A mapping of test issue keys to their summaries.protected final ScenarioReportCreatorHTML report creator for scenarios. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedXrayTestEntityBuilder(@NonNull TestSuiteLogCollection collection, @NonNull Map<String, String> issueSummaries) -
Method Summary
Modifier and TypeMethodDescriptionprotected static XrayManualTestStepResultEntityConverts aStepInformationLogMessageinto anXrayManualTestStepResultEntity.protected static XrayManualTestStepResultEntityConverts a list ofStepInformationLogMessageinto a singleXrayManualTestStepResultEntity.protected static XrayTestStepEntityConverts a list ofStepInformationLogMessageinto a singleXrayTestStepEntity.buildTestEntity(XrayTest xrayTest, T scenarioData) Builds a test entity for an executed test.protected static XrayTestStepEntityConverts aStepInformationLogMessageinto anXrayTestStepEntity.protected abstract StringgetAssignee(XrayTest xrayTest, T scenarioData) Extracts the user id who the test should be assigned to from provided scenario data.protected abstract StringgetComment(XrayTest xrayTest, T scenarioData) Extracts the test comment from provided scenario data.protected abstract List<XrayCustomFieldEntity>getCustomFields(XrayTest xrayTest, T scenarioData) Extracts the test's list of custom field (values) from provided scenario data.getDefects(XrayTest xrayTest, T scenarioData) Extracts the test's list of defects from provided scenario data.protected abstract DategetEndDate(XrayTest xrayTest, T scenarioData) Extracts the test end date from provided scenario data.protected abstract List<XrayEvidenceItemEntity>getEvidence(XrayTest xrayTest, T scenarioData) Extracts the test's list of (defect) evidence from provided scenario data.getExamples(XrayTest xrayTest, T scenarioData) Extracts the test's list of examples from provided scenario data.protected abstract StringgetExecutedBy(XrayTest xrayTest, T scenarioData) Extracts the user id who executed the test from provided scenario data.protected abstract List<XrayIterationResultEntity>getIterations(XrayTest xrayTest, T scenarioData) Extracts the test's list of iterations from provided scenario data.protected abstract DategetStartDate(XrayTest xrayTest, T scenarioData) Extracts the test start date from provided scenario data.protected abstract TestScenarioLogCollection.StatusExtracts the test's status from provided scenario data.protected abstract List<XrayManualTestStepResultEntity>Extracts the test's list of test step results from provided scenario data.protected abstract XrayTestInfoEntitygetTestInfo(XrayTest xrayTest, T scenarioData) Builds a test information entity for a test.
-
Field Details
-
collection
The entire test suite logs. Used for generating HTML reports. -
reportCreator
HTML report creator for scenarios. -
issueSummaries
A mapping of test issue keys to their summaries.
-
-
Constructor Details
-
XrayTestEntityBuilder
protected XrayTestEntityBuilder(@NonNull @NonNull TestSuiteLogCollection collection, @NonNull @NonNull Map<String, String> issueSummaries)
-
-
Method Details
-
buildTestEntity
Builds a test entity for an executed test.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to transform into anXrayTestEntity- Returns:
- the test entity
-
getStatus
Extracts the test's status from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the status from- Returns:
- the test's status
- See Also:
-
getTestInfo
Builds a test information entity for a test. Returnsnullif the configuration has not been configured to build test information entities.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to transform into anXrayTestInfoEntity- Returns:
- the test information entity
-
getStartDate
Extracts the test start date from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the start date from- Returns:
- the test's start date
- See Also:
-
getEndDate
Extracts the test end date from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the end date from- Returns:
- the test's end date
- See Also:
-
getComment
Extracts the test comment from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the comment from- Returns:
- the test's comment
- See Also:
-
getExecutedBy
Extracts the user id who executed the test from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the user id from- Returns:
- the user id of the user who executed the test
- See Also:
-
getAssignee
Extracts the user id who the test should be assigned to from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the assignee from- Returns:
- the test's assignee
- See Also:
-
getSteps
Extracts the test's list of test step results from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the steps from- Returns:
- the test's steps
- See Also:
-
getExamples
Extracts the test's list of examples from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the examples from- Returns:
- the test's examples
- See Also:
-
getIterations
Extracts the test's list of iterations from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the iterations from- Returns:
- the test's iterations
- See Also:
-
getDefects
Extracts the test's list of defects from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the defects from- Returns:
- the test's defects
- See Also:
-
getEvidence
Extracts the test's list of (defect) evidence from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the evidence from- Returns:
- the test's evidence
- See Also:
-
getCustomFields
Extracts the test's list of custom field (values) from provided scenario data.- Parameters:
xrayTest- theXrayTestannotation of the testscenarioData- the scenario data to extract the custom fields from- Returns:
- the test's custom field (values)
- See Also:
-
buildTestStepEntity
Converts aStepInformationLogMessageinto anXrayTestStepEntity.Note: these are different from
XrayManualTestStepResultEntity.- Parameters:
stepLog- the step information to convert- Returns:
- the converted Xray test step
-
buildMergedTestStepEntity
protected static XrayTestStepEntity buildMergedTestStepEntity(List<StepInformationLogMessage> steps) Converts a list ofStepInformationLogMessageinto a singleXrayTestStepEntity.Note: these are different from
XrayManualTestStepResultEntity.- Parameters:
steps- the steps' information to convert- Returns:
- the converted Xray test step
-
buildManualTestStepResultEntity
protected static XrayManualTestStepResultEntity buildManualTestStepResultEntity(StepInformationLogMessage step) Converts aStepInformationLogMessageinto anXrayManualTestStepResultEntity.Note: these are different from
XrayTestStepEntity.- Parameters:
step- the step information to convert- Returns:
- the converted Xray test step result
-
buildMergedManualTestStepResultEntity
protected static XrayManualTestStepResultEntity buildMergedManualTestStepResultEntity(List<StepInformationLogMessage> steps) Converts a list ofStepInformationLogMessageinto a singleXrayManualTestStepResultEntity.Note: these are different from
XrayTestStepEntity.- Parameters:
steps- the steps' information to convert- Returns:
- the converted Xray test step result
-