Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
656183c6
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看板
提交
656183c6
编写于
7月 11, 2023
作者:
H
hu0475
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成telephony子系统http模块的跨平台测试套
Signed-off-by:
N
hu0475
<
huyanqiang5@huawei.com
>
上级
674079b0
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
48 addition
and
7 deletion
+48
-7
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets
...ny_http_test/src/main/ets/test/HttpRequestJsunit.test.ets
+1
-1
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets
..._test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets
+43
-1
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets
...p_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets
+1
-1
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets
...y_http_test/src/main/ets/test/HttpResponseJsunit.test.ets
+1
-1
telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets
..._http_test/src/main/ets/test/RequestMethodJsunit.test.ets
+1
-1
telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets
...y_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets
+1
-2
未找到文件。
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
@@ -622,6 +622,48 @@ export default function HttpRequestOptionsJsunit() {
}
});
/**
* @tc.number TEST_TELEPHONYHTTPREQUESTOPTIONSPRIORITY_002
* @tc.name testTelephonyHttpRequestOptionsPriority002
* @tc.desc Test Test HttpRequestOptions property.
* @tc.size: MediumTest
* @tc.type: Method
* @tc.level: level 2
*/
it("testTelephonyHttpRequestOptionsPriority002", 0, async function (done) {
var casename = 'Telephony_Http_HttpRequestOptions_priority_0100';
console.log("-----------------------HttpRequestOptions_priority Test is starting-----------------------");
try {
let httpRequestOptions = {
method: http.RequestMethod.GET,
extraData: {
//tn=albumsdetail&word=渐变风格插画&fr=albumslist&album_tab=设计素材&album_id=409&rn=30
tn: "albumsdetail",
work: "渐变风格插画",
fr: "albumslist",
album_tab: "设计素材",
album_id: "409",
rn: "30"
},
header: "content-type': 'application/json",
readTimeout: 60000,
connectTimeout: 60000,
priority: 1000
}
var httpRequest = http.createHttp();
httpRequest.request("https://image.baidu.com/search/albumsdetail/", httpRequestOptions, (err, data) => {
console.log(casename + JSON.stringify(err) + " data: " + JSON.stringify(data));
expect(data.responseCode == 200).assertTrue();
console.log("-----------------------HttpRequestOptions_extraData Test end-----------------------");
done();
});
} catch (error) {
console.log("testTelephonyHttpRequestOptionsPriority001 : error = " + error);
expect(false).assertTrue();
done();
}
});
/**
* @tc.number TEST_TELEPHONY_HTTPREQUESTOPTIONS_USINGPROTOCOL_001
* @tc.name testTelephonyHttpRequestOptionsUsingProtocol001
...
...
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets
浏览文件 @
656183c6
/*
* Copyright (C) 202
3
Huawei Device Co., Ltd.
* Copyright (C) 202
1-2022
Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License')
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
@@ -772,7 +772,6 @@ export default function responseCodeJsunit() {
* @tc.type: Enum
* @tc.level: level 0
*/
it("testTelephonyHttpResponseCodeUnavailable001", 0, async function (done) {
console.log("-----------------------ResponseCode UNAVAILABLE Test is starting-----------------------");
try {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录