• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
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
16/**
17 * @file
18 * @kit TestKit
19 */
20
21/**
22 * Base class for the test framework.
23 * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
24 *
25 * @interface TestRunner
26 * @syscap SystemCapability.Ability.AbilityRuntime.Core
27 * @since 8
28 */
29/**
30 * Base class for the test framework.
31 * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
32 *
33 * @interface TestRunner
34 * @syscap SystemCapability.Ability.AbilityRuntime.Core
35 * @atomicservice
36 * @since 11
37 */
38export interface TestRunner {
39  /**
40   * Prepare the unit testing environment for running test cases.
41   *
42   * @syscap SystemCapability.Ability.AbilityRuntime.Core
43   * @since 8
44   */
45  /**
46   * Prepare the unit testing environment for running test cases.
47   *
48   * @syscap SystemCapability.Ability.AbilityRuntime.Core
49   * @atomicservice
50   * @since 11
51   */
52  onPrepare(): void;
53
54  /**
55   * Run all test cases.
56   *
57   * @syscap SystemCapability.Ability.AbilityRuntime.Core
58   * @since 8
59   */
60  /**
61   * Run all test cases.
62   *
63   * @syscap SystemCapability.Ability.AbilityRuntime.Core
64   * @atomicservice
65   * @since 11
66   */
67  onRun(): void;
68}
69
70export default TestRunner;
71