Class: GitlabQuality::TestTooling::Report::SlowTestIssue

Inherits:
ReportAsIssue
  • Object
show all
Includes:
Concerns::FindSetDri, Concerns::GroupAndCategoryLabels
Defined in:
lib/gitlab_quality/test_tooling/report/slow_test_issue.rb

Overview

Uses the API to create GitLab issues for slow tests

  • Takes the JSON test reports like rspec-*.json`
  • Takes a project where slow issues should be created
  • Find issue by title (with test description or test file)
  • Add test metadata, duration to the issue with group and category labels

Constant Summary collapse

NEW_ISSUE_LABELS =
Set.new(['test', 'type::maintenance', 'maintenance::performance', 'priority::3', 'severity::3', 'rspec profiling', 'rspec:slow test']).freeze
SEARCH_LABELS =
%w[test maintenance::performance].freeze
JOB_URL_REGEX =
%r{(?<job_url>https://(?<host>[\w.]+)/(?<project_path>[\w\-./]+)/-/jobs/\d+)}
REPORT_ITEM_REGEX =
/^1\. \d{4}-\d{2}-\d{2}: #{JOB_URL_REGEX} \((?<pipeline_url>.+)\)$/
MultipleIssuesFound =
Class.new(StandardError)

Constants included from Concerns::Utils

Concerns::Utils::MAX_TITLE_LENGTH

Method Summary

Methods included from Concerns::GroupAndCategoryLabels

#labels_inference, #new_issue_labels

Methods included from Concerns::FindSetDri

#set_dri_via_group

Methods inherited from ReportAsIssue

#initialize, #invoke!

Methods included from Concerns::Utils

#partial_file_path, #pipeline, #search_safe, #title_from_test

Constructor Details

This class inherits a constructor from GitlabQuality::TestTooling::Report::ReportAsIssue