1// Copyright (C) 2018 The Android Open Source Project
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
15syntax = "proto2";
16
17package longevity.profile;
18
19option java_package = "android.platform.test.longevity.proto";
20option java_multiple_files = true;
21
22message Configuration {
23    // Schedule used to run the profile.
24    enum Schedule {
25        TIMESTAMPED = 1;
26        INDEXED = 2;
27    }
28    optional Schedule schedule = 1 [default = TIMESTAMPED];
29
30    // Information for each scenario.
31    message Scenario {
32        oneof schedule {
33            string at = 1; // A timestamp (HH:MM:SS) for when to run the scenario.
34            int32 index = 2; // An index for the relative order of the scenario.
35        }
36        // Reference to the CUJ (<package>.<class>).
37        optional string journey = 3;
38        // Extra arguments to pass to the CUJ.
39        message ExtraArg {
40            optional string key = 1;
41            optional string value = 2;
42        }
43        repeated ExtraArg extras = 4;
44        // For app-based scenarios, whether to stay in the app after the tested action is performed.
45        enum AfterTest {
46            STAY_IN_APP = 1;
47            EXIT = 2;
48        }
49        optional AfterTest after_test = 5 [default = EXIT];
50    }
51    repeated Scenario scenarios = 2;
52}
53