提交 e4e1f623 编写于 作者: Z zhangfuzhi

add smsmmsbatchinsert

Signed-off-by: Nzhangfuzhi <zhangfuzhi1@huawei.com>
上级 9e6aa9f7
......@@ -8,7 +8,7 @@
},
"apiVersion": {
"compatible": 4,
"target": 5,
"target": 7,
"releaseType": "Release"
}
},
......
......@@ -8,7 +8,7 @@
},
"apiVersion": {
"compatible": 4,
"target": 5,
"target": 7,
"releaseType": "Release"
}
},
......
......@@ -8,7 +8,7 @@
},
"apiVersion": {
"compatible": 4,
"target": 5,
"target": 7,
"releaseType": "Release"
}
},
......
......@@ -14,7 +14,7 @@
*/
export default {
onCreate() {
console.info('TestApplication onCreate')
console.info('TestApplication onCreate');
},
onDestroy() {
......
......@@ -13,9 +13,9 @@
* limitations under the License.
*/
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../../../test/List.test'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
import { Hypium } from '@ohos/hypium';
import testsuite from '../../../test/List.test';
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
......@@ -25,13 +25,13 @@ export default {
title: ''
},
onInit () {
this.title = this.$t('strings.world');
this.title = this.$t('strings.world')
},
onShow () {
console.info('onShow finish!');
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
console.info('start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
onReady () {
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
function translateParamsToString(parameters) {
const keySet = new Set([
......@@ -32,10 +32,10 @@ function translateParamsToString(parameters) {
export default {
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
console.info('OpenHarmonyTestRunner OnPrepare');
},
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
console.log('OpenHarmonyTestRunner onRun run');
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
......@@ -44,12 +44,12 @@ function translateParamsToString(parameters) {
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
var debug = abilityDelegatorArguments.parameters["-D"]
console.info('debug value : '+debug)
console.info('debug value : '+debug);
if (debug == 'true')
{
cmd += ' -D'
}
console.info('cmd : '+cmd)
console.info('cmd : '+cmd);
abilityDelegator.executeShellCommand(cmd, (err, data) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + data.stdResult);
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import SmsMmsBatchInsert from './SmsMmsBatchInsert.test'
import SmsMmsBatchInsert from './SmsMmsBatchInsert.test';
export default function testsuite() {
SmsMmsBatchInsert();
......
......@@ -96,8 +96,9 @@ export default function SmsMmsBatchInsert() {
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if (now.getTime() > exitTime)
return;
if (now.getTime() > exitTime){
return;
}
}
}
......@@ -138,8 +139,8 @@ export default function SmsMmsBatchInsert() {
}
ExpectTrue(data.code === 0);
console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data));
})
await sleep(100);
});
sleep(100);
try {
let data = await DAHelper.query(URL_INFO);
ExpectTrue(data.rowCount === num);
......@@ -175,7 +176,7 @@ export default function SmsMmsBatchInsert() {
ExpectFalse();
console.log(CASE_NAME + ' batchInsert failed, data:' + JSON.stringify(data));
done();
})
});
});
/*
......@@ -195,8 +196,8 @@ export default function SmsMmsBatchInsert() {
}
ExpectTrue(data.code === 0);
console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data));
})
await sleep(100);
});
sleep(100);
try {
let data = await DAHelper.query(URL_INFO);
ExpectTrue(data.rowCount === 0);
......@@ -229,8 +230,8 @@ export default function SmsMmsBatchInsert() {
}
ExpectTrue(data.code === 0);
console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data));
})
await sleep(2000);
});
sleep(2000);
try {
let data = await DAHelper.query(URL_INFO);
ExpectTrue(data.rowCount === num);
......@@ -266,7 +267,7 @@ export default function SmsMmsBatchInsert() {
ExpectFalse();
console.log(CASE_NAME + ' batchInsert failed, data:' + JSON.stringify(data));
done();
})
});
});
/*
......@@ -347,7 +348,7 @@ export default function SmsMmsBatchInsert() {
done();
return;
}
await sleep(100);
sleep(100);
try {
let data = await DAHelper.query(URL_INFO);
ExpectTrue(data.rowCount === 0);
......@@ -383,7 +384,7 @@ export default function SmsMmsBatchInsert() {
done();
return;
}
await sleep(100);
sleep(100);
try {
let data = await DAHelper.query(URL_INFO);
ExpectTrue(data.rowCount === num);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册