Class CatalogueService

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

@Service public class CatalogueService extends Object
  • Constructor Details

    • CatalogueService

      public CatalogueService()
  • Method Details

    • autoSyncTestRunsWithJira

      public void autoSyncTestRunsWithJira(UUID projectId, UUID executionRequestId, boolean syncTestCases, boolean syncTestRuns, List<TestRunToJiraInfo> testRunToJiraInfos)
      Auto sync test runs and test cases with jira.
      Parameters:
      projectId - - project id
      executionRequestId - - execution request id for sync
      syncTestCases - - is test cases' sync needed
      syncTestRuns - - is test runs' sync needed
      testRunToJiraInfos - - test runs info to sync
    • updateCaseStatuses

      public void updateCaseStatuses(List<TestRun> listTestRun)
      Send to catalogue status updates for a list of testCases.
      Parameters:
      listTestRun - set of test case ids
    • getScenarioIdByTestCaseId

      public UUID getScenarioIdByTestCaseId(UUID testCaseId)
      Send request in catalog to get scenario id by test case id.
      Parameters:
      testCaseId - the test case id
      Returns:
      the scenario id
    • checkHashSumForScenario

      public CheckSumResponse checkHashSumForScenario(Map<UUID,String> hashSums)
      Send request to catalog to check the hashsum for scenarios from input map id-hashsum. If one of the scenario from input map fails validation then method returns false.
      Parameters:
      hashSums - the hash sums
      Returns:
      the boolean
    • getProjectData

      public ProjectDataResponse getProjectData(UUID projectId)
      Get project from catalogue.
      Parameters:
      projectId - project id
      Returns:
      project or null, if ID = null
    • getTestCaseLabelsByIds

      public List<TestCaseLabelResponse> getTestCaseLabelsByIds(List<TestRun> testRuns)
      Found test cases by specified identifiers.
      Parameters:
      testRuns - list test runs
      Returns:
      founded test cases
    • getLabelTemplateById

      public LabelTemplate getLabelTemplateById(UUID labelTemplateId)
      Get label template data from catalogue.
      Parameters:
      labelTemplateId - label template identifier
      Returns:
      label template data
    • deleteLabelTemplateById

      public void deleteLabelTemplateById(UUID labelTemplateId)
      Delete label template data from catalogue.
      Parameters:
      labelTemplateId - label template identifier
    • getIssues

      public List<Issue> getIssues(List<UUID> issueIds)
      Get issues from catalogue.
      Parameters:
      issueIds - ids of issues you want to get
      Returns:
      issues
    • getTestPlan

      public TestPlan getTestPlan(UUID testPlanId)
      Get test plan from catalogue.
      Parameters:
      testPlanId - test plan identifier
      Returns:
      test plan data
    • getTestScope

      public Scope getTestScope(UUID testScopeId)
      Get test scope from catalogue.
      Parameters:
      testScopeId - scope id
      Returns:
      scope or null, if ID = null
    • getTestCases

      public List<TestCase> getTestCases(CaseSearchRequest request)
      Get test cases by search request.
      Parameters:
      request - search request
      Returns:
      founded test cases
    • getTestCaseById

      public TestCase getTestCaseById(UUID testCaseId)
      Get test case by id.
      Parameters:
      testCaseId - test case identifier
      Returns:
      founded test cases
    • getLabelsByIds

      public List<Label> getLabelsByIds(Set<UUID> labelIds)
      Get labels by ids.
      Parameters:
      labelIds - label identifiers
      Returns:
      founded labels
    • createJiraTicket

      public JiraIssueCreateResponse createJiraTicket(UUID testPlanId, JiraIssueCreateRequest request)
      Create Jira ticket.
      Parameters:
      testPlanId - test plan identifier
      request - creation request
      Returns:
      created issue
    • getJiraTicket

      public JiraIssueResponse getJiraTicket(UUID testPlanId, String key)
      Create Jira ticket.
      Parameters:
      testPlanId - test plan identifier
      key - for search
      Returns:
      issue
    • getTestPlanJiraComponents

      public List<JiraComponent> getTestPlanJiraComponents(UUID testPlanId)
      Get test plan jira components.
      Parameters:
      testPlanId - test plan identifier
      Returns:
      jiraComponentsListResponse
    • rerunExecutionRequest

      public UUID rerunExecutionRequest(RerunRequestDto rerunRequestDto)
    • searchIssues

      public List<JiraIssueDto> searchIssues(UUID testPlanId, Set<String> keys, Set<String> fields)
      Search issues by keys and fields.
      Parameters:
      testPlanId - test plan identifier
      keys - keys for search
      fields - fields for search
      Returns:
      founded issues