Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c6713999
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看板
未验证
提交
c6713999
编写于
7月 08, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 08, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9222 【杂散】【上传下载】requestAP10场景用例覆盖
Merge pull request !9222 from 张育帅/master
上级
4b52b7b6
6f1bfaf2
变更
7
展开全部
显示空白变更内容
内联
并排
Showing
7 changed file
with
3954 addition
and
77 deletion
+3954
-77
request/newRequestAuthorityTest/Test.json
request/newRequestAuthorityTest/Test.json
+2
-1
request/newRequestAuthorityTest/entry/src/main/ets/test/List.test.ets
...equestAuthorityTest/entry/src/main/ets/test/List.test.ets
+9
-2
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload.test.ets
...rityTest/entry/src/main/ets/test/requestDownload.test.ets
+142
-61
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload001.test.ets
...yTest/entry/src/main/ets/test/requestDownload001.test.ets
+1197
-0
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload002.test.ets
...yTest/entry/src/main/ets/test/requestDownload002.test.ets
+1256
-0
request/newRequestAuthorityTest/entry/src/main/ets/test/requestUpload.test.ets
...horityTest/entry/src/main/ets/test/requestUpload.test.ets
+14
-13
request/newRequestAuthorityTest/entry/src/main/ets/test/requestUpload001.test.ets
...ityTest/entry/src/main/ets/test/requestUpload001.test.ets
+1334
-0
未找到文件。
request/newRequestAuthorityTest/Test.json
浏览文件 @
c6713999
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
"power-shell wakeup"
,
"power-shell wakeup"
,
"power-shell setmode 602"
,
"power-shell setmode 602"
,
"uinput -T -m 300 720 300 360 200"
,
"uinput -T -m 300 720 300 360 200"
,
"uinput -T -m 650 2760 650 1380 200"
"uinput -T -m 650 2760 650 1380 200"
,
"pidof download_server | xargs kill -9"
]
]
},
},
{
{
...
...
request/newRequestAuthorityTest/entry/src/main/ets/test/List.test.ets
浏览文件 @
c6713999
...
@@ -14,9 +14,16 @@
...
@@ -14,9 +14,16 @@
*/
*/
import requestUploadJSUnit from './requestUpload.test';
import requestUploadJSUnit from './requestUpload.test';
import requestUploadOneJSUnit from './requestUpload001.test';
import requestDownloadJSUnit from './requestDownload.test';
import requestDownloadJSUnit from './requestDownload.test';
import requestDownloadOneJSUnit from './requestDownload001.test';
import requestDownloadTwoJSUnit from './requestDownload002.test';
export default function testsuite() {
export default function testsuite() {
requestDownloadJSUnit()
requestDownloadJSUnit();
requestUploadJSUnit()
requestDownloadOneJSUnit();
requestDownloadTwoJSUnit();
requestUploadJSUnit();
requestUploadOneJSUnit();
}
}
\ No newline at end of file
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload.test.ets
浏览文件 @
c6713999
此差异已折叠。
点击以展开。
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload001.test.ets
0 → 100755
浏览文件 @
c6713999
此差异已折叠。
点击以展开。
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload002.test.ets
0 → 100755
浏览文件 @
c6713999
此差异已折叠。
点击以展开。
request/newRequestAuthorityTest/entry/src/main/ets/test/requestUpload.test.ets
浏览文件 @
c6713999
...
@@ -58,7 +58,7 @@ export default function requestUploadJSUnit() {
...
@@ -58,7 +58,7 @@ export default function requestUploadJSUnit() {
}
}
}];
}];
let conf = {
let conf
ig
= {
action: request.agent.Action.UPLOAD,
action: request.agent.Action.UPLOAD,
url: 'http://127.0.0.1',
url: 'http://127.0.0.1',
title: 'uploadTest',
title: 'uploadTest',
...
@@ -84,6 +84,7 @@ export default function requestUploadJSUnit() {
...
@@ -84,6 +84,7 @@ export default function requestUploadJSUnit() {
let sleep = function (timeout) {
let sleep = function (timeout) {
return new Promise(resolve => {
return new Promise(resolve => {
const st = setTimeout(() => {
const st = setTimeout(() => {
clearTimeout(st);
resolve(null);
resolve(null);
}, timeout);
}, timeout);
});
});
...
@@ -98,7 +99,7 @@ export default function requestUploadJSUnit() {
...
@@ -98,7 +99,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Create_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Create_Upload_Callback_0010', 0, async function (done) {
console.info("-----------------------SUB_Misc_REQUEST_Create_Upload_Callback_0010 is starting-----------------------");
console.info("-----------------------SUB_Misc_REQUEST_Create_Upload_Callback_0010 is starting-----------------------");
request.agent.create(globalThis.abilityContext, conf, async (err, task)=>{
request.agent.create(globalThis.abilityContext, conf
ig
, async (err, task)=>{
console.info("====>SUB_Misc_REQUEST_Create_Upload_Callback_0010 uploadTask: " + task);
console.info("====>SUB_Misc_REQUEST_Create_Upload_Callback_0010 uploadTask: " + task);
try{
try{
if(err){
if(err){
...
@@ -127,7 +128,7 @@ export default function requestUploadJSUnit() {
...
@@ -127,7 +128,7 @@ export default function requestUploadJSUnit() {
it('SUB_Misc_REQUEST_Create_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Create_Upload_Promise_0010', 0, async function (done) {
console.info("-----------------------SUB_Misc_REQUEST_Create_Upload_Promise_0010 is starting-----------------------");
console.info("-----------------------SUB_Misc_REQUEST_Create_Upload_Promise_0010 is starting-----------------------");
try {
try {
var task = await request.agent.create(globalThis.abilityContext, conf);
var task = await request.agent.create(globalThis.abilityContext, conf
ig
);
expect(task !== undefined).assertEqual(true);
expect(task !== undefined).assertEqual(true);
await request.agent.remove(task.tid);
await request.agent.remove(task.tid);
console.info("====>SUB_Misc_REQUEST_Create_Upload_Promise_0010 create success: " + task);
console.info("====>SUB_Misc_REQUEST_Create_Upload_Promise_0010 create success: " + task);
...
@@ -150,7 +151,7 @@ export default function requestUploadJSUnit() {
...
@@ -150,7 +151,7 @@ export default function requestUploadJSUnit() {
it('SUB_Misc_REQUEST_Remove_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Remove_Upload_Callback_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Remove_Upload_Callback_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Remove_Upload_Callback_0010 is starting-----------------------");
try {
try {
let task = await request.agent.create(globalThis.abilityContext, conf);
let task = await request.agent.create(globalThis.abilityContext, conf
ig
);
request.agent.remove(task.tid, err => {
request.agent.remove(task.tid, err => {
try {
try {
if(err){
if(err){
...
@@ -181,7 +182,7 @@ export default function requestUploadJSUnit() {
...
@@ -181,7 +182,7 @@ export default function requestUploadJSUnit() {
it('SUB_Misc_REQUEST_Remove_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Remove_Upload_Promise_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Remove_Upload_Promise_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Remove_Upload_Promise_0010 is starting-----------------------");
try {
try {
let task = await request.agent.create(globalThis.abilityContext, conf);
let task = await request.agent.create(globalThis.abilityContext, conf
ig
);
await request.agent.remove(task.tid);
await request.agent.remove(task.tid);
expect(true).assertEqual(true);
expect(true).assertEqual(true);
console.info("====>SUB_Misc_REQUEST_Remove_Upload_Promise_0010 remove success: " + task);
console.info("====>SUB_Misc_REQUEST_Remove_Upload_Promise_0010 remove success: " + task);
...
@@ -202,7 +203,7 @@ export default function requestUploadJSUnit() {
...
@@ -202,7 +203,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Start_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Start_Upload_Callback_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Start_Upload_Callback_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Start_Upload_Callback_0010 is starting-----------------------");
request.agent.create(globalThis.abilityContext, conf, async (err, task)=>{
request.agent.create(globalThis.abilityContext, conf
ig
, async (err, task)=>{
console.info("====>SUB_Misc_REQUEST_Start_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Start_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
task.start(async err => {
task.start(async err => {
try{
try{
...
@@ -232,7 +233,7 @@ export default function requestUploadJSUnit() {
...
@@ -232,7 +233,7 @@ export default function requestUploadJSUnit() {
it('SUB_Misc_REQUEST_Start_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Start_Upload_Promise_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Start_Upload_Promise_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Start_Upload_Promise_0010 is starting-----------------------");
try {
try {
var task = await request.agent.create(globalThis.abilityContext, conf);
var task = await request.agent.create(globalThis.abilityContext, conf
ig
);
await task.start();
await task.start();
expect(true).assertEqual(true);
expect(true).assertEqual(true);
console.info("====>SUB_Misc_REQUEST_Start_Upload_Promise_0010 upload start success: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Start_Upload_Promise_0010 upload start success: " + JSON.stringify(task));
...
@@ -254,7 +255,7 @@ export default function requestUploadJSUnit() {
...
@@ -254,7 +255,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Pause_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Pause_Upload_Callback_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Pause_Upload_Callback_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Pause_Upload_Callback_0010 is starting-----------------------");
request.agent.create(globalThis.abilityContext, conf, async (err, task)=>{
request.agent.create(globalThis.abilityContext, conf
ig
, async (err, task)=>{
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
task.start(err => {
task.start(err => {
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Callback_0010 upload start: " + JSON.stringify(err));
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Callback_0010 upload start: " + JSON.stringify(err));
...
@@ -286,7 +287,7 @@ export default function requestUploadJSUnit() {
...
@@ -286,7 +287,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Pause_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Pause_Upload_Promise_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Pause_Upload_Promise_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Pause_Upload_Promise_0010 is starting-----------------------");
let task = await request.agent.create(globalThis.abilityContext, conf);
let task = await request.agent.create(globalThis.abilityContext, conf
ig
);
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Promise_0010 create task: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Pause_Upload_Promise_0010 create task: " + JSON.stringify(task));
task.start(async err => {
task.start(async err => {
try {
try {
...
@@ -314,7 +315,7 @@ export default function requestUploadJSUnit() {
...
@@ -314,7 +315,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Resume_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Resume_Upload_Callback_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Resume_Upload_Callback_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Resume_Upload_Callback_0010 is starting-----------------------");
request.agent.create(globalThis.abilityContext, conf, async (err, task)=>{
request.agent.create(globalThis.abilityContext, conf
ig
, async (err, task)=>{
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
task.start(err => {
task.start(err => {
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Callback_0010 start: " + JSON.stringify(err));
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Callback_0010 start: " + JSON.stringify(err));
...
@@ -349,7 +350,7 @@ export default function requestUploadJSUnit() {
...
@@ -349,7 +350,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Resume_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Resume_Upload_Promise_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Resume_Upload_Promise_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Resume_Upload_Promise_0010 is starting-----------------------");
let task = await request.agent.create(globalThis.abilityContext, conf);
let task = await request.agent.create(globalThis.abilityContext, conf
ig
);
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Promise_0010 create task: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Promise_0010 create task: " + JSON.stringify(task));
task.start(err => {
task.start(err => {
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Promise_0010 start: " + JSON.stringify(err));
console.info("====>SUB_Misc_REQUEST_Resume_Upload_Promise_0010 start: " + JSON.stringify(err));
...
@@ -380,7 +381,7 @@ export default function requestUploadJSUnit() {
...
@@ -380,7 +381,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Stop_Upload_Callback_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Stop_Upload_Callback_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Stop_Upload_Callback_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Stop_Upload_Callback_0010 is starting-----------------------");
request.agent.create(globalThis.abilityContext, conf, async (err, task)=>{
request.agent.create(globalThis.abilityContext, conf
ig
, async (err, task)=>{
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Callback_0010 uploadTask: " + JSON.stringify(task));
task.start(err => {
task.start(err => {
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Callback_0010 start: " + JSON.stringify(err));
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Callback_0010 start: " + JSON.stringify(err));
...
@@ -412,7 +413,7 @@ export default function requestUploadJSUnit() {
...
@@ -412,7 +413,7 @@ export default function requestUploadJSUnit() {
*/
*/
it('SUB_Misc_REQUEST_Stop_Upload_Promise_0010', 0, async function (done) {
it('SUB_Misc_REQUEST_Stop_Upload_Promise_0010', 0, async function (done) {
console.info("====>-----------------------SUB_Misc_REQUEST_Stop_Upload_Promise_0010 is starting-----------------------");
console.info("====>-----------------------SUB_Misc_REQUEST_Stop_Upload_Promise_0010 is starting-----------------------");
let task = await request.agent.create(globalThis.abilityContext, conf);
let task = await request.agent.create(globalThis.abilityContext, conf
ig
);
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Promise_0010 create task: " + JSON.stringify(task));
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Promise_0010 create task: " + JSON.stringify(task));
task.start(async err => {
task.start(async err => {
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Promise_0010 start: " + JSON.stringify(err));
console.info("====>SUB_Misc_REQUEST_Stop_Upload_Promise_0010 start: " + JSON.stringify(err));
...
...
request/newRequestAuthorityTest/entry/src/main/ets/test/requestUpload001.test.ets
0 → 100755
浏览文件 @
c6713999
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录