Skip to content

Parse junit.xml.gz and calculate the difference between head and base

Shinya Maeda requested to merge artifact-format-v2-with-parser into master

What does this MR do?

This MR does the following things

  • It gives an ability to stream (single/concatenated) Gunzip file.
  • It gives an ability to parse JUnit format XML.
  • It gives an ability to struct TestReports under each pipeline.
  • It gives an ability to compare two TestReports and calculate three type of results - new failures, resolved failures, and existing failures.

Backend TODO:

  • Check multiple SELECT COUNT(*) FROM "ci_job_artifacts" WHERE "ci_job_artifacts"."job_id" = $1 AND "ci_job_artifacts"."file_type" = 4 .. during collecting test reports
  • Performance check with 1000 report. 1. memory usage, 2. timings, 3. executed queries
  • Remove test codes from fixtures
  • status: 'success/failed', every level, everywhere
  • Add expose :status which is gonna be (success,failed)
  • Asynchronous parsing
    • Use ReactiveCache worker (ttl: 1h)
  • execution_time to be in floats
  • Merge the base BE MR
    • After merged the MR, switch the target branch in !20576 (merged) to master
  • Write Unit specs
  • Write integration specs
  • [-] Write feature specs => This will be on top of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20972

The list of merge requests for the end-goal (Each MR is based on the previous MR)

  1. Extend gitlab-ci.yml to request junit.xml test reports
  2. Parse junit.xml.gz and calculate the difference between head and base
  3. Frontend code for "JUnit XML Test Summary In MR widget"

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Related https://gitlab.com/gitlab-org/gitlab-ce/issues/45318

Edited by Kamil Trzciński

Merge request reports