Skip to content

Expose test report summary API

Max Orefice requested to merge mo-expose-test-report-summary-api into master

Part of #211838 (closed)

This feature will be behind a feature flag. The full feature has been developed on this POC branch.

What does this MR do?

This MR exposes our a new TestReportSummary API behind a the feature flag junit_report_summary. It's part of our effort to make our JUnit faster.

It includes the following items:

  • Adds TestSuiteSummary class
  • Adds TestReportSummary class
  • Adds TestsController
  • Creates new endpoint to return summary data
endpoint JSON response
merge_requests/:id/pipelines/:id/tests/summary.json image

Why are we doing this?

Today our JUnit feature is really slow for big projects containing a lot of tests and requires almost 1min on gitlab.com in order to render the data. We are working toward improving the ~performance of this feature and we decided by starting to persist our counter data which is all the data you can see on the screenshot below 👇

Pipeline___GitLab.org___GitLab___GitLab_2020-05-25_14-51-16

Context

This MR represents a vertical slice of functionality for improving the ~performance of our JUnit feature. This is slice 3/3.

This work will occur in 3 slices:

  1. Create data model - !32991 (merged).
  2. Populate new data once a build is finished - !33093 (merged)
  3. Expose the new API at the pipeline level) - !33431 (merged)

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 Kamil Trzciński

Merge request reports