未验证 提交 9e4101ba 编写于 作者: O openharmony_ci 提交者: Gitee

!1881 音频录制修改调用逻辑,各个用例结束后释放资源,并添加部分用例

Merge pull request !1881 from FULIZHONG/0211recorder
...@@ -28,8 +28,16 @@ ...@@ -28,8 +28,16 @@
"touch /data/accounts/account_0/appdata/recorder/test15.m4a", "touch /data/accounts/account_0/appdata/recorder/test15.m4a",
"touch /data/accounts/account_0/appdata/recorder/test16.m4a", "touch /data/accounts/account_0/appdata/recorder/test16.m4a",
"touch /data/accounts/account_0/appdata/recorder/test17.m4a", "touch /data/accounts/account_0/appdata/recorder/test17.m4a",
"touch /data/accounts/account_0/appdata/recorder/test18.mp4", "touch /data/accounts/account_0/appdata/recorder/test18.m4a",
"touch /data/accounts/account_0/appdata/recorder/test19.m4a", "touch /data/accounts/account_0/appdata/recorder/test19.m4a",
"touch /data/accounts/account_0/appdata/recorder/test20.m4a",
"touch /data/accounts/account_0/appdata/recorder/test21.m4a",
"touch /data/accounts/account_0/appdata/recorder/test22.m4a",
"touch /data/accounts/account_0/appdata/recorder/test23.m4a",
"touch /data/accounts/account_0/appdata/recorder/test24.m4a",
"touch /data/accounts/account_0/appdata/recorder/test25.mp4",
"touch /data/accounts/account_0/appdata/recorder/test26.mp4",
"touch /data/accounts/account_0/appdata/recorder/test27.mp4",
"touch /data/accounts/account_0/appdata/recorder/testAPI.m4a", "touch /data/accounts/account_0/appdata/recorder/testAPI.m4a",
"chmod -R 777 /data/accounts/account_0/appdata/recorder/*", "chmod -R 777 /data/accounts/account_0/appdata/recorder/*",
"setenforce 0" "setenforce 0"
......
...@@ -107,7 +107,7 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -107,7 +107,7 @@ describe('RecorderLocalTestAudioAPI', function () {
}); });
audioRecorder.on('start', () => { audioRecorder.on('start', () => {
console.info('setCallback start() case callback is called 111'); console.info('setCallback start() case callback is called');
sleep(RECORDER_TIME); sleep(RECORDER_TIME);
mySteps.shift(); mySteps.shift();
nextStep(mySteps,done); nextStep(mySteps,done);
...@@ -177,7 +177,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -177,7 +177,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_createAudioRecorder_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_createAudioRecorder_API_0100', 0, async function (done) {
let testAudioRecorder; let testAudioRecorder;
expect(testAudioRecorder).assertNull(); expect(testAudioRecorder).assertNull();
...@@ -194,7 +193,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -194,7 +193,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0100', 0, async function (done) {
let testAudioRecorder= media.createAudioRecorder(); let testAudioRecorder= media.createAudioRecorder();
expect(testAudioRecorder != null).assertTrue(); expect(testAudioRecorder != null).assertTrue();
...@@ -210,14 +208,45 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -210,14 +208,45 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0200', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(START_STATE, ERROR_STATE, PRE_STATE, END_STATE); let mySteps = new Array(START_STATE, ERROR_STATE, PRE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.start(); audioRecorder.start();
}) })
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0300
* @tc.name : 03.pause->prepare
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0300', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE,
PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0200
* @tc.name : 04.resume->prepare
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0200', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE,
PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* * /* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0500 * @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0500
* @tc.name : 05.stop->prepare * @tc.name : 05.stop->prepare
...@@ -226,10 +255,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -226,10 +255,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0500', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0500', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RESET_STATE, PRE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RESET_STATE, PRE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -242,10 +270,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -242,10 +270,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0600', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0600', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -258,11 +285,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -258,11 +285,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0800', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0800', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PRE_STATE, ERROR_STATE, STOP_STATE, let mySteps = new Array(PRE_STATE, START_STATE, PRE_STATE, ERROR_STATE, STOP_STATE,
PRE_STATE, RESET_STATE, PRE_STATE, END_STATE); PRE_STATE, RESET_STATE, PRE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -275,10 +301,63 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -275,10 +301,63 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0900', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0900', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, PRE_STATE, ERROR_STATE, PRE_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(PRE_STATE, PRE_STATE, ERROR_STATE, PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1000
* @tc.name : 10.channel:-1
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1000', 0, async function (done) {
audioConfig.numberOfChannels = -1;
audioConfig.audioSampleRate = 22050;
audioConfig.audioEncodeBitRate = 22050;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1100
* @tc.name : 11.channel:-1
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1100', 0, async function (done) {
audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.audioSampleRate = -1;
audioConfig.audioEncodeBitRate = 22050;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1200
* @tc.name : 12.channel:-1
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_1200', 0, async function (done) {
audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.audioSampleRate = 22050;
audioConfig.audioEncodeBitRate = -1;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -291,10 +370,12 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -291,10 +370,12 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0100', 0, async function (done) {
audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.audioSampleRate = 22050;
audioConfig.audioEncodeBitRate = 22050;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(START_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(START_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.start(); audioRecorder.start();
}) })
...@@ -307,10 +388,41 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -307,10 +388,41 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0200', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0300
* @tc.name : 03.pause->start
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0300', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, START_STATE,
ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0400
* @tc.name : 04.resume->start
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, START_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -323,10 +435,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -323,10 +435,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0500', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0500', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, START_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, START_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -339,10 +451,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -339,10 +451,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0600', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0600', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, START_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, START_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -355,11 +467,11 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -355,11 +467,11 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0800', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0800', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, START_STATE, ERROR_STATE, let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, START_STATE, ERROR_STATE,
PRE_STATE, START_STATE, RESET_STATE, START_STATE, ERROR_STATE, PRE_STATE, START_STATE, END_STATE); PRE_STATE, START_STATE, RESET_STATE, START_STATE, ERROR_STATE, PRE_STATE, START_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -372,10 +484,258 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -372,10 +484,258 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0900', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0900', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, START_STATE, START_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, START_STATE, START_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0100
* @tc.name : 01.creatAudioRecorder->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0100', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PAUSE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.pause();
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0200
* @tc.name : 02.prepare->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0200', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, PAUSE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0300
* @tc.name : 03.start->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0300', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0400
* @tc.name : 04.resume->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, PAUSE_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0500
* @tc.name : 05.stop->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, PAUSE_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0600
* @tc.name : 06.reset->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PAUSE_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0800
* @tc.name : 08.all step->pause
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0800', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, PAUSE_STATE,
STOP_STATE, PAUSE_STATE, ERROR_STATE, RESET_STATE, PAUSE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0900
* @tc.name : 09.pause three times
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0800', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, PAUSE_STATE, PAUSE_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0100
* @tc.name : 01.creatAudioRecorder->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0100', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.resume();
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0200
* @tc.name : 02.prepare->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0200', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0300
* @tc.name : 03.start->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0300', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0400
* @tc.name : 04.pause->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0500
* @tc.name : 05.stop->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RESUME_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0600
* @tc.name : 06.reset->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0600', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RESUME_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0800
* @tc.name : 08.all->resume
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0800', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESUME_STATE, PAUSE_STATE, RESUME_STATE, STOP_STATE,
RESUME_STATE, ERROR_STATE, RESET_STATE, RESUME_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0900
* @tc.name : 09.resume threee times
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0900', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE,
RESUME_STATE, RESUME_STATE, RESUME_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -388,10 +748,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -388,10 +748,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0100', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(STOP_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(STOP_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.stop(); audioRecorder.stop();
}) })
...@@ -403,11 +762,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -403,11 +762,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0200', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, STOP_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(PRE_STATE, STOP_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -420,10 +778,40 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -420,10 +778,40 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0300', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0300', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0400
* @tc.name : 04.pause->stop
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0500
* @tc.name : 05.resume->stop
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, STOP_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -436,10 +824,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -436,10 +824,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0600', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0600', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, STOP_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, STOP_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -452,11 +840,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -452,11 +840,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0800', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0800', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, STOP_STATE, ERROR_STATE, RESET_STATE, PRE_STATE, START_STATE, STOP_STATE, let mySteps = new Array(PRE_STATE, STOP_STATE, ERROR_STATE, RESET_STATE, PRE_STATE, START_STATE, STOP_STATE,
RESET_STATE, PRE_STATE, RESET_STATE, STOP_STATE, ERROR_STATE, PRE_STATE, END_STATE); RESET_STATE, PRE_STATE, RESET_STATE, STOP_STATE, ERROR_STATE, PRE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -469,11 +856,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -469,11 +856,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0900', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Stop_API_0900', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, STOP_STATE, ERROR_STATE, let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, STOP_STATE, ERROR_STATE,
STOP_STATE, ERROR_STATE, END_STATE); STOP_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -486,10 +872,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -486,10 +872,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0100', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(RESET_STATE, END_STATE); let mySteps = new Array(RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.reset(); audioRecorder.reset();
}) })
...@@ -502,10 +887,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -502,10 +887,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0200', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, RESET_STATE, END_STATE); let mySteps = new Array(PRE_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -518,10 +902,40 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -518,10 +902,40 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0300', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0300', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0400
* @tc.name : 04.pause->reset
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0500
* @tc.name : 05.resume->reset
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, RESET_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -534,10 +948,9 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -534,10 +948,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0600', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0600', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RESET_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -550,11 +963,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -550,11 +963,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0800', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0800', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, RESET_STATE, PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, START_STATE, let mySteps = new Array(PRE_STATE, RESET_STATE, PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, START_STATE,
STOP_STATE, RESET_STATE, PRE_STATE, START_STATE, END_STATE); STOP_STATE, RESET_STATE, PRE_STATE, START_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -567,10 +979,10 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -567,10 +979,10 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0900', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0900', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RESET_STATE, RESET_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RESET_STATE, RESET_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -583,7 +995,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -583,7 +995,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0100', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(RELEASE_STATE, END_STATE); let mySteps = new Array(RELEASE_STATE, END_STATE);
...@@ -600,7 +1011,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -600,7 +1011,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0200', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, RELEASE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, RELEASE_STATE, END_STATE);
...@@ -616,7 +1026,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -616,7 +1026,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0300', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0300', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RELEASE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RELEASE_STATE, END_STATE);
...@@ -624,6 +1033,36 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -624,6 +1033,36 @@ describe('RecorderLocalTestAudioAPI', function () {
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0400
* @tc.name : 04.pause->release
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0400', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0500
* @tc.name : 05.resume->release
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0500', 0, async function (done) {
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* * /* *
* @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0600 * @tc.number : SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0600
* @tc.name : 06.stop->release * @tc.name : 06.stop->release
...@@ -631,8 +1070,7 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -631,8 +1070,7 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0600', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0600', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
...@@ -648,7 +1086,6 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -648,7 +1086,6 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.type : Reliability * @tc.type : Reliability
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0700', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Release_API_0700', 0, async function (done) {
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RELEASE_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
......
...@@ -180,7 +180,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -180,7 +180,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0100', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test1.m4a'; audioConfig.uri = BASIC_PATH + 'test1.m4a';
initAudioRecorder(); initAudioRecorder();
...@@ -197,12 +196,11 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -197,12 +196,11 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0210', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0210', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test2.m4a'; audioConfig.uri = BASIC_PATH + 'test2.m4a';
audioConfig.numberOfChannels = CHANNEL_ONE; audioConfig.numberOfChannels = CHANNEL_ONE;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -215,12 +213,11 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -215,12 +213,11 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0220', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0220', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test3.m4a'; audioConfig.uri = BASIC_PATH + 'test3.m4a';
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -233,13 +230,12 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -233,13 +230,12 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0310', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0310', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test4.m4a'; audioConfig.uri = BASIC_PATH + 'test4.m4a';
audioConfig.audioSampleRate = 8000; // samplerate 8000 audioConfig.audioSampleRate = 8000; // samplerate 8000
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -252,14 +248,13 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -252,14 +248,13 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0320', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0320', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test5.mp4'; audioConfig.uri = BASIC_PATH + 'test5.mp4';
audioConfig.audioSampleRate = 32000; // samplerate 32000 audioConfig.audioSampleRate = 32000; // samplerate 32000
audioConfig.numberOfChannels = CHANNEL_ONE; audioConfig.numberOfChannels = CHANNEL_ONE;
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -272,14 +267,13 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -272,14 +267,13 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0330', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0330', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test6.mp4'; audioConfig.uri = BASIC_PATH + 'test6.mp4';
audioConfig.audioSampleRate = 44100; // samplerate 44100 audioConfig.audioSampleRate = 44100; // samplerate 44100
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -292,14 +286,13 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -292,14 +286,13 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0340', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0340', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test7.m4a'; audioConfig.uri = BASIC_PATH + 'test7.m4a';
audioConfig.audioSampleRate = 64000; // samplerate 64000 audioConfig.audioSampleRate = 64000; // samplerate 64000
audioConfig.numberOfChannels = CHANNEL_ONE; audioConfig.numberOfChannels = CHANNEL_ONE;
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -312,14 +305,13 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -312,14 +305,13 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0340', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0340', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test8.m4a'; audioConfig.uri = BASIC_PATH + 'test8.m4a';
audioConfig.audioSampleRate = 96000; // samplerate 96000 audioConfig.audioSampleRate = 96000; // samplerate 96000
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -332,7 +324,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -332,7 +324,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0410', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0410', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test9.mp4'; audioConfig.uri = BASIC_PATH + 'test9.mp4';
audioConfig.audioSampleRate = 22050; // samplerate 22050 audioConfig.audioSampleRate = 22050; // samplerate 22050
...@@ -340,7 +331,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -340,7 +331,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -353,7 +344,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -353,7 +344,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0420', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0420', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test10.mp4'; audioConfig.uri = BASIC_PATH + 'test10.mp4';
audioConfig.audioSampleRate = 44100; // samplerate 44100 audioConfig.audioSampleRate = 44100; // samplerate 44100
...@@ -361,7 +351,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -361,7 +351,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.numberOfChannels = CHANNEL_ONE; audioConfig.numberOfChannels = CHANNEL_ONE;
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -374,7 +364,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -374,7 +364,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0430', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0430', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test11.m4a'; audioConfig.uri = BASIC_PATH + 'test11.m4a';
audioConfig.audioSampleRate = 44100; // samplerate 44100 audioConfig.audioSampleRate = 44100; // samplerate 44100
...@@ -382,7 +371,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -382,7 +371,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.numberOfChannels = CHANNEL_ONE; audioConfig.numberOfChannels = CHANNEL_ONE;
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -395,7 +384,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -395,7 +384,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0440', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0440', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test12.m4a'; audioConfig.uri = BASIC_PATH + 'test12.m4a';
audioConfig.audioSampleRate = 44100; // samplerate 44100 audioConfig.audioSampleRate = 44100; // samplerate 44100
...@@ -403,7 +391,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -403,7 +391,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -416,7 +404,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -416,7 +404,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_CODEC_AAC_0450', 0, async function (done) { it('SUB_MEDIA_RECORDER_CODEC_AAC_0450', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test13.m4a'; audioConfig.uri = BASIC_PATH + 'test13.m4a';
audioConfig.audioSampleRate = 44100; // samplerate 44100 audioConfig.audioSampleRate = 44100; // samplerate 44100
...@@ -424,7 +411,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -424,7 +411,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -436,8 +423,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -436,8 +423,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_FORMAT_MP4_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_FORMAT_MP4_0200', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test14.mp4'; audioConfig.uri = BASIC_PATH + 'test14.mp4';
audioConfig.audioEncodeBitRate = 22050; // samplerate 22050 audioConfig.audioEncodeBitRate = 22050; // samplerate 22050
...@@ -445,7 +431,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -445,7 +431,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -458,7 +444,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -458,7 +444,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_FORMAT_MP4_0200', 0, async function (done) { it('SUB_MEDIA_RECORDER_FORMAT_MP4_0200', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test15.m4a'; audioConfig.uri = BASIC_PATH + 'test15.m4a';
audioConfig.audioEncodeBitRate = 22050; // samplerate 22050 audioConfig.audioEncodeBitRate = 22050; // samplerate 22050
...@@ -466,7 +451,7 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -466,7 +451,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
audioConfig.numberOfChannels = CHANNEL_TWO; audioConfig.numberOfChannels = CHANNEL_TWO;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -479,7 +464,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -479,7 +464,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0100', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test16.m4a'; audioConfig.uri = BASIC_PATH + 'test16.m4a';
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
...@@ -489,6 +473,41 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -489,6 +473,41 @@ describe('RecorderLocalTestAudioFUNC', function () {
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0200
* @tc.name : 002.pause
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0200', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test17.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0300
* @tc.name : 003.pause->resume
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0300', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test18.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE,
STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* * /* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0500 * @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0500
* @tc.name : 005.reset * @tc.name : 005.reset
...@@ -497,12 +516,101 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -497,12 +516,101 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0500', 0, async function (done) { it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0500', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test17.m4a'; audioConfig.uri = BASIC_PATH + 'test19.m4a';
audioConfig.fileFormat = FORMAT_M4A; audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, END_STATE); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0600
* @tc.name : 006.pause->resume->pause
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0600', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test20.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, PAUSE_STATE,
STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0700
* @tc.name : 007.pause->stop->reset
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0700', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test21.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, STOP_STATE,
RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0800
* @tc.name : 008.pause->resume->stop->reset
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0800', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test22.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, STOP_STATE,
RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0900
* @tc.name : 009.stop->reset->pause->resume->stop->reset
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_0900', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test23.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, START_STATE,
PAUSE_STATE, RESUME_STATE, STOP_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1000
* @tc.name : 010.stop->reset->pause->stop->reset
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1000', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test24.m4a';
audioConfig.fileFormat = FORMAT_M4A;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, START_STATE,
PAUSE_STATE, STOP_STATE, RESET_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
...@@ -515,9 +623,8 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -515,9 +623,8 @@ describe('RecorderLocalTestAudioFUNC', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1100', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test18.mp4'; audioConfig.uri = BASIC_PATH + 'test25.mp4';
audioConfig.fileFormat = FORMAT_MP4; audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder(); initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE, let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PRE_STATE,
...@@ -525,4 +632,40 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -525,4 +632,40 @@ describe('RecorderLocalTestAudioFUNC', function () {
setCallback(mySteps, done); setCallback(mySteps, done);
audioRecorder.prepare(audioConfig); audioRecorder.prepare(audioConfig);
}) })
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1200
* @tc.name : 012.start->pause->start(error)
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1200', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test26.mp4';
audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, START_STATE, ERROR_STATE,
STOP_STATE, RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
/* *
* @tc.number : SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1300
* @tc.name : 013.start->stop->pause(error)
* @tc.desc : Audio recordr control test
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level0
*/
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1300', 0, async function (done) {
audioConfig.uri = BASIC_PATH + 'test27.mp4';
audioConfig.fileFormat = FORMAT_MP4;
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, STOP_STATE, PAUSE_STATE, ERROR_STATE,
RELEASE_STATE, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册