Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4a7e13a0
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看板
提交
4a7e13a0
编写于
3月 20, 2023
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avRecorder多场景测试用例 codecheck
Signed-off-by:
N
bayanxing
<
bayanxing@kaihong.com
>
上级
c3426c99
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
35 addition
and
1 deletion
+35
-1
multimedia/media/media_js_standard/AVRecorderTestBase.js
multimedia/media/media_js_standard/AVRecorderTestBase.js
+18
-0
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
...rd/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
+17
-1
未找到文件。
multimedia/media/media_js_standard/AVRecorderTestBase.js
浏览文件 @
4a7e13a0
...
...
@@ -387,5 +387,23 @@ export async function avRecorderReliabilitTest03(avConfig, avRecorder, recorderT
await
avRecorder
.
prepare
(
avConfig
)
}
export
async
function
avRecorderReliabilitTest04
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
avRecorder
=
await
idle
(
avRecorder
);
await
avRecorder
.
prepare
(
avConfig
).
then
(()
=>
{
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
PREPARED
);
console
.
info
(
'
avRecorderReliabilitTest04 prepare success
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 prepare failed and catch error is
'
+
err
.
message
);
});
await
avRecorder
.
release
().
then
(()
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 release AVRecorder success
'
);
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
RELEASED
);
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 release AVRecorder failed and catch error is
'
+
err
.
message
);
});
}
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
浏览文件 @
4a7e13a0
...
...
@@ -17,7 +17,6 @@ import media from '@ohos.multimedia.media'
import
*
as
mediaTestBase
from
'
../../../../../MediaTestBase.js
'
;
import
*
as
avRecorderTestBase
from
'
../../../../../AVRecorderTestBase.js
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
;
import
{
UiDriver
,
BY
,
PointerMatrix
}
from
'
@ohos.uitest
'
export
default
function
avRecorderTest
()
{
describe
(
'
avRecorderTest
'
,
function
()
{
...
...
@@ -154,6 +153,23 @@ export default function avRecorderTest() {
avRecorderTestBase
.
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
RECORDER_TIME
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0300 end
'
)
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400
* @tc.name : 001.test resume->prepare
* @tc.desc : Local audio resume->prepare
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 start
'
)
fdObject
=
await
mediaTestBase
.
getAvRecorderFd
(
AV_SOURCES
[
4
],
"
audio
"
);
fdPath
=
"
fd://
"
+
fdObject
.
fdNumber
;
avConfig
.
url
=
fdPath
;
avRecorderTestBase
.
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
RECORDER_TIME
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 end
'
)
})
})
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录