Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b4488d23
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b4488d23
编写于
7月 15, 2023
作者:
H
hu0475
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成startup子系统deviceinfo模块的跨平台测试套
Signed-off-by:
N
hu0475
<
huyanqiang5@huawei.com
>
上级
04cbce8d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
756 addition
and
771 deletion
+756
-771
startup/crossplatform/deviceInfoetstest/src/main/ets/test/DeviceInfo.test.ets
...m/deviceInfoetstest/src/main/ets/test/DeviceInfo.test.ets
+756
-771
未找到文件。
startup/crossplatform/deviceInfoetstest/src/main/ets/test/DeviceInfo.test.ets
浏览文件 @
b4488d23
...
@@ -13,776 +13,761 @@
...
@@ -13,776 +13,761 @@
* limitations under the License.
* limitations under the License.
*/
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
'@ohos/hypium'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
"@ohos/hypium";
import deviceinfo from
'@ohos.deviceInfo'
import deviceinfo from
"@ohos.deviceInfo";
export default function DeviceInfoTest() {
export default function DeviceInfoTest() {
describe('DeviceInfoTest', function () {
describe("DeviceInfoTest", function () {
const MAX_CHARACTERS_NUM_ONE = 33;
const MAX_CHARACTERS_NUM_ONE = 33;
const MAX_CHARACTERS_NUM_TWO = 65;
const MAX_CHARACTERS_NUM_TWO = 65;
const MAX_CHARACTERS_NUM = 0;
const MAX_CHARACTERS_NUM = 0;
beforeAll(function () {
beforeAll(function () {
console.info("beforeAll: Prerequisites at the test suite level, which are executed before the test suite is executed.");
console.info('beforeAll: Prerequisites at the test suite level, which are executed before the test suite is executed.');
});
})
beforeEach(function () {
console.info("beforeEach: Prerequisites at the test case level, which are executed before each test case is executed.");
beforeEach(function () {
});
console.info('beforeEach: Prerequisites at the test case level, which are executed before each test case is executed.');
afterEach(function () {
console.info("afterEach: Test case-level clearance conditions, which are executed after each test case is executed.");
})
});
afterEach(function () {
afterAll(function () {
console.info('afterEach: Test case-level clearance conditions, which are executed after each test case is executed.');
console.info("afterAll: Test suite-level cleanup condition, which is executed after the test suite is executed");
});
})
afterAll(function () {
console.info("start################################start");
console.info('afterAll: Test suite-level cleanup condition, which is executed after the test suite is executed');
/**
})
* @tc.number DEVICE_INFO_TEST_001
* @tc.name deviceInfoTest001
console.info('start################################start');
* @tc.desc Get a string representing the device type.
* @tc.size : MediumTest
/**
* @tc.type : Constant
* @tc.number DEVICE_INFO_TEST_001
* @tc.level : Level 0
* @tc.name deviceInfoTest001
*/
* @tc.desc Get a string representing the device type.
it("deviceInfoTest001", 0, function () {
* @tc.size : MediumTest
console.info("device_info_test_001 start");
* @tc.type : Constant
let ret = false;
* @tc.level : Level 0
let deviceTypeInfo = deviceinfo.deviceType;
*/
console.info("the value of the deviceType is :" + deviceTypeInfo);
it('deviceInfoTest001', 0, function () {
console.info('device_info_test_001 start');
expect(deviceTypeInfo).assertInstanceOf("String");
let ret = false;
if (deviceTypeInfo != "" && deviceTypeInfo != null && deviceTypeInfo != undefined) {
let deviceTypeInfo = deviceinfo.deviceType;
ret = true;
console.info('the value of the deviceType is :' + deviceTypeInfo);
}
expect(ret).assertTrue();
expect(deviceTypeInfo).assertInstanceOf('String');
console.info("device_info_test_001 : end");
if (deviceTypeInfo != "" && deviceTypeInfo != null && deviceTypeInfo != undefined) {
});
ret = true;
}
/**
expect(ret).assertTrue()
* @tc.number DEVICE_INFO_TEST_002
console.info('device_info_test_001 : end');
* @tc.name deviceInfoTest002
})
* @tc.desc Get the manufacture name represented by a string.
* @tc.size : MediumTest
/**
* @tc.type : Constant
* @tc.number DEVICE_INFO_TEST_002
* @tc.level : Level 0
* @tc.name deviceInfoTest002
*/
* @tc.desc Get the manufacture name represented by a string.
it("deviceInfoTest002", 0, function () {
* @tc.size : MediumTest
console.info("device_info_test_002 start");
* @tc.type : Constant
* @tc.level : Level 0
let manufactureInfo = deviceinfo.manufacture;
*/
console.info("the value of the manufactureInfo is :" + manufactureInfo);
it('deviceInfoTest002', 0, function () {
expect(manufactureInfo).assertInstanceOf("String");
console.info('device_info_test_002 start');
if (manufactureInfo != "" && manufactureInfo != null && manufactureInfo != undefined) {
let str = /[\w-\.\(\)]/g;
let manufactureInfo = deviceinfo.manufacture;
let arr = manufactureInfo.match(str);
console.info('the value of the manufactureInfo is :' + manufactureInfo);
let bufferstr = arr.join("");
expect(manufactureInfo).assertInstanceOf('String');
console.info("the value of the bufferstr is :" + bufferstr);
if (manufactureInfo != "" && manufactureInfo != null && manufactureInfo != undefined) {
expect(manufactureInfo).assertEqual(bufferstr);
let str = /[\w-\.\(\)]/g;
} else {
let arr = manufactureInfo.match(str);
console.info("the return value is null or incorrect.");
let bufferstr = arr.join('');
expect(false).assertFalse();
console.info('the value of the bufferstr is :' + bufferstr);
}
expect(manufactureInfo).assertEqual(bufferstr);
} else {
console.info("device_info_test_002 :end");
console.info('the return value is null or incorrect.');
});
expect(false).assertFalse();
}
/**
* @tc.number DEVICE_INFO_TEST_003
console.info('device_info_test_002 :end');
* @tc.name deviceInfoTest003
})
* @tc.desc Get the device brand represented by a string and the return value is not null.
* @tc.size : MediumTest
/**
* @tc.type : Constant
* @tc.number DEVICE_INFO_TEST_003
* @tc.level : Level 0
* @tc.name deviceInfoTest003
*/
* @tc.desc Get the device brand represented by a string and the return value is not null.
it("deviceInfoTest003", 0, function () {
* @tc.size : MediumTest
console.info("testGetDeviceBrand01 start");
* @tc.type : Constant
* @tc.level : Level 0
let brandInfo = deviceinfo.brand;
*/
console.info("the value of the device brand is :" + brandInfo);
it('deviceInfoTest003', 0, function () {
console.info('testGetDeviceBrand01 start');
expect(brandInfo).assertInstanceOf("String");
if (brandInfo != "" && brandInfo != null && brandInfo != undefined) {
let brandInfo = deviceinfo.brand;
let str = /[\w-\.\(\)]/g;
console.info('the value of the device brand is :' + brandInfo);
let arr = brandInfo.match(str);
let bufferstr = arr.join("");
expect(brandInfo).assertInstanceOf('String');
console.info("the value of the bufferstr is :" + bufferstr);
if (brandInfo != "" && brandInfo != null && brandInfo != undefined) {
expect(brandInfo).assertEqual(bufferstr);
let str = /[\w-\.\(\)]/g;
} else {
let arr = brandInfo.match(str);
console.info("the return value is null or incorrect.");
let bufferstr = arr.join('');
expect(false).assertFalse();
console.info('the value of the bufferstr is :' + bufferstr);
}
expect(brandInfo).assertEqual(bufferstr);
} else {
console.info("testGetDeviceBrand01 :end");
console.info('the return value is null or incorrect.');
});
expect(false).assertFalse();
}
/**
* @tc.number DEVICE_INFO_TEST_004
console.info('testGetDeviceBrand01 :end');
* @tc.name deviceInfoTest004
})
* @tc.desc Get the external product family name represented by a string and the return value is not null.
* @tc.size : MediumTest
/**
* @tc.type : Constant
* @tc.number DEVICE_INFO_TEST_004
* @tc.level : Level 0
* @tc.name deviceInfoTest004
*/
* @tc.desc Get the external product family name represented by a string and the return value is not null.
it("deviceInfoTest004", 0, function () {
* @tc.size : MediumTest
console.info("testGetMarketName01 start");
* @tc.type : Constant
let ret = false;
* @tc.level : Level 0
let marketNameInfo = deviceinfo.marketName;
*/
console.info("the value of the deviceinfo marketName is :" + marketNameInfo);
it('deviceInfoTest004', 0, function () {
console.info('testGetMarketName01 start')
expect(marketNameInfo).assertInstanceOf("String");
let ret = false;
if (marketNameInfo != "" && marketNameInfo != null && marketNameInfo != undefined) {
let marketNameInfo = deviceinfo.marketName;
ret = true;
console.info('the value of the deviceinfo marketName is :' + marketNameInfo);
}
expect(ret).assertTrue();
expect(marketNameInfo).assertInstanceOf('String');
console.info("testGetMarketName01 :end");
if (marketNameInfo != "" && marketNameInfo != null && marketNameInfo != undefined) {
});
ret = true;
}
/**
expect(ret).assertTrue();
* @tc.number DEVICE_INFO_TEST_005
console.info('testGetMarketName01 :end');
* @tc.name deviceInfoTest005
})
* @tc.desc Get the product series represented by a string and the return value is not null.
* @tc.size : MediumTest
* @tc.type : Constant
/**
* @tc.level : Level 0
* @tc.number DEVICE_INFO_TEST_005
*/
* @tc.name deviceInfoTest005
it("deviceInfoTest005", 0, function () {
* @tc.desc Get the product series represented by a string and the return value is not null.
console.info("testGetProductSeries01 start");
* @tc.size : MediumTest
* @tc.type : Constant
let productSeriesInfo = deviceinfo.productSeries;
* @tc.level : Level 0
console.info("the value of the deviceinfo productSeries is :" + productSeriesInfo);
*/
it('deviceInfoTest005', 0, function () {
expect(productSeriesInfo).assertInstanceOf("String");
console.info('testGetProductSeries01 start');
if (productSeriesInfo != "" && productSeriesInfo != null && productSeriesInfo != undefined) {
let str = /[\w-\.\(\)\s:;~/]/g;
let productSeriesInfo = deviceinfo.productSeries;
let arr = productSeriesInfo.match(str);
console.info('the value of the deviceinfo productSeries is :' + productSeriesInfo);
let bufferstr = arr.join("");
console.info("the value of the bufferstr is :" + bufferstr);
expect(productSeriesInfo).assertInstanceOf('String');
expect(productSeriesInfo).assertEqual(bufferstr);
if (productSeriesInfo != "" && productSeriesInfo != null && productSeriesInfo != undefined) {
} else {
let str = /[\w-\.\(\)\s]/g;
console.info("the return value is null or incorrect.");
let arr = productSeriesInfo.match(str);
expect(false).assertFalse();
let bufferstr = arr.join('');
}
console.info('the value of the bufferstr is :' + bufferstr);
expect(productSeriesInfo).assertEqual(bufferstr);
console.info("testGetProductSeries01 :end");
} else {
});
console.info('the return value is null or incorrect.');
expect(false).assertFalse();
/**
}
* @tc.number DEVICE_INFO_TEST_006
* @tc.name deviceInfoTest006
console.info('testGetProductSeries01 :end');
* @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
})
* @tc.size : MediumTest
* @tc.type : Constant
/**
* @tc.level : Level 0
* @tc.number DEVICE_INFO_TEST_006
*/
* @tc.name deviceInfoTest006
it("deviceInfoTest006", 0, function () {
* @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
console.info("testGetProductModel01 start");
* @tc.size : MediumTest
let ret = false;
* @tc.type : Constant
let productModelInfo = deviceinfo.productModel;
* @tc.level : Level 0
console.info("the value of the deviceinfo productModel is :" + productModelInfo);
*/
it('deviceInfoTest006', 0, function () {
expect(productModelInfo).assertInstanceOf("String");
console.info('testGetProductModel01 start');
if (productModelInfo != "" && productModelInfo != null && productModelInfo != undefined) {
let ret = false;
ret = true;
let productModelInfo = deviceinfo.productModel;
}
console.info('the value of the deviceinfo productModel is :' + productModelInfo);
expect(ret).assertTrue();
console.info("testGetProductModel01 : end");
expect(productModelInfo).assertInstanceOf('String');
});
if (productModelInfo != "" && productModelInfo != null && productModelInfo != undefined) {
ret = true;
/**
}
* @tc.number DEVICE_INFO_TEST_007
expect(ret).assertTrue();
* @tc.name deviceInfoTest007
console.info('testGetProductModel01 : end');
* @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
})
* @tc.size : MediumTest
* @tc.type : const
* @tc.level : Level 0
/**
*/
* @tc.number DEVICE_INFO_TEST_007
it("deviceInfoTest007", 0, function () {
* @tc.name deviceInfoTest007
console.info("testGetSoftwareModel01 start");
* @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
* @tc.size : MediumTest
let softwareModelInfo = deviceinfo.softwareModel;
* @tc.type : const
console.info("the value of the deviceinfo softwareModel is :" + softwareModelInfo);
* @tc.level : Level 0
*/
expect(softwareModelInfo).assertInstanceOf("String");
it('deviceInfoTest007', 0, function () {
if (softwareModelInfo != "" && softwareModelInfo != null && softwareModelInfo != undefined) {
console.info('testGetSoftwareModel01 start');
let str = /[\w-\.\(\)\s]/g;
let arr = softwareModelInfo.match(str);
let softwareModelInfo = deviceinfo.softwareModel;
let bufferstr = arr.join("");
console.info('the value of the deviceinfo softwareModel is :' + softwareModelInfo);
console.info("the value of the bufferstr is :" + bufferstr);
expect(softwareModelInfo).assertEqual(bufferstr);
expect(softwareModelInfo).assertInstanceOf('String');
} else {
if (softwareModelInfo != "" && softwareModelInfo != null && softwareModelInfo != undefined) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)\s]/g;
expect(false).assertFalse();
let arr = softwareModelInfo.match(str);
}
let bufferstr = arr.join('');
console.info('the value of the bufferstr is :' + bufferstr);
console.info("testGetSoftwareModel01 :end");
expect(softwareModelInfo).assertEqual(bufferstr);
});
} else {
console.info('the return value is null or incorrect.');
/**
expect(false).assertFalse();
* @tc.number DEVICE_INFO_TEST_008
}
* @tc.name deviceInfoTest008
* @tc.desc Get the hardware version represented by a string and the return value is not null.
console.info('testGetSoftwareModel01 :end');
* @tc.size : MediumTest
})
* @tc.type : Constant
* @tc.level : Level 0
/**
*/
* @tc.number DEVICE_INFO_TEST_008
it("deviceInfoTest008", 0, function () {
* @tc.name deviceInfoTest008
console.info("testGetHardWareModel01 start");
* @tc.desc Get the hardware version represented by a string and the return value is not null.
* @tc.size : MediumTest
let hardwareModelInfo = deviceinfo.hardwareModel;
* @tc.type : Constant
console.info("the value of the deviceinfo hardwareModel is :" + hardwareModelInfo);
* @tc.level : Level 0
*/
expect(hardwareModelInfo).assertInstanceOf("String");
it('deviceInfoTest008', 0, function () {
if (hardwareModelInfo != "" && hardwareModelInfo != null && hardwareModelInfo != undefined) {
console.info('testGetHardWareModel01 start');
let str = /[\w-\.\(\)]/g;
let arr = hardwareModelInfo.match(str);
let hardwareModelInfo = deviceinfo.hardwareModel;
let bufferstr = arr.join("");
console.info('the value of the deviceinfo hardwareModel is :' + hardwareModelInfo);
console.info("the value of the bufferstr is :" + bufferstr);
expect(hardwareModelInfo).assertEqual(bufferstr);
expect(hardwareModelInfo).assertInstanceOf('String');
} else {
if (hardwareModelInfo != "" && hardwareModelInfo != null && hardwareModelInfo != undefined) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)]/g;
expect(false).assertFalse();
let arr = hardwareModelInfo.match(str);
}
let bufferstr = arr.join('');
console.info('the value of the bufferstr is :' + bufferstr);
console.info("testGetHardWareModel01 :end");
expect(hardwareModelInfo).assertEqual(bufferstr);
});
} else {
console.info('the return value is null or incorrect.');
/**
expect(false).assertFalse();
* @tc.number DEVICE_INFO_TEST_009
}
* @tc.name deviceInfoTest009
* @tc.desc Get the bootloader version number represented by a string and the return value is not null.
console.info('testGetHardWareModel01 :end');
* @tc.size : MediumTest
})
* @tc.type : Constant
* @tc.level : Level 0
/**
*/
* @tc.number DEVICE_INFO_TEST_009
it("deviceInfoTest009", 0, function () {
* @tc.name deviceInfoTest009
console.info("testGetBootLoaderVersion01 start");
* @tc.desc Get the bootloader version number represented by a string and the return value is not null.
* @tc.size : MediumTest
let bootloaderVersionInfo = deviceinfo.bootloaderVersion;
* @tc.type : Constant
console.info("the value of the deviceinfo bootloaderVersion is :" + bootloaderVersionInfo);
* @tc.level : Level 0
*/
expect(bootloaderVersionInfo).assertInstanceOf("String");
it('deviceInfoTest009', 0, function () {
if (bootloaderVersionInfo != "" && bootloaderVersionInfo != null && bootloaderVersionInfo != undefined) {
console.info('testGetBootLoaderVersion01 start');
let str = /[\w-\.\(\)]/g;
let arr = bootloaderVersionInfo.match(str);
let bootloaderVersionInfo = deviceinfo.bootloaderVersion;
let bufferstr = arr.join("");
console.info('the value of the deviceinfo bootloaderVersion is :' + bootloaderVersionInfo);
console.info("the value of the bufferstr is :" + bufferstr);
expect(bootloaderVersionInfo).assertEqual(bufferstr);
expect(bootloaderVersionInfo).assertInstanceOf('String');
} else {
if (bootloaderVersionInfo != "" && bootloaderVersionInfo != null && bootloaderVersionInfo != undefined) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)]/g;
expect(false).assertFalse();
let arr = bootloaderVersionInfo.match(str);
}
let bufferstr = arr.join('');
console.info('the value of the bufferstr is :' + bufferstr);
console.info("testGetBootLoaderVersion01 :end");
expect(bootloaderVersionInfo).assertEqual(bufferstr);
});
} else {
console.info('the return value is null or incorrect.');
/**
expect(false).assertFalse();
* @tc.number DEVICE_INFO_TEST_010
}
* @tc.name deviceInfoTest010
* @tc.desc Get the instruction set supported by the system and the return value is not null.
console.info('testGetBootLoaderVersion01 :end')
* @tc.size : MediumTest
})
* @tc.type : Constant
* @tc.level : Level 0
/**
*/
* @tc.number DEVICE_INFO_TEST_010
it("deviceInfoTest010", 0, function () {
* @tc.name deviceInfoTest010
console.info("testGetabiList01 start");
* @tc.desc Get the instruction set supported by the system and the return value is not null.
* @tc.size : MediumTest
let abiListInfo = deviceinfo.abiList;
* @tc.type : Constant
console.info("the value of the deviceinfo abiList is :" + abiListInfo);
* @tc.level : Level 0
*/
expect(abiListInfo).assertInstanceOf("String");
it('deviceInfoTest010', 0, function () {
if (abiListInfo != "" && abiListInfo != null && abiListInfo != undefined) {
console.info('testGetabiList01 start');
let str = /[\w-\.\(\)\,]/g;
let arr = abiListInfo.match(str);
let abiListInfo = deviceinfo.abiList;
let bufferstr = arr.join("");
console.info('the value of the deviceinfo abiList is :' + abiListInfo);
console.info("the value of the bufferstr is :" + bufferstr);
expect(abiListInfo).assertEqual(bufferstr);
expect(abiListInfo).assertInstanceOf('String');
} else {
if (abiListInfo != "" && abiListInfo != null && abiListInfo != undefined) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)\,]/g;
expect(false).assertFalse();
let arr = abiListInfo.match(str);
}
let bufferstr = arr.join('');
console.info('the value of the bufferstr is :' + bufferstr);
console.info("testGetabiList01 :end");
expect(abiListInfo).assertEqual(bufferstr);
});
} else {
console.info('the return value is null or incorrect.');
/**
expect(false).assertFalse();
* @tc.number DEVICE_INFO_TEST_011
}
* @tc.name deviceInfoTest011
* @tc.desc Get the security patch level represented by a string and the return value is not null.
console.info('testGetabiList01 :end');
* @tc.size : MediumTest
})
* @tc.type : Constant
* @tc.level : Level 0
*/
/**
it("deviceInfoTest011", 0, function () {
* @tc.number DEVICE_INFO_TEST_011
console.info("testGetSecurityPatchTag01 start");
* @tc.name deviceInfoTest011
* @tc.desc Get the security patch level represented by a string and the return value is not null.
let securityPatchTagInfo = deviceinfo.securityPatchTag;
* @tc.size : MediumTest
console.info("the value of the deviceinfo securityPatchTag is :" + securityPatchTagInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(securityPatchTagInfo).assertInstanceOf("String");
*/
if (securityPatchTagInfo != "" && securityPatchTagInfo != null && securityPatchTagInfo != undefined) {
it('deviceInfoTest011', 0, function () {
let str = /[\w\/\.\(\)]/g;
console.info('testGetSecurityPatchTag01 start');
let arr = securityPatchTagInfo.match(str);
let bufferstr = arr.join("");
let securityPatchTagInfo = deviceinfo.securityPatchTag;
console.info("the value of the bufferstr is :" + bufferstr);
console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo);
expect(securityPatchTagInfo).assertEqual(bufferstr);
} else {
expect(securityPatchTagInfo).assertInstanceOf('String');
console.info("the return value is null or incorrect.");
if (securityPatchTagInfo != "" && securityPatchTagInfo != null && securityPatchTagInfo != undefined) {
expect(false).assertFalse();
let str = /[\w\/\.\(\)]/g;
}
let arr = securityPatchTagInfo.match(str);
let bufferstr = arr.join('');
console.info("testGetSecurityPatchTag01 :end");
console.info('the value of the bufferstr is :' + bufferstr);
});
expect(securityPatchTagInfo).assertEqual(bufferstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_012
expect(false).assertFalse();
* @tc.name deviceInfoTest012
}
* @tc.desc Get the product version represented by a string and the return value is not null.
* @tc.size : MediumTest
console.info('testGetSecurityPatchTag01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest012", 0, function () {
* @tc.number DEVICE_INFO_TEST_012
console.info("testGetDisplayVersion01 start");
* @tc.name deviceInfoTest012
let ret = false;
* @tc.desc Get the product version represented by a string and the return value is not null.
let displayVersionInfo = deviceinfo.displayVersion;
* @tc.size : MediumTest
console.info("the value of the deviceinfo displayVersion is :" + displayVersionInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(displayVersionInfo).assertInstanceOf("String");
*/
if (displayVersionInfo != "" && displayVersionInfo != null && displayVersionInfo != undefined) {
it('deviceInfoTest012', 0, function () {
ret = true;
console.info('testGetDisplayVersion01 start');
}
let ret = false;
expect(ret).assertTrue();
let displayVersionInfo = deviceinfo.displayVersion;
console.info("testGetDisplayVersion01 :end");
console.info('the value of the deviceinfo displayVersion is :' + displayVersionInfo);
});
expect(displayVersionInfo).assertInstanceOf('String');
/**
if (displayVersionInfo != "" && displayVersionInfo != null && displayVersionInfo != undefined) {
* @tc.number DEVICE_INFO_TEST_013
ret = true;
* @tc.name deviceInfoTest013
}
* @tc.desc Get the incremental version represented by a string and the return value is not null.
expect(ret).assertTrue();
* @tc.size : MediumTest
console.info('testGetDisplayVersion01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest013", 0, function () {
* @tc.number DEVICE_INFO_TEST_013
console.info("testGetIncrementalVersion01 start");
* @tc.name deviceInfoTest013
* @tc.desc Get the incremental version represented by a string and the return value is not null.
let incrementalVersionInfo = deviceinfo.incrementalVersion;
* @tc.size : MediumTest
console.info("the value of the deviceinfo incrementalVersion is :" + incrementalVersionInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(incrementalVersionInfo).assertInstanceOf("String");
*/
if (incrementalVersionInfo != "" && incrementalVersionInfo != null && incrementalVersionInfo != undefined) {
it('deviceInfoTest013', 0, function () {
let str = /[\w-\.\(\)]/g;
console.info('testGetIncrementalVersion01 start');
let arr = incrementalVersionInfo.match(str);
let bufferstr = arr.join("");
let incrementalVersionInfo = deviceinfo.incrementalVersion;
console.info("the value of the bufferstr is :" + bufferstr);
console.info('the value of the deviceinfo incrementalVersion is :' + incrementalVersionInfo);
expect(incrementalVersionInfo).assertEqual(bufferstr);
} else {
expect(incrementalVersionInfo).assertInstanceOf('String');
console.info("the return value is null or incorrect.");
if (incrementalVersionInfo != "" && incrementalVersionInfo != null && incrementalVersionInfo != undefined) {
expect(false).assertFalse();
let str = /[\w-\.\(\)]/g;
}
let arr = incrementalVersionInfo.match(str);
let bufferstr = arr.join('');
console.info("testGetIncrementalVersion01 :end");
console.info('the value of the bufferstr is :' + bufferstr);
});
expect(incrementalVersionInfo).assertEqual(bufferstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_014
expect(false).assertFalse();
* @tc.name deviceInfoTest014
}
* @tc.desc Get the OS release type represented by a string and the return value is not null.
* @tc.size : MediumTest
console.info('testGetIncrementalVersion01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest014", 0, function () {
* @tc.number DEVICE_INFO_TEST_014
console.info("testGetOSReleaserType01 start");
* @tc.name deviceInfoTest014
* @tc.desc Get the OS release type represented by a string and the return value is not null.
let osReleaseTypeInfo = deviceinfo.osReleaseType;
* @tc.size : MediumTest
console.info("the value of the deviceinfo osReleaseType is :" + osReleaseTypeInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(osReleaseTypeInfo).assertInstanceOf("String");
*/
if (osReleaseTypeInfo != "" && osReleaseTypeInfo != null && osReleaseTypeInfo != undefined) {
it('deviceInfoTest014', 0, function () {
let str = /[\w-\.\(\)]/g;
console.info('testGetOSReleaserType01 start');
let arr = osReleaseTypeInfo.match(str);
let bufferstr = arr.join("");
let osReleaseTypeInfo = deviceinfo.osReleaseType;
console.info("the value of the bufferstr is :" + bufferstr);
console.info('the value of the deviceinfo osReleaseType is :' + osReleaseTypeInfo);
expect(osReleaseTypeInfo).assertEqual(bufferstr);
} else {
expect(osReleaseTypeInfo).assertInstanceOf('String');
console.info("the return value is null or incorrect.");
if (osReleaseTypeInfo != "" && osReleaseTypeInfo != null && osReleaseTypeInfo != undefined) {
expect(false).assertFalse();
let str = /[\w-\.\(\)]/g;
}
let arr = osReleaseTypeInfo.match(str);
let bufferstr = arr.join('');
console.info("testGetOSReleaserType01 :end");
console.info('the value of the bufferstr is :' + bufferstr);
});
expect(osReleaseTypeInfo).assertEqual(bufferstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_015
expect(false).assertFalse();
* @tc.name deviceInfoTest015
}
* @tc.desc Get the operating system full name and the return value is not null.
* @tc.size : MediumTest
console.info('testGetOSReleaserType01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest015", 0, function () {
* @tc.number DEVICE_INFO_TEST_015
console.info("testGetOSFullName01 start");
* @tc.name deviceInfoTest015
* @tc.desc Get the operating system full name and the return value is not null.
let osFullNameInfo = deviceinfo.osFullName;
* @tc.size : MediumTest
console.info("the value of the deviceinfo osFullName is :" + osFullNameInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(osFullNameInfo).assertInstanceOf("String");
*/
if (osFullNameInfo != "" && osFullNameInfo != null && osFullNameInfo != undefined) {
it('deviceInfoTest015', 0, function () {
let str = /[\w-\.\(\)\s]/g;
console.info('testGetOSFullName01 start');
let arr = osFullNameInfo.match(str);
let bufferstr = arr.join("");
let osFullNameInfo = deviceinfo.osFullName;
console.info("the value of the bufferstr is :" + bufferstr);
console.info('the value of the deviceinfo osFullName is :' + osFullNameInfo);
expect(osFullNameInfo).assertEqual(bufferstr);
} else {
expect(osFullNameInfo).assertInstanceOf('String');
console.info("the return value is null or incorrect.");
if (osFullNameInfo != "" && osFullNameInfo != null && osFullNameInfo != undefined) {
expect(false).assertFalse();
let str = /[\w-\.\(\)]/g;
}
let arr = osFullNameInfo.match(str);
let bufferstr = arr.join('');
console.info("testGetOSFullName01 :end");
console.info('the value of the bufferstr is :' + bufferstr);
});
expect(osFullNameInfo).assertEqual(bufferstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_016
expect(false).assertFalse();
* @tc.name deviceInfoTest016
}
* @tc.desc Get the major (M) version number which the return value is greater than 0.
* @tc.size : MediumTest
console.info('testGetOSFullName01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest016", 0, function () {
* @tc.number DEVICE_INFO_TEST_016
console.info("testGetMajorVersion01 start");
* @tc.name deviceInfoTest016
* @tc.desc Get the major (M) version number which the return value is greater than 0.
let majorVersionInfo = deviceinfo.majorVersion;
* @tc.size : MediumTest
console.info("the value of the deviceinfo majorVersion is :" + majorVersionInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(majorVersionInfo).assertInstanceOf("Number");
*/
if (majorVersionInfo >= 1 && majorVersionInfo <= 99) {
it('deviceInfoTest016', 0, function () {
let str = /[\w-\.\(\)]/g;
console.info('testGetMajorVersion01 start');
let arr = majorVersionInfo.toString().match(str);
let substr = arr.join("");
let majorVersionInfo = deviceinfo.majorVersion;
let numstr = parseInt(substr);
console.info('the value of the deviceinfo majorVersion is :' + majorVersionInfo);
console.info("the value of the bufferstr is :" + numstr);
expect(majorVersionInfo).assertEqual(numstr);
expect(majorVersionInfo).assertInstanceOf('Number');
} else {
if (majorVersionInfo >= 1 && majorVersionInfo <= 99) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)]/g;
expect(false).assertFalse();
let arr = majorVersionInfo.toString().match(str);
}
let substr = arr.join('');
let numstr = parseInt(substr);
console.info("testGetMajorVersion01 :end");
console.info('the value of the bufferstr is :' + numstr);
});
expect(majorVersionInfo).assertEqual(numstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_017
expect(false).assertFalse();
* @tc.name deviceInfoTest017
}
* @tc.desc Get the senior version number and the return value is greater than 0.
* @tc.size : MediumTest
console.info('testGetMajorVersion01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
/**
it("deviceInfoTest017", 0, function () {
* @tc.number DEVICE_INFO_TEST_017
console.info("testGetSeniorVersion01 start");
* @tc.name deviceInfoTest017
* @tc.desc Get the senior version number and the return value is greater than 0.
let seniorVersionInfo = deviceinfo.seniorVersion;
* @tc.size : MediumTest
console.info("the value of the deviceinfo seniorVersion is :" + seniorVersionInfo);
* @tc.type : Constant
* @tc.level : Level 0
expect(seniorVersionInfo).assertInstanceOf("Number");
*/
if (seniorVersionInfo >= 0 && seniorVersionInfo <= 99) {
it('deviceInfoTest017', 0, function () {
let str = /[\w-\.\(\)]/g;
console.info('testGetSeniorVersion01 start');
let arr = seniorVersionInfo.toString().match(str);
let substr = arr.join("");
let seniorVersionInfo = deviceinfo.seniorVersion;
let numstr = parseInt(substr);
console.info('the value of the deviceinfo seniorVersion is :' + seniorVersionInfo);
console.info("the value of the bufferstr is :" + numstr);
expect(seniorVersionInfo).assertEqual(numstr);
expect(seniorVersionInfo).assertInstanceOf('Number');
} else {
if (seniorVersionInfo >= 0 && seniorVersionInfo <= 99) {
console.info("the return value is null or incorrect.");
let str = /[\w-\.\(\)]/g;
expect(false).assertFalse();
let arr = seniorVersionInfo.toString().match(str);
}
let substr = arr.join('');
let numstr = parseInt(substr);
console.info("testGetSeniorVersion01 :end");
console.info('the value of the bufferstr is :' + numstr);
});
expect(seniorVersionInfo).assertEqual(numstr);
} else {
/**
console.info('the return value is null or incorrect.');
* @tc.number DEVICE_INFO_TEST_018
expect(false).assertFalse();
* @tc.name deviceInfoTest018
}
* @tc.desc Get the feature (F) version number which the return value is greater than 0.
* @tc.size : MediumTest
console.info('testGetSeniorVersion01 :end');
* @tc.type : Constant
})
* @tc.level : Level 0
*/
it("deviceInfoTest018", 0, function () {
/**
console.info("testGetFeatureVersion01 start");
* @tc.number DEVICE_INFO_TEST_018
* @tc.name deviceInfoTest018
let featureVersionInfo = deviceinfo.featureVersion;
* @tc.desc Get the feature (F) version number which the return value is greater than 0.
console.info("the value of the deviceinfo featureVersion is :" + featureVersionInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(featureVersionInfo).assertInstanceOf("Number");
* @tc.level : Level 0
if ((featureVersionInfo >= 1 && featureVersionInfo <= 99) || featureVersionInfo == 0) {
*/
let str = /[\w-\.\(\)]/g;
it('deviceInfoTest018', 0, function () {
let arr = featureVersionInfo.toString().match(str);
console.info('testGetFeatureVersion01 start');
let substr = arr.join("");
let numstr = parseInt(substr);
let featureVersionInfo = deviceinfo.featureVersion;
console.info("the value of the bufferstr is :" + numstr);
console.info('the value of the deviceinfo featureVersion is :' + featureVersionInfo);
expect(featureVersionInfo).assertEqual(numstr);
} else {
expect(featureVersionInfo).assertInstanceOf('Number');
console.info("the return value is null or incorrect.");
if ((featureVersionInfo >= 1 && featureVersionInfo <= 99) || featureVersionInfo == 0) {
expect(false).assertFalse();
let str = /[\w-\.\(\)]/g;
}
let arr = featureVersionInfo.toString().match(str);
let substr = arr.join('');
console.info("testGetFeatureVersion01 :end");
let numstr = parseInt(substr);
});
console.info('the value of the bufferstr is :' + numstr);
expect(featureVersionInfo).assertEqual(numstr);
/**
} else {
* @tc.number DEVICE_INFO_TEST_019
console.info('the return value is null or incorrect.');
* @tc.name deviceInfoTest019
expect(false).assertFalse();
* @tc.desc Get the build (B) version number which the return value is greater than 0.
}
* @tc.size : MediumTest
* @tc.type : Constant
console.info('testGetFeatureVersion01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest019", 0, function () {
/**
console.info("testGetBuildVersion01 start");
* @tc.number DEVICE_INFO_TEST_019
* @tc.name deviceInfoTest019
let buildVersionInfo = deviceinfo.buildVersion;
* @tc.desc Get the build (B) version number which the return value is greater than 0.
console.info("the value of the deviceinfo buildVersion is :" + buildVersionInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildVersionInfo).assertInstanceOf("Number");
* @tc.level : Level 0
if (buildVersionInfo == 0 || (buildVersionInfo >= 1 && buildVersionInfo <= 999)) {
*/
let str = /[\w-\.\(\)]/g;
it('deviceInfoTest019', 0, function () {
let arr = buildVersionInfo.toString().match(str);
console.info('testGetBuildVersion01 start');
let substr = arr.join("");
let numstr = parseInt(substr);
let buildVersionInfo = deviceinfo.buildVersion;
console.info("the value of the bufferstr is :" + numstr);
console.info('the value of the deviceinfo buildVersion is :' + buildVersionInfo);
expect(buildVersionInfo).assertEqual(numstr);
} else {
expect(buildVersionInfo).assertInstanceOf('Number');
console.info("the return value is null or incorrect.");
if (buildVersionInfo == 0 || (buildVersionInfo >= 1 && buildVersionInfo <= 999)) {
expect(false).assertFalse();
let str = /[\w-\.\(\)]/g;
}
let arr = buildVersionInfo.toString().match(str);
let substr = arr.join('');
console.info("testGetBuildVersion01 :end");
let numstr = parseInt(substr);
});
console.info('the value of the bufferstr is :' + numstr);
expect(buildVersionInfo).assertEqual(numstr);
/**
} else {
* @tc.number DEVICE_INFO_TEST_020
console.info('the return value is null or incorrect.');
* @tc.name deviceInfoTest020
expect(false).assertFalse();
* @tc.desc Get the API version number, which return value type is number and return value is greater than 0.
}
* @tc.size : MediumTest
* @tc.type : Constant
console.info('testGetBuildVersion01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest020", 0, function () {
/**
console.info("testGetSdkApiVersion01 start");
* @tc.number DEVICE_INFO_TEST_020
let ret = false;
* @tc.name deviceInfoTest020
let sdkApiVersionInfo = deviceinfo.sdkApiVersion;
* @tc.desc Get the API version number, which return value type is number and return value is greater than 0.
console.info("the value of the deviceinfo sdkApiVersion is :" + sdkApiVersionInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(sdkApiVersionInfo).assertInstanceOf("Number");
* @tc.level : Level 0
if (sdkApiVersionInfo >= 0) {
*/
ret = true;
it('deviceInfoTest020', 0, function () {
}
console.info('testGetSdkApiVersion01 start');
expect(ret).assertTrue();
let ret = false;
let sdkApiVersionInfo = deviceinfo.sdkApiVersion;
let str = /[\w-\.\(\)]/g;
console.info('the value of the deviceinfo sdkApiVersion is :' + sdkApiVersionInfo);
let arr = sdkApiVersionInfo.toString().match(str);
let substr = arr.join("");
expect(sdkApiVersionInfo).assertInstanceOf('Number');
let numstr = parseInt(substr);
if (sdkApiVersionInfo >= 0) {
console.info("the value of the bufferstr is :" + numstr);
ret = true;
expect(sdkApiVersionInfo).assertEqual(numstr);
}
expect(ret).assertTrue();
console.info("testGetSdkApiVersion01 :end");
});
let str = /[\w-\.\(\)]/g;
let arr = sdkApiVersionInfo.toString().match(str);
/**
let substr = arr.join('');
* @tc.number DEVICE_INFO_TEST_021
let numstr = parseInt(substr);
* @tc.name deviceInfoTest021
console.info('the value of the bufferstr is :' + numstr);
* @tc.desc Get the first API version number which the return value is greater than 0.
expect(sdkApiVersionInfo).assertEqual(numstr);
* @tc.size : MediumTest
* @tc.type : Constant
console.info('testGetSdkApiVersion01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest021", 0, function () {
/**
console.info("testGetFirstApiVersion01 start");
* @tc.number DEVICE_INFO_TEST_021
let ret = true;
* @tc.name deviceInfoTest021
let firstApiVersionInfo = deviceinfo.firstApiVersion;
* @tc.desc Get the first API version number which the return value is greater than 0.
console.info("the value of the deviceinfo firstApiVersion is :" + firstApiVersionInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(firstApiVersionInfo).assertInstanceOf("Number");
* @tc.level : Level 0
if (firstApiVersionInfo >= 0) {
*/
ret = true;
it('deviceInfoTest021', 0, function () {
}
console.info('testGetFirstApiVersion01 start');
expect(ret).assertTrue();
let ret = true;
let firstApiVersionInfo = deviceinfo.firstApiVersion;
let str = /[\w-\.\(\)]/g;
console.info('the value of the deviceinfo firstApiVersion is :' + firstApiVersionInfo);
let arr = firstApiVersionInfo.toString().match(str);
let substr = arr.join("");
expect(firstApiVersionInfo).assertInstanceOf('Number');
let numstr = parseInt(substr);
if (firstApiVersionInfo >= 0) {
console.info("the value of the bufferstr is :" + numstr);
ret = true;
expect(firstApiVersionInfo).assertEqual(numstr);
}
expect(ret).assertTrue();
console.info("testGetFirstApiVersion01 :end");
});
let str = /[\w-\.\(\)]/g;
let arr = firstApiVersionInfo.toString().match(str);
/**
let substr = arr.join('');
* @tc.number DEVICE_INFO_TEST_022
let numstr = parseInt(substr);
* @tc.name deviceInfoTest022
console.info('the value of the bufferstr is :' + numstr);
* @tc.desc Get the version ID number by a string which the return value is not null.
expect(firstApiVersionInfo).assertEqual(numstr);
* @tc.size : MediumTest
* @tc.type : Constant
console.info('testGetFirstApiVersion01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest022", 0, function () {
/**
console.info("testGetVersionId01 start");
* @tc.number DEVICE_INFO_TEST_022
let ret = false;
* @tc.name deviceInfoTest022
let versionIdInfo = deviceinfo.versionId;
* @tc.desc Get the version ID number by a string which the return value is not null.
console.info("the value of the deviceinfo versionId is :" + versionIdInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(versionIdInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (versionIdInfo != "" && versionIdInfo != null && versionIdInfo != undefined) {
*/
ret = true;
it('deviceInfoTest022', 0, function () {
}
console.info('testGetVersionId01 start');
expect(ret).assertTrue();
let ret = false;
console.info("testGetVersionId01 end");
let versionIdInfo = deviceinfo.versionId;
});
console.info('the value of the deviceinfo versionId is :' + versionIdInfo);
/**
expect(versionIdInfo).assertInstanceOf('String');
* @tc.number DEVICE_INFO_TEST_023
if (versionIdInfo != "" && versionIdInfo != null && versionIdInfo != undefined) {
* @tc.name deviceInfoTest023
ret = true;
* @tc.desc Get the different build types of the same baseline code which the return value is not null.
}
* @tc.size : MediumTest
expect(ret).assertTrue();
* @tc.type : Constant
console.info('testGetVersionId01 end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest023", 0, function () {
/**
console.info("testGetBuildType01 start");
* @tc.number DEVICE_INFO_TEST_023
* @tc.name deviceInfoTest023
let buildTypeInfo = deviceinfo.buildType;
* @tc.desc Get the different build types of the same baseline code which the return value is not null.
console.info("the value of the deviceinfo buildType is :" + buildTypeInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildTypeInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (buildTypeInfo != "" && buildTypeInfo != null && buildTypeInfo != undefined) {
*/
let str = /[\w-\.\(\)\:]/g;
it('deviceInfoTest023', 0, function () {
let arr = buildTypeInfo.match(str);
console.info('testGetBuildType01 start');
let bufferstr = arr.join("");
console.info("the value of the bufferstr is :" + bufferstr);
let buildTypeInfo = deviceinfo.buildType;
expect(buildTypeInfo).assertEqual(bufferstr);
console.info('the value of the deviceinfo buildType is :' + buildTypeInfo);
} else {
console.info("the return value is null or incorrect.");
expect(buildTypeInfo).assertInstanceOf('String');
expect(false).assertFalse();
if (buildTypeInfo != "" && buildTypeInfo != null && buildTypeInfo != undefined) {
}
let str = /[\w-\.\(\)\:]/g;
let arr = buildTypeInfo.match(str);
console.info("testGetBuildType01 :end");
let bufferstr = arr.join('');
});
console.info('the value of the bufferstr is :' + bufferstr);
expect(buildTypeInfo).assertEqual(bufferstr);
/**
} else {
* @tc.number DEVICE_INFO_TEST_024
console.info('the return value is null or incorrect.');
* @tc.name deviceInfoTest024
expect(false).assertFalse();
* @tc.desc Get the different build user by a string which the return value is not null.
}
* @tc.size : MediumTest
* @tc.type : Constant
console.info('testGetBuildType01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest024", 0, function () {
/**
console.info("testGetBuildUser01 start");
* @tc.number DEVICE_INFO_TEST_024
let ret = true;
* @tc.name deviceInfoTest024
let buildUserInfo = deviceinfo.buildUser;
* @tc.desc Get the different build user by a string which the return value is not null.
console.info("the value of the deviceinfo buildUser is :" + buildUserInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildUserInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (buildUserInfo != "" && buildUserInfo != null && buildUserInfo != undefined) {
*/
ret = true;
it('deviceInfoTest024', 0, function () {
}
console.info('testGetBuildUser01 start');
expect(ret).assertTrue();
let ret = true;
console.info("testGetBuildUser01 :end");
let buildUserInfo = deviceinfo.buildUser;
});
console.info('the value of the deviceinfo buildUser is :' + buildUserInfo);
/**
expect(buildUserInfo).assertInstanceOf('String');
* @tc.number DEVICE_INFO_TEST_025
if (buildUserInfo != "" && buildUserInfo != null && buildUserInfo != undefined) {
* @tc.name deviceInfoTest025
ret = true;
* @tc.desc Get the build host of the same baseline code by a string and the return value is not null.
}
* @tc.size : MediumTest
expect(ret).assertTrue();
* @tc.type : Constant
console.info('testGetBuildUser01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest025", 0, function () {
/**
console.info("testGetBuildHost01 start");
* @tc.number DEVICE_INFO_TEST_025
let ret = false;
* @tc.name deviceInfoTest025
let buildHostInfo = deviceinfo.buildHost;
* @tc.desc Get the build host of the same baseline code by a string and the return value is not null.
console.info("the value of the deviceinfo buildHost is :" + buildHostInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildHostInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (buildHostInfo != "" && buildHostInfo != null && buildHostInfo != undefined) {
*/
ret = true;
it('deviceInfoTest025', 0, function () {
}
console.info('testGetBuildHost01 start');
expect(ret).assertTrue();
let ret = false;
console.info("testGetBuildHost01 :end");
let buildHostInfo = deviceinfo.buildHost;
});
console.info('the value of the deviceinfo buildHost is :' + buildHostInfo);
/**
expect(buildHostInfo).assertInstanceOf('String');
* @tc.number DEVICE_INFO_TEST_026
if (buildHostInfo != "" && buildHostInfo != null && buildHostInfo != undefined) {
* @tc.name deviceInfoTest026
ret = true;
* @tc.desc Get the version build time by a string and the return value is not null.
}
* @tc.size : MediumTest
expect(ret).assertTrue();
* @tc.type : Constant
console.info('testGetBuildHost01 :end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest026", 0, function () {
/**
console.info("testGetBuildTime01 start");
* @tc.number DEVICE_INFO_TEST_026
let ret = false;
* @tc.name deviceInfoTest026
let buildTimeInfo = deviceinfo.buildTime;
* @tc.desc Get the version build time by a string and the return value is not null.
console.info("the value of the deviceinfo buildTime is :" + buildTimeInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildTimeInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (buildTimeInfo != "" && buildTimeInfo != null && buildTimeInfo != undefined) {
*/
ret = true;
it('deviceInfoTest026', 0, function () {
}
console.info('testGetBuildTime01 start');
expect(ret).assertTrue();
let ret = false;
console.info("testGetBuildTime01 : end");
let buildTimeInfo = deviceinfo.buildTime;
});
console.info('the value of the deviceinfo buildTime is :' + buildTimeInfo);
/**
expect(buildTimeInfo).assertInstanceOf('String');
* @tc.number DEVICE_INFO_TEST_027
if (buildTimeInfo != "" && buildTimeInfo != null && buildTimeInfo != undefined) {
* @tc.name deviceInfoTest027
ret = true;
* @tc.desc Get the version hash by a string and the return value is not null.
}
* @tc.size : MediumTest
expect(ret).assertTrue();
* @tc.type : Constant
console.info('testGetBuildTime01 : end');
* @tc.level : Level 0
})
*/
it("deviceInfoTest027", 0, function () {
/**
console.info("testGetBuildRootHash01 start");
* @tc.number DEVICE_INFO_TEST_027
* @tc.name deviceInfoTest027
let buildRootHashInfo = deviceinfo.buildRootHash;
* @tc.desc Get the version hash by a string and the return value is not null.
console.info("the value of the deviceinfo buildRootHash is :" + buildRootHashInfo);
* @tc.size : MediumTest
* @tc.type : Constant
expect(buildRootHashInfo).assertInstanceOf("String");
* @tc.level : Level 0
if (buildRootHashInfo != "" && buildRootHashInfo != null && buildRootHashInfo != undefined) {
*/
let str = /[\w-\.\(\)]/g;
it('deviceInfoTest027', 0, function () {
let arr = buildRootHashInfo.match(str);
console.info('testGetBuildRootHash01 start');
let bufferstr = arr.join("");
console.info("the value of the bufferstr is :" + bufferstr);
let buildRootHashInfo = deviceinfo.buildRootHash;
expect(buildRootHashInfo).assertEqual(bufferstr);
console.info('the value of the deviceinfo buildRootHash is :' + buildRootHashInfo);
} else {
console.info("the return value is null or incorrect.");
expect(buildRootHashInfo).assertInstanceOf('String');
expect(false).assertFalse();
if (buildRootHashInfo != "" && buildRootHashInfo != null && buildRootHashInfo != undefined) {
}
let str = /[\w-\.\(\)]/g;
let arr = buildRootHashInfo.match(str);
console.info("testGetBuildRootHash01 :end");
let bufferstr = arr.join('');
});
console.info('the value of the bufferstr is :' + bufferstr);
});
expect(buildRootHashInfo).assertEqual(bufferstr);
}
} else {
console.info('the return value is null or incorrect.');
expect(false).assertFalse();
}
console.info('testGetBuildRootHash01 :end');
})
})
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录