Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[blinkpy] Report failure reasons for blink web tests.
Report failure reasons for two categories of failures: - Testharness.js failures. Here the new failure(s) (if any) will be reported as the reason. - Other text diff-based failures. A snippet of diff will be supplied as the reason. Failure reasons will be used in Weetbix to perform failure clustering and to assist users link bugs to known failures using failure association rules. They will also be surfaced in MILO. BUG=1243174 TEST=third_party/blink/tools/run_blinkpy_tests.py Change-Id: Id4a1f61527cfea52c9a78e0179ac3070e40beb85 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3539721 Reviewed-by: Rakib Hasan <rmhasan@google.com> Commit-Queue: Patrick Meiring <meiring@google.com> Cr-Commit-Position: refs/heads/main@{#984756}
- Loading branch information
1 parent
dd5ef8a
commit 989707b
Showing
8 changed files
with
264 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
third_party/blink/tools/blinkpy/web_tests/models/failure_reason.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
|
||
# Information about why a test failed. | ||
# Modelled after https://source.chromium.org/chromium/infra/infra/+/master:go/src/go.chromium.org/luci/resultdb/proto/v1/failure_reason.proto | ||
class FailureReason(object): | ||
def __init__(self, primary_error_message): | ||
"""Initialises a new failure reason. | ||
Args: | ||
primary_error_message: The error message that ultimately caused | ||
the test to fail. This should/ only be the error message | ||
and should not include any stack traces. In the case that | ||
a test failed due to multiple expectation failures, any | ||
immediately fatal failure should be chosen, or otherwise | ||
the first expectation failure. | ||
""" | ||
self.primary_error_message = primary_error_message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters