From a3ab6986ed7bb0e9c8e15e13c37ab589c4308a4a Mon Sep 17 00:00:00 2001 From: zengxingdong Date: Tue, 28 Jun 2022 13:04:43 +0000 Subject: [PATCH] modify test case for new test fw Signed-off-by: zengxingdong --- .../entry/src/main/ets/MainAbility/app.ets | 10 ++++++++++ .../src/main/ets/TestRunner/OpenHarmonyTestRunner.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/miscservices/InputMethodTest_ets/entry/src/main/ets/MainAbility/app.ets b/miscservices/InputMethodTest_ets/entry/src/main/ets/MainAbility/app.ets index 5d603333c..f69b748f8 100644 --- a/miscservices/InputMethodTest_ets/entry/src/main/ets/MainAbility/app.ets +++ b/miscservices/InputMethodTest_ets/entry/src/main/ets/MainAbility/app.ets @@ -12,9 +12,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from 'hypium/index' +import testsuite from '../test/List.test' + export default { onCreate() { console.info('Application onCreate') + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + console.info('start run testcase!!!') + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) }, onDestroy() { console.info('Application onDestroy') diff --git a/miscservices/InputMethodTest_ets/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/miscservices/InputMethodTest_ets/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts index 143e3ae5c..57fdc77f0 100644 --- a/miscservices/InputMethodTest_ets/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ b/miscservices/InputMethodTest_ets/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -58,7 +58,7 @@ export default class OpenHarmonyTestRunner implements TestRunner { abilityName: testAbilityName, onAbilityCreate: onAbilityCreateCallback, }; - var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility' + var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.MainAbility' abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) -- GitLab