go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/proto/v1/test_verdict.proto (about)

     1  // Copyright 2022 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package luci.analysis.v1;
    18  
    19  import "google/protobuf/duration.proto";
    20  import "google/protobuf/timestamp.proto";
    21  import "go.chromium.org/luci/analysis/proto/v1/sources.proto";
    22  
    23  option go_package = "go.chromium.org/luci/analysis/proto/v1;analysispb";
    24  
    25  
    26  // Status of a test result.
    27  // It is a mirror of luci.resultdb.v1.TestStatus, but the right to evolve
    28  // it independently is reserved.
    29  enum TestResultStatus {
    30    // Status was not specified.
    31    // Not to be used in actual test results; serves as a default value for an
    32    // unset field.
    33    TEST_RESULT_STATUS_UNSPECIFIED = 0;
    34  
    35    // The test case has passed.
    36    PASS = 1;
    37  
    38    // The test case has failed.
    39    // Suggests that the code under test is incorrect, but it is also possible
    40    // that the test is incorrect or it is a flake.
    41    FAIL = 2;
    42  
    43    // The test case has crashed during execution.
    44    // The outcome is inconclusive: the code under test might or might not be
    45    // correct, but the test+code is incorrect.
    46    CRASH = 3;
    47  
    48    // The test case has started, but was aborted before finishing.
    49    // A common reason: timeout.
    50    ABORT = 4;
    51  
    52    // The test case did not execute.
    53    // Examples:
    54    // - The execution of the collection of test cases, such as a test
    55    //   binary, was aborted prematurely and execution of some test cases was
    56    //   skipped.
    57    // - The test harness configuration specified that the test case MUST be
    58    //   skipped.
    59    SKIP = 5;
    60  }
    61  
    62  // Status of a test verdict.
    63  // It is a mirror of luci.resultdb.v1.TestVariantStatus.
    64  enum TestVerdictStatus {
    65    // a test verdict must not have this status.
    66    // This is only used when filtering verdicts.
    67    TEST_VERDICT_STATUS_UNSPECIFIED = 0;
    68    // The test verdict has no exonerations, and all results are unexpected.
    69    UNEXPECTED = 10;
    70    // The test verdict has no exonerations, and all results are unexpectedly skipped.
    71    UNEXPECTEDLY_SKIPPED = 20;
    72    // The test verdict has no exonerations, and has both expected and unexpected
    73    // results.
    74    FLAKY = 30;
    75    // The test verdict has one or more test exonerations.
    76    EXONERATED = 40;
    77    // The test verdict has no exonerations, and all results are expected.
    78    EXPECTED = 50;
    79  }
    80  
    81  // Machine-readable reason that a test execution was skipped.
    82  // It is a mirror of luci.resultdb.v1.SkipReason, but the right to evolve
    83  // it independently is reserved.
    84  enum SkipReason {
    85    // Skip reason was not specified.
    86    // This represents an unset field which should be used for non-skip test
    87    // result statuses.  It can also be used if none of the other statuses
    88    // apply.
    89    SKIP_REASON_UNSPECIFIED = 0;
    90  
    91    // Disabled automatically in response to a test skipping policy that skips
    92    // flaky tests.
    93    // Used for ChromeOS CQ test filtering.
    94    AUTOMATICALLY_DISABLED_FOR_FLAKINESS = 1;
    95  }
    96  
    97  message TestVerdict {
    98    // Unique identifier of the test.
    99    // This has the same value as luci.resultdb.v1.TestResult.test_id.
   100    string test_id = 1;
   101  
   102    // The hash of the variant.
   103    string variant_hash = 2;
   104  
   105    // The ID of the top-level invocation that the test verdict belongs to when
   106    // ingested.
   107    string invocation_id = 3;
   108  
   109    // The status of the test verdict.
   110    TestVerdictStatus status = 4;
   111  
   112    // Start time of the presubmit run (for results that are part of a presubmit
   113    // run) or start time of the buildbucket build (otherwise).
   114    google.protobuf.Timestamp partition_time = 5;
   115  
   116    // The average duration of the PASSED test results included in the test
   117    // verdict.
   118    google.protobuf.Duration passed_avg_duration = 6;
   119  
   120    // The changelist(s) that were tested, if any. If there are more 10, only
   121    // the first 10 are returned here.
   122    repeated Changelist changelists = 7;
   123  }