Package org.qubership.atp.ram.services
Class ExecutionRequestCompareService
java.lang.Object
org.qubership.atp.ram.services.ExecutionRequestCompareService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckHashSum(CompareItem item, CompareItem itemCompare) compare HashSun in MetaInfo in two CompareItems.booleancheckTestPlansAreEquals(List<ExecutionRequest> executionRequests) Check ER-s from one test plan.createComparedMatrix(Map<UUID, TestRun> compareMap) Compare Log Records and create matrix.voidcreateLogRecordsTree(LinkedList<List<CompareItem>> comparedLogRecordsMatrix, List<RamObject> testPlanInfoList, LinkedList<LogRecordCompareScreenshotResponse> topLogRecordsList, boolean logsWithScreenshotsContent) Create log records with screenshots content.getCompareScreenshotsExecutionRequests(List<UUID> executionRequestIds, boolean logsWithScreenshotsContent) Compares Execution Requests with screenshots.Get screenshots.getDefectStatisticResponse(List<UUID> executionRequestIds) Comparison response for defect statistic.getEmptyCompareList(int listSize, CompareItem lastItem) Returns a row with empty cells for only one log record.getEnvironmentDetailsCompareResponse(EnvironmentsCompareRequest environmentsCompareRequest) Comparison response for environments.getFilteredTestRunBySection(List<TestRun> testRuns, TestScopeSections section) Getting test runs by section in the scope.Comparison table for log records.intgetMaximalRowInCompareItems(List<CompareItem> compareItems) Returns maximal row.getReferenceToRecord(List<CompareItem> compareItems, CompareItem item, boolean compareWithFirst) Getting log record on another execution request with the same definition id or name.getTestRunByTestCaseId(List<TestRun> testRuns, UUID testCaseId) Getting test run by test case id.getTestRunByTestRunName(List<TestRun> testRuns, String testRunName) Getting test run by test run name.getTestRunDetailsCompareResponses(List<UUID> executionRequestIds) Comparison table for test runs.booleanrecordsHaveSameDefinitionIds(CompareItem firstItem, CompareItem secondItem) Returns true if records has same definition id.booleanrecordsHaveSameNames(CompareItem firstItem, CompareItem secondItem) Returns true if records has same name.booleanrecordsPathsAreNullOrHaveSamePaths(CompareItem firstItem, CompareItem secondItem) Returns true if records don't have paths or have same paths.voidreorderTestRunByScope(List<TestRun> testRuns) Calculate new orders for test runs in the scope.voidreorderTestRunsBySection(List<TestRun> testRuns, TestScopeSections section, int previousMaxOrder) Calculate new orders for test runs in the section.booleanvalidateExecutionRequestsDuplicates(List<UUID> executionRequestIds) Validate request.
-
Constructor Details
-
ExecutionRequestCompareService
public ExecutionRequestCompareService()
-
-
Method Details
-
validateExecutionRequestsDuplicates
Validate request. -
getEnvironmentDetailsCompareResponse
public List<EnvironmentDetailsCompareResponse> getEnvironmentDetailsCompareResponse(EnvironmentsCompareRequest environmentsCompareRequest) Comparison response for environments. -
getDefectStatisticResponse
Comparison response for defect statistic. -
getTestRunDetailsCompareResponses
public TestRunDetailsCompareResponse getTestRunDetailsCompareResponses(List<UUID> executionRequestIds) Comparison table for test runs. -
getTestRunByTestCaseId
Getting test run by test case id. -
getTestRunByTestRunName
Getting test run by test run name. -
reorderTestRunByScope
Calculate new orders for test runs in the scope. -
reorderTestRunsBySection
public void reorderTestRunsBySection(List<TestRun> testRuns, TestScopeSections section, int previousMaxOrder) Calculate new orders for test runs in the section. -
getFilteredTestRunBySection
Getting test runs by section in the scope. -
getReferenceToRecord
public CompareItem getReferenceToRecord(List<CompareItem> compareItems, CompareItem item, boolean compareWithFirst) Getting log record on another execution request with the same definition id or name. -
recordsPathsAreNullOrHaveSamePaths
Returns true if records don't have paths or have same paths. -
recordsHaveSameNames
Returns true if records has same name. -
recordsHaveSameDefinitionIds
Returns true if records has same definition id. -
getEmptyCompareList
Returns a row with empty cells for only one log record. -
getMaximalRowInCompareItems
Returns maximal row. -
getLogRecordCompareResponse
Comparison table for log records. -
checkHashSum
compare HashSun in MetaInfo in two CompareItems. -
checkTestPlansAreEquals
Check ER-s from one test plan.- Parameters:
executionRequests- list of ER- Returns:
- true, if ER-s from one test plan
-
getCompareScreenshotsSubSteps
public List<SubstepScreenshotResponse> getCompareScreenshotsSubSteps(List<RowScreenshotRequest> rows) Get screenshots. -
getCompareScreenshotsExecutionRequests
public ExecutionRequestsCompareScreenshotResponse getCompareScreenshotsExecutionRequests(List<UUID> executionRequestIds, boolean logsWithScreenshotsContent) Compares Execution Requests with screenshots.- Parameters:
executionRequestIds- ER Id's.logsWithScreenshotsContent- compareScreenshots boolean- Returns:
- Tree with compared ER's, TR's and LR's.
-
createComparedMatrix
Compare Log Records and create matrix.- Parameters:
compareMap- Map with Test Runs for comparison.- Returns:
- Compared matrix.
-
createLogRecordsTree
public void createLogRecordsTree(LinkedList<List<CompareItem>> comparedLogRecordsMatrix, List<RamObject> testPlanInfoList, LinkedList<LogRecordCompareScreenshotResponse> topLogRecordsList, boolean logsWithScreenshotsContent) Create log records with screenshots content.- Parameters:
comparedLogRecordsMatrix- Matrix with compared Log Records.testPlanInfoList- Info about Test Plans.topLogRecordsList- Log Records with parent is a Test Run.logsWithScreenshotsContent- boolean value to check if it needs to add screenshots content.
-