• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# coding=utf-8
3
4#
5# Copyright (c) 2022 Huawei Device Co., Ltd.
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19import os
20
21class DTConstants:
22    FAILED = 'failed'
23    PASSED = 'passed'
24
25
26class RunSection:
27    SETUP = "SETUP"
28    TEST = "TEST"
29    TEARDOWN = "TEARDOWN"
30
31
32class RunStatus:
33    INITING = "Initing"
34    RUNNING = "Running"
35    STOPPED = "Stopped"
36    FINISHED = "Finished"
37
38
39class RunResult:
40    PASSED = "Passed"
41    FAILED = "Failed"
42    BLOCKED = "Blocked"
43    NORUN = "NORUN"
44
45
46class FileAttribute:
47    TESTCASE_PREFIX = "TC_"
48    TESTCASE_POSFIX_PY = ".py"
49    TESTCASE_POSFIX_PYC = ".pyc"
50    TESTCASE_POSFIX_PYD = ".pyd"
51
52
53class DeviceConstants:
54    RECONNECT_TIMES = 3  # 断链,默认重连次数
55    HOST = os.environ.get('AP_HOST', "127.0.0.1")
56    PORT = os.environ.get('AP_PORT', 9999)
57    OH_DEVICETEST_BUNDLE_NAME = "com.ohos.devicetest."
58    RES_VERSION = "002"
59
60
61class DeviceTestMode:
62    MODE = "device_test_mode"
63    HYPIUM_PERF_TEST = "hypium_perf_test"
64