Class ExecutionRequestCompareService

java.lang.Object
org.qubership.atp.ram.services.ExecutionRequestCompareService

@Service public class ExecutionRequestCompareService extends Object
  • Constructor Details

    • ExecutionRequestCompareService

      public ExecutionRequestCompareService()
  • Method Details

    • validateExecutionRequestsDuplicates

      public boolean validateExecutionRequestsDuplicates(List<UUID> executionRequestIds)
      Validate request.
    • getEnvironmentDetailsCompareResponse

      public List<EnvironmentDetailsCompareResponse> getEnvironmentDetailsCompareResponse(EnvironmentsCompareRequest environmentsCompareRequest)
      Comparison response for environments.
    • getDefectStatisticResponse

      public DefectStatisticResponse getDefectStatisticResponse(List<UUID> executionRequestIds)
      Comparison response for defect statistic.
    • getTestRunDetailsCompareResponses

      public TestRunDetailsCompareResponse getTestRunDetailsCompareResponses(List<UUID> executionRequestIds)
      Comparison table for test runs.
    • getTestRunByTestCaseId

      public TestRun getTestRunByTestCaseId(List<TestRun> testRuns, UUID testCaseId)
      Getting test run by test case id.
    • getTestRunByTestRunName

      public TestRun getTestRunByTestRunName(List<TestRun> testRuns, String testRunName)
      Getting test run by test run name.
    • reorderTestRunByScope

      public void reorderTestRunByScope(List<TestRun> testRuns)
      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

      public List<TestRun> getFilteredTestRunBySection(List<TestRun> testRuns, TestScopeSections section)
      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

      public boolean recordsPathsAreNullOrHaveSamePaths(CompareItem firstItem, CompareItem secondItem)
      Returns true if records don't have paths or have same paths.
    • recordsHaveSameNames

      public boolean recordsHaveSameNames(CompareItem firstItem, CompareItem secondItem)
      Returns true if records has same name.
    • recordsHaveSameDefinitionIds

      public boolean recordsHaveSameDefinitionIds(CompareItem firstItem, CompareItem secondItem)
      Returns true if records has same definition id.
    • getEmptyCompareList

      public List<CompareItem> getEmptyCompareList(int listSize, CompareItem lastItem)
      Returns a row with empty cells for only one log record.
    • getMaximalRowInCompareItems

      public int getMaximalRowInCompareItems(List<CompareItem> compareItems)
      Returns maximal row.
    • getLogRecordCompareResponse

      public TestRunDetailsCompareResponse getLogRecordCompareResponse(LogRecordCompareRequest request)
      Comparison table for log records.
    • checkHashSum

      public boolean checkHashSum(CompareItem item, CompareItem itemCompare)
      compare HashSun in MetaInfo in two CompareItems.
    • checkTestPlansAreEquals

      public boolean checkTestPlansAreEquals(List<ExecutionRequest> executionRequests)
      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

      public LinkedList<List<CompareItem>> createComparedMatrix(Map<UUID,TestRun> compareMap)
      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.