提交 1d7a6a1d 编写于 作者: H hu0475

完成telephony子系统Connection模块的跨平台测试套 完成telephony子系统WebSocket模块的跨平台测试套

Signed-off-by: Nhu0475 <huyanqiang5@huawei.com>
上级 6e7db609
......@@ -16,8 +16,8 @@ group("crossplatform") {
testonly = true
if (is_standard_system) {
deps = [
"telephonyConnectionetstest:ActsCrossPlatformConnectionTest",
"telephonyWebSocketetstest:ActsCrossPlatformWebSocketTest",
"telephonyConnectionetstest:ActsCrossplatformConnectionTest",
"telephonyWebSocketetstest:ActsCrossplatformWebSocketTest",
]
}
}
......@@ -12,7 +12,7 @@
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsCrossPlatformConnectionTest") {
ohos_js_hap_suite("ActsCrossplatformConnectionTest") {
hap_profile = "src/main/module.json"
deps = [
":windowStage_js_assets",
......@@ -21,7 +21,7 @@ ohos_js_hap_suite("ActsCrossPlatformConnectionTest") {
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "ActsCrossPlatformConnectionTest"
hap_name = "ActsCrossplatformConnectionTest"
subsystem_name = "communication"
part_name = "netstack"
}
......
......@@ -12,7 +12,7 @@
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsCrossPlatformWebSocketTest") {
ohos_js_hap_suite("ActsCrossplatformWebSocketTest") {
hap_profile = "src/main/module.json"
deps = [
":windowStage_js_assets",
......@@ -21,7 +21,7 @@ ohos_js_hap_suite("ActsCrossPlatformWebSocketTest") {
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "ActsCrossPlatformWebSocketTest"
hap_name = "ActsCrossplatformWebSocketTest"
subsystem_name = "communication"
part_name = "netstack"
}
......
......@@ -352,14 +352,14 @@ export default function webSocketTest() {
});
/*
* @tc.number: TEST_ON_MESSAGE_001
* @tc.name : testOn_Message001
* @tc.number: TEST_ON_OFF_MESSAGE_001
* @tc.name : testOn_Off_Message001
* @tc.desc : Subscribe to WebSocket received server message events, using callback as an asynchronous method. The maximum length of each message is 4K, and more than 4K automatic fragmentation.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOn_Message001', 0, async function (done) {
it('testOn_Off_Message001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('message', (err, value) => {
......@@ -370,30 +370,14 @@ export default function webSocketTest() {
});
/*
* @tc.number: TEST_OFF_MESSAGE_001
* @tc.name : testOff_Message001
* @tc.desc : Unsubscribe to WebSocket received server message events, using callback as an asynchronous method. The maximum length of each message is 4K, and more than 4K automatic fragmentation.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOff_Message001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('message');
ws.off('message');
expect(true).assertTrue();
});
/*
* @tc.number: TEST_On_CLOSE_001
* @tc.name : testOn_Close001
* @tc.number: TEST_On_Off_CLOSE_001
* @tc.name : testOn_Off_Close001
* @tc.desc : Subscribe to WebSocket shutdown events, using the callback method as an asynchronous method.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOn_Close001', 0, async function (done) {
it('testOn_Off_Close001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('close', (err, value) => {
......@@ -404,30 +388,14 @@ export default function webSocketTest() {
});
/*
* @tc.number: TEST_OFF_CLOSE_001
* @tc.name : testOff_Close001
* @tc.number: TEST_ON_OFF_ERROR_001
* @tc.name : testOn_Off_Error001
* @tc.desc : Unsubscribe to WebSocket shutdown events, using the callback method as an asynchronous method.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOff_Close001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('close');
ws.off('close');
expect(true).assertTrue();
});
/*
* @tc.number: TEST_ON_ERROR_001
* @tc.name : testOn_Error001
* @tc.desc : Unsubscribe to WebSocket shutdown events, using the callback method as an asynchronous method.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOn_Error001', 0, async function (done) {
it('testOn_Off_Error001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('error', (err) => {
......@@ -437,22 +405,6 @@ export default function webSocketTest() {
expect(true).assertTrue();
});
/*
* @tc.number: TEST_OFF_Error_001
* @tc.name : testOff_Error001
* @tc.desc : Unsubscribe to WebSocket shutdown events, using the callback method as an asynchronous method.
* @tc.size : MediumTest
* @tc.type : Method
* @tc.level : Level 2
*/
it('testOff_Error001', 0, async function (done) {
let ws = webSocket.createWebSocket();
done();
ws.on('error');
ws.off('error');
expect(true).assertTrue();
});
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册