Skip to content

Add test suite endpoint to GraphQL

Scott Hampton requested to merge be-test-suite-graphql into master

What does this MR do?

Adds ability to fetch a specific test suite from a pipeline via GraphQL. You can access it with following query:

query getPipelineTestSuite($fullPath: ID!, $pipelineIid: ID!, $buildIds: [ID!]!) {
  project(fullPath: $fullPath) {
    pipeline(iid: $pipelineIid) {
      testSuite(buildIds: $buildIds) {
        name
        totalTime
        totalCount
        successCount
        failedCount
        skippedCount
        errorCount
        suiteError
        testCases {
          nodes {
            status
            name
            classname
            file
            attachmentUrl
            executionTime
            stackTrace
            systemOutput
            recentFailures {
              count
              baseBranch
            }
          }
        }
      }
    }
  }
}

Screenshots (strongly suggested)

Screen_Cast_2021-04-08_at_9.57.19_AM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Scott Hampton

Merge request reports