Class: GitlabQuality::TestTooling::Report::SlowTestIssue
- Inherits:
-
HealthProblemReporter
- Object
- ReportAsIssue
- HealthProblemReporter
- GitlabQuality::TestTooling::Report::SlowTestIssue
- 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
- IDENTITY_LABELS =
['test', 'rspec:slow test', 'test-health:slow', 'rspec profiling', 'automation:bot-authored'].freeze
- NEW_ISSUE_LABELS =
Set.new( ['test', 'type::maintenance', 'maintenance::performance', 'priority::3', 'severity::3', 'suppress-contributor-links', *IDENTITY_LABELS]).freeze
- REPORT_SECTION_HEADER =
'### Slowness reports'- REPORTS_DOCUMENTATION =
<<~DOC Slow tests were detected, please see the [test speed best practices guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#test-speed) to improve them. More context available about this issue in the [top slow tests guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#top-slow-tests). Add `allowed_to_be_slow: true` to the RSpec test if this is a legit slow test and close the issue. DOC
Constants inherited from HealthProblemReporter
HealthProblemReporter::BASE_SEARCH_LABELS, HealthProblemReporter::FOUND_IN_MASTER_LABEL, HealthProblemReporter::FOUND_IN_MR_LABEL
Constants included from Concerns::IssueReports
Concerns::IssueReports::DAILY_REPORTS_THRESHOLDS, Concerns::IssueReports::DISPLAYED_HISTORY_REPORTS_THRESHOLD, Concerns::IssueReports::FAILED_JOB_DESCRIPTION_REGEX, Concerns::IssueReports::JOB_URL_REGEX, Concerns::IssueReports::LATEST_REPORTS_TO_SHOW, Concerns::IssueReports::REPORT_ITEM_REGEX
Constants included from Concerns::Utils
Concerns::Utils::MAX_TITLE_LENGTH
Method Summary
Methods inherited from HealthProblemReporter
#initialize, #most_recent_report_date_for_issue
Methods included from Concerns::IssueReports
#failed_issue_job_url, #failed_issue_job_urls, #increment_reports, #increment_total_reports_count, #initial_reports_section
Methods included from Concerns::GroupAndCategoryLabels
#group_and_category_labels_for_test
Methods inherited from ReportAsIssue
Methods included from Concerns::Utils
#label_names_to_label_quick_action, #new_issue_title, #partial_file_path, #pipeline, #readable_duration, #search_safe, #title_from_test
Constructor Details
This class inherits a constructor from GitlabQuality::TestTooling::Report::HealthProblemReporter