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

     1  // Copyright 2020 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.resultdb.v1;
    18  
    19  import "google/protobuf/struct.proto";
    20  import "google/api/field_behavior.proto";
    21  import "go.chromium.org/luci/resultdb/proto/v1/common.proto";
    22  
    23  option go_package = "go.chromium.org/luci/resultdb/proto/v1;resultpb";
    24  
    25  // Information about a test metadata.
    26  message TestMetadataDetail {
    27    // Can be used to refer to a test metadata, e.g. in ResultDB.QueryTestMetadata
    28    // RPC.
    29    // Format:
    30    // "projects/{PROJECT}/refs/{REF_HASH}/tests/{URL_ESCAPED_TEST_ID}".
    31    // where URL_ESCAPED_TEST_ID is test_id escaped with
    32    // https://golang.org/pkg/net/url/#PathEscape. See also https://aip.dev/122.
    33    //
    34    // Output only.
    35    string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    36  
    37    // The LUCI project.
    38    string project = 2;
    39  
    40    // A unique identifier of a test in a LUCI project.
    41    // Refer to TestResult.test_id for details.
    42    string test_id = 3;
    43  
    44    // Hexadecimal encoded hash string of the source_ref.
    45    // A given source_ref always hashes to the same ref_hash value.
    46    string ref_hash = 12;
    47  
    48    // A reference in the source control system where the test metadata comes from.
    49    SourceRef source_ref = 4;
    50  
    51    // Test metadata content.
    52    TestMetadata testMetadata = 5;
    53  }
    54  
    55  // Information about a test.
    56  message TestMetadata {
    57    // The original test name.
    58    string name = 1;
    59  
    60    // Where the test is defined, e.g. the file name.
    61    // location.repo MUST be specified.
    62    TestLocation location = 2;
    63  
    64    // The issue tracker component associated with the test, if any.
    65    // Bugs related to the test may be filed here.
    66    BugComponent bug_component = 3;
    67  
    68    // Identifies the schema of the JSON object in the properties field.
    69    // Use the fully-qualified name of the source protocol buffer.
    70    // eg. chromiumos.test.api.TestCaseInfo
    71    // ResultDB will *not* validate the properties field with respect to this
    72    // schema. Downstream systems may however use this field to inform how the
    73    // properties field is interpreted.
    74    string properties_schema = 4;
    75  
    76    // Arbitrary JSON object that contains structured, domain-specific properties
    77    // of the test.
    78    //
    79    // The serialized size must be <= 4096 bytes.
    80    //
    81    // If this field is specified, properties_schema must also be specified.
    82    google.protobuf.Struct properties = 5;
    83  }
    84  
    85  // Location of the test definition.
    86  message TestLocation {
    87    // Gitiles URL as the identifier for a repo.
    88    // Format for Gitiles URL: https://<host>/<project>
    89    // For example "https://chromium.googlesource.com/chromium/src"
    90    // Must not end with ".git".
    91    // SHOULD be specified.
    92    string repo = 1;
    93  
    94    // Name of the file where the test is defined.
    95    // For files in a repository, must start with "//"
    96    // Example: "//components/payments/core/payment_request_data_util_unittest.cc"
    97    // Max length: 512.
    98    // MUST not use backslashes.
    99    // Required.
   100    string file_name = 2;
   101  
   102    // One-based line number where the test is defined.
   103    int32 line = 3;
   104  }
   105  
   106  // Represents a component in an issue tracker. A component is
   107  // a container for issues.
   108  message BugComponent {
   109    oneof system {
   110       // The Google Issue Tracker component.
   111       IssueTrackerComponent issue_tracker = 1;
   112  
   113       // The monorail component.
   114       MonorailComponent monorail = 2;
   115    }
   116  }
   117  
   118  // A component in Google Issue Tracker, sometimes known as Buganizer,
   119  // available at https://issuetracker.google.com.
   120  message IssueTrackerComponent {
   121    // The Google Issue Tracker component ID.
   122    int64 component_id = 1;
   123  }
   124  
   125  // A component in monorail issue tracker, available at
   126  // https://bugs.chromium.org.
   127  message MonorailComponent {
   128    // The monorail project name.
   129    string project = 1;
   130    // The monorail component value. E.g. "Blink>Accessibility".
   131    string value = 2;
   132  }