/* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto3"; package luci.resultdb.v1; import "google/protobuf/struct.proto"; import "google/api/field_behavior.proto"; import public "tools/tradefederation/core/proto/resultdb/common.proto"; option go_package = "go.chromium.org/luci/resultdb/proto/v1;resultpb"; option java_package = "com.android.resultdb.proto"; option java_multiple_files = true; // Information about a test metadata. message TestMetadataDetail { // Can be used to refer to a test metadata, e.g. in ResultDB.QueryTestMetadata // RPC. // Format: // "projects/{PROJECT}/refs/{REF_HASH}/tests/{URL_ESCAPED_TEST_ID}". // where URL_ESCAPED_TEST_ID is test_id escaped with // https://golang.org/pkg/net/url/#PathEscape. See also https://aip.dev/122. // // Output only. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The LUCI project. string project = 2; // A unique identifier of a test in a LUCI project. // Refer to TestResult.test_id for details. string test_id = 3; // Hexadecimal encoded hash string of the source_ref. // A given source_ref always hashes to the same ref_hash value. string ref_hash = 12; // A reference in the source control system where the test metadata comes from. SourceRef source_ref = 4; // Test metadata content. TestMetadata testMetadata = 5; } // Information about a test. message TestMetadata { // The original test name. string name = 1; // Where the test is defined, e.g. the file name. // location.repo MUST be specified. TestLocation location = 2; // The issue tracker component associated with the test, if any. // Bugs related to the test may be filed here. BugComponent bug_component = 3; // Identifies the schema of the JSON object in the properties field. // Use the fully-qualified name of the source protocol buffer. // eg. chromiumos.test.api.TestCaseInfo // ResultDB will *not* validate the properties field with respect to this // schema. Downstream systems may however use this field to inform how the // properties field is interpreted. string properties_schema = 4; // Arbitrary JSON object that contains structured, domain-specific properties // of the test. // // The serialized size must be <= 4096 bytes. // // If this field is specified, properties_schema must also be specified. google.protobuf.Struct properties = 5; } // Location of the test definition. message TestLocation { // Gitiles URL as the identifier for a repo. // Format for Gitiles URL: https:/// // For example "https://chromium.googlesource.com/chromium/src" // Must not end with ".git". // SHOULD be specified. string repo = 1; // Name of the file where the test is defined. // For files in a repository, must start with "//" // Example: "//components/payments/core/payment_request_data_util_unittest.cc" // Max length: 512. // MUST not use backslashes. // Required. string file_name = 2; // One-based line number where the test is defined. int32 line = 3; } // Represents a component in an issue tracker. A component is // a container for issues. message BugComponent { oneof system { // The Google Issue Tracker component. IssueTrackerComponent issue_tracker = 1; // The monorail component. MonorailComponent monorail = 2; } } // A component in Google Issue Tracker, sometimes known as Buganizer, // available at https://issuetracker.google.com. message IssueTrackerComponent { // The Google Issue Tracker component ID. int64 component_id = 1; } // A component in monorail issue tracker, available at // https://bugs.chromium.org. message MonorailComponent { // The monorail project name. string project = 1; // The monorail component value. E.g. "Blink>Accessibility". string value = 2; }