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

     1  // Copyright 2023 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  option go_package = "go.chromium.org/luci/analysis/proto/v1;analysispb";
    20  
    21  // Information about a test.
    22  //
    23  // Currently a clone of resultdb.v1.TestMetadata. Do not use
    24  // that proto directly to allow for independent evolution of
    25  // protos in LUCI Analysis and ResultDB.
    26  message TestMetadata {
    27    // The original test name.
    28    string name = 1;
    29  
    30    // Where the test is defined, e.g. the file name.
    31    // location.repo MUST be specified.
    32    TestLocation location = 2;
    33  
    34    // The issue tracker component associated with the test, if any.
    35    // Bugs related to the test may be filed here.
    36    BugComponent bug_component = 3;
    37  }
    38  
    39  // Location of the test definition.
    40  message TestLocation {
    41    // Gitiles URL as the identifier for a repo.
    42    // Format for Gitiles URL: https://<host>/<project>
    43    // For example "https://chromium.googlesource.com/chromium/src"
    44    // Must not end with ".git".
    45    // SHOULD be specified.
    46    string repo = 1;
    47  
    48    // Name of the file where the test is defined.
    49    // For files in a repository, must start with "//"
    50    // Example: "//components/payments/core/payment_request_data_util_unittest.cc"
    51    // Max length: 512.
    52    // MUST not use backslashes.
    53    // Required.
    54    string file_name = 2;
    55  
    56    // One-based line number where the test is defined.
    57    int32 line = 3;
    58  }
    59  
    60  // Represents a component in an issue tracker. A component is
    61  // a container for issues.
    62  message BugComponent {
    63    oneof system {
    64      // The Google Issue Tracker component.
    65      IssueTrackerComponent issue_tracker = 1;
    66  
    67      // The monorail component.
    68      MonorailComponent monorail = 2;
    69    }
    70  }
    71  
    72  // A component in Google Issue Tracker, sometimes known as Buganizer,
    73  // available at https://issuetracker.google.com.
    74  message IssueTrackerComponent {
    75    // The Google Issue Tracker component ID.
    76    int64 component_id = 1;
    77  }
    78  
    79  // A component in monorail issue tracker, available at
    80  // https://bugs.chromium.org.
    81  message MonorailComponent {
    82    // The monorail project name.
    83    string project = 1;
    84  
    85    // The monorail component value. E.g. "Blink>Accessibility".
    86    string value = 2;
    87  }