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 arkts {'1.1':'11', '1.2':'20'} 37 * @arkts 1.1&1.2 38 */ 39interface TestRunner { 40 /** 41 * Prepare the unit testing environment for running test cases. 42 * 43 * @syscap SystemCapability.Ability.AbilityRuntime.Core 44 * @since 8 45 */ 46 /** 47 * Prepare the unit testing environment for running test cases. 48 * 49 * @syscap SystemCapability.Ability.AbilityRuntime.Core 50 * @atomicservice 51 * @since arkts {'1.1':'11', '1.2':'20'} 52 * @arkts 1.1&1.2 53 */ 54 onPrepare(): void; 55 56 /** 57 * Run all test cases. 58 * 59 * @syscap SystemCapability.Ability.AbilityRuntime.Core 60 * @since 8 61 */ 62 /** 63 * Run all test cases. 64 * 65 * @syscap SystemCapability.Ability.AbilityRuntime.Core 66 * @atomicservice 67 * @since arkts {'1.1':'11', '1.2':'20'} 68 * @arkts 1.1&1.2 69 */ 70 onRun(): void; 71} 72 73/*** if arkts 1.1 */ 74export { TestRunner }; 75/*** endif */ 76export default TestRunner; 77