未验证 提交 63e3b725 编写于 作者: O openharmony_ci 提交者: Gitee

!2090 电话子系统xts接口覆盖率提升

Merge pull request !2090 from 高曦/master
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
"description": "Configuration for ActsCallManagerIms2CallTest Tests", "description": "Configuration for ActsCallManagerIms2CallTest Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "1200000", "test-timeout": "1800000",
"package": "com.ohos.actscallmanagerims2calltest", "package": "com.ohos.actscallmanagerims2calltest",
"shell-timeout": "1200000", "shell-timeout": "60000"
"native-test-timeout":"1200000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
core.init() core.init()
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.timeout = 8000; this.timeout = 30000;
configService.setConfig(this) configService.setConfig(this)
require('../../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
"description": "Configuration for callmanager Tests", "description": "Configuration for callmanager Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "18000", "test-timeout": "1800000",
"package": "com.ohos.cellulardata", "package": "com.ohos.cellulardata",
"shell-timeout": "18000", "shell-timeout": "60000"
"native-test-timeout":"18000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
core.init() core.init()
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.timeout = 8000 this.timeout = 30000
configService.setConfig(this) configService.setConfig(this)
require('../../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
"description": "Configuration for NetworkSearch Tests", "description": "Configuration for NetworkSearch Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "1800", "test-timeout": "1800000",
"package": "com.ohos.networksearch", "package": "com.ohos.networksearch",
"shell-timeout": "1800", "shell-timeout": "60000"
"native-test-timeout":"1800"
}, },
"kits": [ "kits": [
{ {
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
core.init() core.init()
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.timeout = 8000 this.timeout = 30000
configService.setConfig(this) configService.setConfig(this)
require('../../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
......
...@@ -106,6 +106,13 @@ describe('ActsNetworkSearchTest', function () { ...@@ -106,6 +106,13 @@ describe('ActsNetworkSearchTest', function () {
radio.getNetworkState(SLOT_2, (err, data) => { radio.getNetworkState(SLOT_2, (err, data) => {
if (err) { if (err) {
console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err: ${err}`); console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err: ${err}`);
expect(data.longOperatorName != 'longOperatorName').assertTrue();
expect(data.shortOperatorName != 'shortOperatorName').assertTrue();
expect(data.plmnNumeric != 'plmnNumeric').assertTrue();
expect(data.isRoaming != true).assertTrue();
expect(data.regState != radio.REG_STATE_IN_SERVICE).assertTrue();
expect(data.nsaState != radio.NSA_STATE_SA_ATTACHED).assertTrue();
expect(data.isCaActive != true).assertTrue();
done(); done();
return; return;
} }
...@@ -147,6 +154,10 @@ describe('ActsNetworkSearchTest', function () { ...@@ -147,6 +154,10 @@ describe('ActsNetworkSearchTest', function () {
return; return;
} }
console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0400 finish data: ${JSON.stringify(data)}`); console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0400 finish data: ${JSON.stringify(data)}`);
if (data.length > 0) {
expect(data[0].signalLevel != -1).assertTrue();
expect(data[0].signalType != radio.NETWORK_TYPE_WCDMA).assertTrue();
}
expect(data.length === 0).assertTrue(); expect(data.length === 0).assertTrue();
done(); done();
}); });
...@@ -262,11 +273,11 @@ describe('ActsNetworkSearchTest', function () { ...@@ -262,11 +273,11 @@ describe('ActsNetworkSearchTest', function () {
}); });
/** /**
* @tc.number Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 * @tc.number Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700
* @tc.name SlotId parameter input is -1, test setNetworkSelectionMode() query function go to the error * @tc.name SlotId parameter input is -1, test setNetworkSelectionMode() query function go to the error
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700', 0, async function (done) { it('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700', 0, async function (done) {
let networkSMode = { let networkSMode = {
slotId: 55, //set the error slot id is 55 slotId: 55, //set the error slot id is 55
selectMode: radio.NETWORK_SELECTION_AUTOMATIC, selectMode: radio.NETWORK_SELECTION_AUTOMATIC,
...@@ -279,7 +290,7 @@ describe('ActsNetworkSearchTest', function () { ...@@ -279,7 +290,7 @@ describe('ActsNetworkSearchTest', function () {
resumeSelection: false, resumeSelection: false,
}; };
console.log( console.log(
`Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 networkSMode:${JSON.stringify(networkSMode)}`) `Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700 networkSMode:${JSON.stringify(networkSMode)}`)
try { try {
await radio.setNetworkSelectionMode(networkSMode); await radio.setNetworkSelectionMode(networkSMode);
console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0200 set fail'); console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0200 set fail');
...@@ -299,6 +310,8 @@ describe('ActsNetworkSearchTest', function () { ...@@ -299,6 +310,8 @@ describe('ActsNetworkSearchTest', function () {
it('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400', 0, async function (done) { it('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400', 0, async function (done) {
radio.getNetworkSearchInformation(SLOT_2, (err, data) => { radio.getNetworkSearchInformation(SLOT_2, (err, data) => {
if (err) { if (err) {
expect(data.isNetworkSearchSuccess != true).assertTrue();
expect(data.networkSearchResult != undefined).assertTrue();
console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400 finish'); console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400 finish');
done(); done();
} else { } else {
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
"description": "Function test of sim manager interface", "description": "Function test of sim manager interface",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "540000", "test-timeout": "1800000",
"package": "com.ohos.simmanagertest", "package": "com.ohos.simmanagertest",
"shell-timeout": "540000", "shell-timeout": "60000"
"native-test-timeout":"540000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
core.init(); core.init();
const configService = core.getDefaultService('config'); const configService = core.getDefaultService('config');
configService.timeout = 8000 this.timeout = 30000
configService.setConfig(this); configService.setConfig(this);
require('../../../test/List.test'); require('../../../test/List.test');
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
"description": "Configuration for sms_mms demo Tests", "description": "Configuration for sms_mms demo Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "240000", "test-timeout": "1800000",
"package": "com.ohos.smsmms", "package": "com.ohos.smsmms",
"shell-timeout": "240000", "shell-timeout": "60000"
"native-test-timeout":"240000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
core.init() core.init()
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.timeout = 60000 this.timeout = 30000
configService.setConfig(this) configService.setConfig(this)
require('../../../test/List.test') require('../../../test/List.test')
......
...@@ -354,6 +354,10 @@ describe('SmsMmsErrorTest', function () { ...@@ -354,6 +354,10 @@ describe('SmsMmsErrorTest', function () {
done(); done();
return; return;
} }
if (result.length > 0) {
except(result[0].shortMessage != null).assertTrue();
except(result[0].indexOnSim != -1).assertTrue();
}
expect(result === undefined || result.length === 0).assertTrue(); expect(result === undefined || result.length === 0).assertTrue();
console.log('Telephony_SmsMms_getAllSIMMessages_Async_0200 finish'); console.log('Telephony_SmsMms_getAllSIMMessages_Async_0200 finish');
done(); done();
...@@ -389,6 +393,16 @@ describe('SmsMmsErrorTest', function () { ...@@ -389,6 +393,16 @@ describe('SmsMmsErrorTest', function () {
sms.createMessage(rawArrayNull, '3gpp', (err, shortMessage) => { sms.createMessage(rawArrayNull, '3gpp', (err, shortMessage) => {
if (err) { if (err) {
console.log('Telephony_SmsMms_createMessage_Async_0200 finish'); console.log('Telephony_SmsMms_createMessage_Async_0200 finish');
except(shortMessage.visibleMessageBody != 'visibleMessageBody').assertTrue();
except(shortMessage.visibleRawAddress != 'visibleRawAddress').assertTrue();
except(shortMessage.messageClass != 'sms.FORWARD_MESSAGE').assertTrue();
except(shortMessage.protocolId != -1).assertTrue();
except(shortMessage.scAddress != 'scAddress').assertTrue();
except(shortMessage.scTimestamp != -1).assertTrue();
except(shortMessage.isReplaceMessage != true).assertTrue();
except(shortMessage.hasReplyPath != true).assertTrue();
except(shortMessage.status != -1).assertTrue();
except(shortMessage.isSmsStatusReportMessage != true).assertTrue();
done(); done();
return; return;
} }
...@@ -408,7 +422,9 @@ describe('SmsMmsErrorTest', function () { ...@@ -408,7 +422,9 @@ describe('SmsMmsErrorTest', function () {
sms.sendMessage({ sms.sendMessage({
slotId: FALSE_SLOT_ID, slotId: FALSE_SLOT_ID,
destinationHost: SMS_SEND_DST_NUMBER, destinationHost: SMS_SEND_DST_NUMBER,
serviceCenter: '',
content: 'hello', content: 'hello',
destinationPort: 0,
sendCallback: (err, value) => { sendCallback: (err, value) => {
if (err) { if (err) {
expect().assertFail(); expect().assertFail();
...@@ -418,6 +434,7 @@ describe('SmsMmsErrorTest', function () { ...@@ -418,6 +434,7 @@ describe('SmsMmsErrorTest', function () {
} }
console.log(`sendCallback success sendResult = ${value.result}`); console.log(`sendCallback success sendResult = ${value.result}`);
expect(value.result === sms.SEND_SMS_FAILURE_UNKNOWN).assertTrue(); expect(value.result === sms.SEND_SMS_FAILURE_UNKNOWN).assertTrue();
expect(value.isLastPart != true).assertTrue();
console.log('Telephony_SmsMms_sendMessage_0200 finish'); console.log('Telephony_SmsMms_sendMessage_0200 finish');
done(); done();
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册