Skip to content

Create endpoint to parse single JUnit test report

Problem to solve

As a Frontend Engineer I want an endpoint that will return parsed JUnit test results for a single build instead of for all the builds in a pipeline in order to implement #211839 (closed)

Right now the endpoint that we have for test_reports parses all of the JUnit reports for a pipeline run. This currently takes ~25s to run on the main gitlab project. We want an endpoint that returns a single parse report so we can implement #211839 (closed) and hopefully speed up the page-loads for the JUnit test report feature enough to enable it by default.

Please see #211839 (closed) for a more detailed explanation/discussion/diagram.

Intended users

Proposal

If we implement an endpoint that parses and individual test report, we can call that instead when a specific test suite is clicked into. This should increase the performance overall as it's unlikely someone will click into every test suite.

sequenceDiagram
    participant U as User
    participant FE as Frontend
    participant BE as Backend
    U->>FE: Click onto pipeline page
    FE->>BE: Request test report summaries (async)
    BE->>FE: Return test report summaries from DB
    FE->>U: Render badge counter on test tab
    U->>FE: Click Test Tab
    FE->>U: Render test tab from summary data (No visual change from current)
    U->>FE: Click on single test suite
    FE->>BE: Request full report for single test suite
    BE->>FE: Parse XML report and return detailed report
    FE->>U: Render report for single test suite

This issue is for tracking the work necessary for completing "Request full report for single test suite" from the above diagram.

The frontend will consume the endpoint created from this issue in order to accomplish this.

User experience goal

The performance of the tests tab on the pipeline page should be much better. Ideally we should be able to load the top level tab in under 1000ms and each individual test suite page in under 2000ms.

Permissions and Security

This endpoint should have the same permissions level as the endpoint that returns the aggregated test reports.

Availability & Testing

What does success look like, and how can we measure that?

Acceptance criteria

  • Endpoint exists, can be executed against and is documented for internal use.
  • Endpoint returns for gitlab-org project pipeline in ~2000 ms or less

What is the type of buyer?

This is an internal facing feature for GitLab usage.

Links / references

Edited by Ricky Wiens