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

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

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