[UTC][recorder][NonACR] Update TCs 19/325619/2 tizen
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 12 Jun 2025 04:44:42 +0000 (13:44 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 13 Jun 2025 02:04:45 +0000 (11:04 +0900)
- Correct video recording feature related TCs
- Add macro to check supported feature
- Clean up description and scenario
- Replace feature check code by macro
- Use video recorder handle for video recording related APIs

Change-Id: I2c2833641b9615be195588588e5d986ca1a805d3
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/utc/recorder/tct-recorder-core_mobile.h
src/utc/recorder/tct-recorder-core_tizeniot.h
src/utc/recorder/tct-recorder-core_wearable.h
src/utc/recorder/utc_media_recorder.c
src/utc/recorder/utc_media_recorder_callback.c
src/utc/recorder/utc_media_recorder_lifecycle.c
src/utc/recorder/utc_media_recorder_util.c
src/utc/recorder/utc_media_recorder_util.h

index 2d4e1377bed767837164b254b177da7f8f8ad6d5..b794ffe410f38365311370490e9e0550009b9dab 100644 (file)
@@ -24,6 +24,7 @@ extern void utc_media_recorder_cleanup(void);
 extern void utc_media_recorder_callback_startup(void);
 extern void utc_media_recorder_callback_cleanup(void);
 extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
 
 extern int utc_media_recorder_attr_get_audio_channel_p(void);
 extern int utc_media_recorder_attr_get_audio_channel_n1(void);
@@ -326,32 +327,32 @@ testcase tc_array[] = {
        {"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
-       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
index 2d4e1377bed767837164b254b177da7f8f8ad6d5..b794ffe410f38365311370490e9e0550009b9dab 100644 (file)
@@ -24,6 +24,7 @@ extern void utc_media_recorder_cleanup(void);
 extern void utc_media_recorder_callback_startup(void);
 extern void utc_media_recorder_callback_cleanup(void);
 extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
 
 extern int utc_media_recorder_attr_get_audio_channel_p(void);
 extern int utc_media_recorder_attr_get_audio_channel_n1(void);
@@ -326,32 +327,32 @@ testcase tc_array[] = {
        {"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
-       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
index 2d4e1377bed767837164b254b177da7f8f8ad6d5..b794ffe410f38365311370490e9e0550009b9dab 100644 (file)
@@ -24,6 +24,7 @@ extern void utc_media_recorder_cleanup(void);
 extern void utc_media_recorder_callback_startup(void);
 extern void utc_media_recorder_callback_cleanup(void);
 extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
 
 extern int utc_media_recorder_attr_get_audio_channel_p(void);
 extern int utc_media_recorder_attr_get_audio_channel_n1(void);
@@ -326,32 +327,32 @@ testcase tc_array[] = {
        {"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
-       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
-       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+       {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+       {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
        {"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
index 8ec878e06e0d380b8fafd8d0d3050b7692bb5b99..bbfa9205ef1ad06f26d04e0018e130e831993b3d 100644 (file)
 #include "utc_media_recorder_util.h"
 
 static bool audio_recording_supported = false;
-static recorder_h recorder = NULL;
-static int startup_ret = RECORDER_ERROR_NONE;
 static bool video_recording_supported = false;
+static bool camera_supported = false;
+
+static recorder_h recorder = NULL;
+static recorder_h video_recorder = NULL;
 static camera_h camera = NULL;
+
+static int startup_ret = RECORDER_ERROR_NONE;
+static int startup_ret_video_recorder = RECORDER_ERROR_NONE;
 static int startup_ret_camera = CAMERA_ERROR_NONE;
 
 
+#define CHECK_FEATURE_AUDIO_RECORDING \
+       do {\
+               if (!audio_recording_supported) {\
+                       assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+                       return 0;\
+               }\
+       } while (0)
+
+#define CHECK_FEATURE_VIDEO_RECORDING \
+       do {\
+               if (!video_recording_supported) {\
+                       if (camera_supported)\
+                               assert_eq(startup_ret_video_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+                       else\
+                               assert_eq(startup_ret_video_recorder, RECORDER_ERROR_INVALID_PARAMETER);\
+                       return 0;\
+               }\
+       } while (0)
+
+
 static void _sound_stream_focus_state_changed_cb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focus_mask, sound_stream_focus_state_e focus_state,
        sound_stream_focus_change_reason_e reason_for_change, int sound_behavior, const char *additional_info, void *user_data)
 {
        return;
 }
 
+
 /**
  * @function            utc_media_recorder_startup
  * @description         Called before each test. \n
-                        This is the precondition for checking apis. \n
-                        Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario            1. Check device storage supported. \n
-                        2. Get platform feature for audio recording and video recording. \n
-                        3. Create audio recorder. \n
-                        4. Create camera.
+                        The handles are created and supported features are checked.
+ * @scenario            1. Get platform feature for recordings and camera. \n
+                        2. Create handles(audio recorder, camera, video recorder).
  * @parameter           N/A
  * @return              N/A
  */
 void utc_media_recorder_startup(void)
 {
-       utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+       audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+       video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+       camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
 
        startup_ret = recorder_create_audiorecorder(&recorder);
        startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-
-       return;
+       startup_ret_video_recorder = recorder_create_videorecorder(camera, &video_recorder);
 }
 
 /**
  * @function            utc_media_recorder_cleanup
  * @description         Called after each test. \n
-                        This is the postcondition for checking apis. \n
-                        This postcondition is recorder_destroy for cleaning up all recorder resources for next test.
- * @scenario            1. Destroy recorder. \n
-                        2. Destroy camera.
+                        The handles are destroyed for next test. \n
+ * @scenario            1. Destroy handles(audio recorder, camera, video recorder).
  * @parameter           N/A
  * @return              N/A
  */
@@ -74,12 +96,15 @@ void utc_media_recorder_cleanup(void)
                recorder = NULL;
        }
 
+       if (video_recorder) {
+               recorder_destroy(video_recorder);
+               video_recorder = NULL;
+       }
+
        if (camera) {
                camera_destroy(camera);
                camera = NULL;
        }
-
-       return;
 }
 
 /**
@@ -87,7 +112,7 @@ void utc_media_recorder_cleanup(void)
  * @since_tizen         2.3
  * @description         To check audio channel count with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio channel.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -99,10 +124,7 @@ int utc_media_recorder_attr_get_audio_channel_p(void)
        int ret = RECORDER_ERROR_NONE;
        int channel = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_channel(recorder, &channel);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -115,7 +137,7 @@ int utc_media_recorder_attr_get_audio_channel_p(void)
  * @since_tizen         2.3
  * @description         To check audio channel count with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio channel.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -126,10 +148,7 @@ int utc_media_recorder_attr_get_audio_channel_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_channel(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -142,7 +161,7 @@ int utc_media_recorder_attr_get_audio_channel_n1(void)
  * @since_tizen         2.3
  * @description         To check audio channel count with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio channel.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -153,10 +172,7 @@ int utc_media_recorder_attr_get_audio_channel_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_channel(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -170,7 +186,7 @@ int utc_media_recorder_attr_get_audio_channel_n2(void)
  * @since_tizen         2.3
  * @description         To check audio device with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio device.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -182,10 +198,7 @@ int utc_media_recorder_attr_get_audio_device_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_device(recorder, &device);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -198,7 +211,7 @@ int utc_media_recorder_attr_get_audio_device_p(void)
  * @since_tizen         2.3
  * @description         To check audio device with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio device.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -209,10 +222,7 @@ int utc_media_recorder_attr_get_audio_device_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_device(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -225,7 +235,7 @@ int utc_media_recorder_attr_get_audio_device_n1(void)
  * @since_tizen         2.3
  * @description         To check audio device with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio device.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -236,10 +246,7 @@ int utc_media_recorder_attr_get_audio_device_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_device(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -253,7 +260,7 @@ int utc_media_recorder_attr_get_audio_device_n2(void)
  * @since_tizen         2.3
  * @description         To check audio encoder bitrate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio encodeer bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -265,10 +272,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int bitrate = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_encoder_bitrate(recorder, &bitrate);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -281,7 +285,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_p(void)
  * @since_tizen         2.3
  * @description         To check audio encoder bitrate with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -292,10 +296,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_encoder_bitrate(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -308,7 +309,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n1(void)
  * @since_tizen         2.3
  * @description         To check audio encoder bitrate with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -319,10 +320,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_encoder_bitrate(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -336,7 +334,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n2(void)
  * @since_tizen         2.3
  * @description         To check audio sample-rate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio sample-rate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -348,10 +346,7 @@ int utc_media_recorder_attr_get_audio_samplerate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int samplerate = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_samplerate(recorder, &samplerate);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -364,7 +359,7 @@ int utc_media_recorder_attr_get_audio_samplerate_p(void)
  * @since_tizen         2.3
  * @description         To check audio sample-rate with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio sample-rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -375,10 +370,7 @@ int utc_media_recorder_attr_get_audio_samplerate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_samplerate(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -391,7 +383,7 @@ int utc_media_recorder_attr_get_audio_samplerate_n1(void)
  * @since_tizen         2.3
  * @description         To check audio sample-rate with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio sample-rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -402,10 +394,7 @@ int utc_media_recorder_attr_get_audio_samplerate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_audio_samplerate(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -419,9 +408,8 @@ int utc_media_recorder_attr_get_audio_samplerate_n2(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get orientation tag.
+                        1. Check video recording and camera feature. \n
+                        2. Get orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -432,17 +420,9 @@ int utc_media_recorder_attr_get_orientation_tag_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation_tag = RECORDER_ROTATION_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_get_orientation_tag(recorder, &rotation_tag);
+       ret = recorder_attr_get_orientation_tag(video_recorder, &rotation_tag);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -453,9 +433,8 @@ int utc_media_recorder_attr_get_orientation_tag_p(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get orientation tag.
+                        1. Check video recording and camera feature. \n
+                        2. Get orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -465,17 +444,9 @@ int utc_media_recorder_attr_get_orientation_tag_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_attr_get_orientation_tag(recorder, NULL);
+       ret = recorder_attr_get_orientation_tag(video_recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -486,9 +457,8 @@ int utc_media_recorder_attr_get_orientation_tag_n1(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get orientation tag.
+                        1. Check video recording and camera feature. \n
+                        2. Get orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -498,15 +468,7 @@ int utc_media_recorder_attr_get_orientation_tag_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_get_orientation_tag(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -520,9 +482,8 @@ int utc_media_recorder_attr_get_orientation_tag_n2(void)
  * @since_tizen         2.3
  * @description         To check recording motion rate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get recording motion rate.
+                        1. Check video recording and camera feature. \n
+                        2. Get recording motion rate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -533,17 +494,9 @@ int utc_media_recorder_attr_get_recording_motion_rate_p(void)
        int ret = RECORDER_ERROR_NONE;
        double rate = 0.0;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_get_recording_motion_rate(recorder, &rate);
+       ret = recorder_attr_get_recording_motion_rate(video_recorder, &rate);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -554,9 +507,8 @@ int utc_media_recorder_attr_get_recording_motion_rate_p(void)
  * @since_tizen         2.3
  * @description         To check recording motion rate count with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get recording motion rate.
+                        1. Check video recording and camera feature. \n
+                        2. Get recording motion rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -566,17 +518,9 @@ int utc_media_recorder_attr_get_recording_motion_rate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_get_recording_motion_rate(recorder, NULL);
+       ret = recorder_attr_get_recording_motion_rate(video_recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -587,9 +531,8 @@ int utc_media_recorder_attr_get_recording_motion_rate_n1(void)
  * @since_tizen         2.3
  * @description         To check recording motion rate count with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get recording motion rate.
+                        1. Check video recording and camera feature. \n
+                        2. Get recording motion rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -599,15 +542,7 @@ int utc_media_recorder_attr_get_recording_motion_rate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_get_recording_motion_rate(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -621,7 +556,7 @@ int utc_media_recorder_attr_get_recording_motion_rate_n2(void)
  * @since_tizen         2.3
  * @description         To check recording file size limitation with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording file size limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -633,10 +568,7 @@ int utc_media_recorder_attr_get_size_limit_p(void)
        int ret = RECORDER_ERROR_NONE;
        int size = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_size_limit(recorder, &size);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -649,7 +581,7 @@ int utc_media_recorder_attr_get_size_limit_p(void)
  * @since_tizen         2.3
  * @description         To check recording file size limitation with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording file size limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -660,10 +592,7 @@ int utc_media_recorder_attr_get_size_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_size_limit(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -676,7 +605,7 @@ int utc_media_recorder_attr_get_size_limit_n1(void)
  * @since_tizen         2.3
  * @description         To check recording file size limitation  with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording file size limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -687,10 +616,7 @@ int utc_media_recorder_attr_get_size_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_size_limit(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -704,7 +630,7 @@ int utc_media_recorder_attr_get_size_limit_n2(void)
  * @since_tizen         2.3
  * @description         To check recording time limitation with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -716,10 +642,7 @@ int utc_media_recorder_attr_get_time_limit_p(void)
        int ret = RECORDER_ERROR_NONE;
        int value = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_time_limit(recorder, &value);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -732,7 +655,7 @@ int utc_media_recorder_attr_get_time_limit_p(void)
  * @since_tizen         2.3
  * @description         To check recording time limitation with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -743,10 +666,7 @@ int utc_media_recorder_attr_get_time_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_time_limit(recorder, NULL);
        assert_neq(ret, RECORDER_ERROR_NONE);
@@ -759,7 +679,7 @@ int utc_media_recorder_attr_get_time_limit_n1(void)
  * @since_tizen         2.3
  * @description         To check recording time limitation with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get recording time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -770,10 +690,7 @@ int utc_media_recorder_attr_get_time_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_get_time_limit(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -787,9 +704,8 @@ int utc_media_recorder_attr_get_time_limit_n2(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -800,17 +716,9 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int value = 0;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_attr_get_video_encoder_bitrate(recorder, &value);
+       ret = recorder_attr_get_video_encoder_bitrate(video_recorder, &value);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -821,9 +729,8 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_p(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -833,17 +740,9 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_attr_get_video_encoder_bitrate(recorder, NULL);
+       ret = recorder_attr_get_video_encoder_bitrate(video_recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -854,9 +753,8 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n1(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -866,15 +764,7 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_get_video_encoder_bitrate(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -887,7 +777,7 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n2(void)
  * @since_tizen         2.3
  * @description         To check sound mute or not with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported audio encoder and file format. \n
                         3. Set supported audio encoder. \n
                         4. Set supported file format. \n
@@ -908,10 +798,7 @@ int utc_media_recorder_attr_is_muted_p(void)
 {
        int ret=RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
        if (ret != RECORDER_ERROR_NONE)
@@ -940,7 +827,7 @@ int utc_media_recorder_attr_is_muted_p(void)
  * @since_tizen         2.3
  * @description         To check sound muted or not with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get sound which is muted or not.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -951,10 +838,7 @@ int utc_media_recorder_attr_is_muted_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_is_muted(NULL);
        assert_eq(ret, false);
@@ -967,7 +851,7 @@ int utc_media_recorder_attr_is_muted_n(void)
  * @since_tizen         2.3
  * @description         To set audio channel count with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio channel count.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -978,10 +862,7 @@ int utc_media_recorder_attr_set_audio_channel_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_channel(recorder, 1);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -994,7 +875,7 @@ int utc_media_recorder_attr_set_audio_channel_p(void)
  * @since_tizen         2.3
  * @description         To check with invalid parameter.
  * @scenario            This test is for checking invalid value. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio channel count.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1005,10 +886,7 @@ int utc_media_recorder_attr_set_audio_channel_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_channel(recorder, 10);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1021,7 +899,7 @@ int utc_media_recorder_attr_set_audio_channel_n1(void)
  * @since_tizen         2.3
  * @description         To check audio channel count with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio channel.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1032,10 +910,7 @@ int utc_media_recorder_attr_set_audio_channel_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_channel(NULL, 10);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1048,7 +923,7 @@ int utc_media_recorder_attr_set_audio_channel_n2(void)
  * @since_tizen         2.3
  * @description         To check audio device with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio device.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1060,10 +935,7 @@ int utc_media_recorder_attr_set_audio_device_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_device(recorder, device);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1076,7 +948,7 @@ int utc_media_recorder_attr_set_audio_device_p(void)
  * @since_tizen         2.3
  * @description         To check audio device with invalid value.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio device.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1088,10 +960,7 @@ int utc_media_recorder_attr_set_audio_device_n(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = 10;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_device(recorder, device);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1104,7 +973,7 @@ int utc_media_recorder_attr_set_audio_device_n(void)
  * @since_tizen         2.3
  * @description         To check audio encoder bitrate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1115,10 +984,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_encoder_bitrate(recorder, 11111);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1131,7 +997,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_p(void)
  * @since_tizen         2.3
  * @description         To check audio encoder bitrate with invalid paramter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1142,10 +1008,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_encoder_bitrate(recorder, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1158,7 +1021,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_n(void)
  * @since_tizen         2.3
  * @description         To check audio sample-rate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio sample-rate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1169,10 +1032,7 @@ int utc_media_recorder_attr_set_audio_samplerate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_samplerate(recorder, 11111);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1185,7 +1045,7 @@ int utc_media_recorder_attr_set_audio_samplerate_p(void)
  * @since_tizen         2.3
  * @description         To check audio sample-rate with invalid value.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio sample-rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1196,10 +1056,7 @@ int utc_media_recorder_attr_set_audio_samplerate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_audio_samplerate(recorder, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1212,7 +1069,7 @@ int utc_media_recorder_attr_set_audio_samplerate_n(void)
  * @since_tizen         2.3
  * @description         To check file size limitation with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get filesize limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1223,10 +1080,7 @@ int utc_media_recorder_attr_set_size_limit_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_size_limit(recorder, 0);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1239,7 +1093,7 @@ int utc_media_recorder_attr_set_size_limit_p(void)
  * @since_tizen         2.3
  * @description         To check file size limitation with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get file size limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1250,10 +1104,7 @@ int utc_media_recorder_attr_set_size_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_size_limit(recorder, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1266,7 +1117,7 @@ int utc_media_recorder_attr_set_size_limit_n1(void)
  * @since_tizen         2.3
  * @description         To check file size limitation with invalid handle.
  * @scenario            This test is for checking invalid parameter such as reorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio channel.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1277,10 +1128,7 @@ int utc_media_recorder_attr_set_size_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_size_limit(NULL, 0);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1294,7 +1142,7 @@ int utc_media_recorder_attr_set_size_limit_n2(void)
  * @since_tizen         2.3
  * @description         To check time limitation with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1305,10 +1153,7 @@ int utc_media_recorder_attr_set_time_limit_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_time_limit(recorder, 11111);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1321,7 +1166,7 @@ int utc_media_recorder_attr_set_time_limit_p(void)
  * @since_tizen         2.3
  * @description         To check time limitation with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1332,10 +1177,7 @@ int utc_media_recorder_attr_set_time_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_time_limit(recorder, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1348,7 +1190,7 @@ int utc_media_recorder_attr_set_time_limit_n1(void)
  * @since_tizen         2.3
  * @description         To check time limitation with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set time limitation.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1359,10 +1201,7 @@ int utc_media_recorder_attr_set_time_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_time_limit(NULL, 10);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1375,9 +1214,8 @@ int utc_media_recorder_attr_set_time_limit_n2(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -1387,17 +1225,9 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_set_video_encoder_bitrate(recorder, 1000000);
+       ret = recorder_attr_set_video_encoder_bitrate(video_recorder, 1000000);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -1408,9 +1238,8 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_p(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with invalid parameter.
  * @scenario            This test is for checking invalid pointer which is out of range. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1420,17 +1249,9 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_attr_set_video_encoder_bitrate(recorder, -1);
+       ret = recorder_attr_set_video_encoder_bitrate(video_recorder, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1441,9 +1262,8 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n1(void)
  * @since_tizen         2.3
  * @description         To check video encoder bitrate with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encoder bitrate.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encoder bitrate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1453,15 +1273,7 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_set_video_encoder_bitrate(NULL, -1);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1474,7 +1286,7 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n2(void)
  * @since_tizen         2.3
  * @description         To check mute with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set sound mute.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1485,10 +1297,7 @@ int utc_media_recorder_attr_set_mute_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_mute(recorder, false);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1501,7 +1310,7 @@ int utc_media_recorder_attr_set_mute_p(void)
  * @since_tizen         2.3
  * @description         To check mute count with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set mute.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1512,10 +1321,7 @@ int utc_media_recorder_attr_set_mute_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_attr_set_mute(NULL, false);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1528,8 +1334,7 @@ int utc_media_recorder_attr_set_mute_n(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
+                        1. Check video recording and camera feature. \n
                         2. Set orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1541,17 +1346,9 @@ int utc_media_recorder_attr_set_orientation_tag_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = RECORDER_ROTATION_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_attr_set_orientation_tag(recorder, rotation);
+       ret = recorder_attr_set_orientation_tag(video_recorder, rotation);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -1562,9 +1359,8 @@ int utc_media_recorder_attr_set_orientation_tag_p(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set orientation tag.
+                        1. Check video recording and camera feature. \n
+                        2. Set orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1575,17 +1371,9 @@ int utc_media_recorder_attr_set_orientation_tag_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = -1;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_set_orientation_tag(recorder, rotation);
+       ret = recorder_attr_set_orientation_tag(video_recorder, rotation);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1596,9 +1384,8 @@ int utc_media_recorder_attr_set_orientation_tag_n1(void)
  * @since_tizen         2.3
  * @description         To check orientation tag with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set orientation tag.
+                        1. Check video recording and camera feature. \n
+                        2. Set orientation tag.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1609,15 +1396,7 @@ int utc_media_recorder_attr_set_orientation_tag_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = -1;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_set_orientation_tag(NULL, rotation);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1631,9 +1410,8 @@ int utc_media_recorder_attr_set_orientation_tag_n2(void)
  * @since_tizen         2.3
  * @description         To check recording motion rate with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set recording motion rate.
+                        1. Check video recording and camera feature. \n
+                        2. Set recording motion rate.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -1643,17 +1421,9 @@ int utc_media_recorder_attr_set_recording_motion_rate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_attr_set_recording_motion_rate(recorder, 1.0);
+       ret = recorder_attr_set_recording_motion_rate(video_recorder, 1.0);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -1664,9 +1434,8 @@ int utc_media_recorder_attr_set_recording_motion_rate_p(void)
  * @since_tizen         2.3
  * @description         To check recording motion rate with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set recording motion rate.
+                        1. Check video recording and camera feature. \n
+                        2. Set recording motion rate.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1676,15 +1445,7 @@ int utc_media_recorder_attr_set_recording_motion_rate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_attr_set_recording_motion_rate(NULL, -1.0);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1697,7 +1458,7 @@ int utc_media_recorder_attr_set_recording_motion_rate_n(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1709,10 +1470,7 @@ int utc_media_recorder_get_audio_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e value;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_audio_encoder(recorder, &value);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1725,7 +1483,7 @@ int utc_media_recorder_get_audio_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1736,10 +1494,7 @@ int utc_media_recorder_get_audio_encoder_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_audio_encoder(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1752,7 +1507,7 @@ int utc_media_recorder_get_audio_encoder_n1(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1763,10 +1518,7 @@ int utc_media_recorder_get_audio_encoder_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_audio_encoder(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1779,7 +1531,7 @@ int utc_media_recorder_get_audio_encoder_n2(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder AMR. \n
                         3. Get audio encoder. \n
                         4. Set audio encoder AAC. \n
@@ -1801,10 +1553,7 @@ int utc_media_recorder_set_get_audio_encoder_p(void)
        recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_AMR;
        recorder_audio_codec_e ret_codec = RECORDER_AUDIO_CODEC_AMR;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        codec = RECORDER_AUDIO_CODEC_AMR;
        ret = recorder_set_audio_encoder(recorder, codec);
@@ -1861,7 +1610,7 @@ int utc_media_recorder_set_get_audio_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check file format with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get file format.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -1873,10 +1622,7 @@ int utc_media_recorder_get_file_format_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e value = RECORDER_FILE_FORMAT_3GP;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_file_format(recorder, &value);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1889,7 +1635,7 @@ int utc_media_recorder_get_file_format_p(void)
  * @since_tizen         2.3
  * @description         To check file format with invalid handle.
  * @scenario            This test is for checking invalid pointer. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get file format.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1900,10 +1646,7 @@ int utc_media_recorder_get_file_format_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_file_format(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1916,9 +1659,8 @@ int utc_media_recorder_get_file_format_n(void)
  * @since_tizen         2.3
  * @description         To check video encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -1929,17 +1671,9 @@ int utc_media_recorder_get_video_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e value = RECORDER_VIDEO_CODEC_MPEG4;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_get_video_encoder(recorder, &value);
+       ret = recorder_get_video_encoder(video_recorder, &value);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -1950,9 +1684,8 @@ int utc_media_recorder_get_video_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check video encoder with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1962,17 +1695,9 @@ int utc_media_recorder_get_video_encoder_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_get_video_encoder(recorder, NULL);
+       ret = recorder_get_video_encoder(video_recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1983,9 +1708,8 @@ int utc_media_recorder_get_video_encoder_n1(void)
  * @since_tizen         2.3
  * @description         To check video encoder count with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Get video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -1995,15 +1719,7 @@ int utc_media_recorder_get_video_encoder_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_get_video_encoder(NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2016,16 +1732,15 @@ int utc_media_recorder_get_video_encoder_n2(void)
  * @since_tizen         2.3
  * @description         To check video encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encoder H263. \n
-                        4. Get video encoder. \n
-                        5. Set video encoder H264. \n
-                        6. Get video encoder. \n
-                        7. Set video encoder MPEG4. \n
-                        8. Get video encoder. \n
-                        9. Set video encoder THEORA. \n
-                        10. Get video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encoder H263. \n
+                        3. Get video encoder. \n
+                        4. Set video encoder H264. \n
+                        5. Get video encoder. \n
+                        6. Set video encoder MPEG4. \n
+                        7. Get video encoder. \n
+                        8. Set video encoder THEORA. \n
+                        9. Get video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -2037,50 +1752,42 @@ int utc_media_recorder_set_get_video_encoder_p(void)
        recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_H263;
        recorder_video_codec_e ret_codec = RECORDER_VIDEO_CODEC_H263;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        codec = RECORDER_VIDEO_CODEC_H263;
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
                assert_eq(ret, RECORDER_ERROR_NONE);
        }
 
-       ret = recorder_get_video_encoder(recorder, &ret_codec);
+       ret = recorder_get_video_encoder(video_recorder, &ret_codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        codec = RECORDER_VIDEO_CODEC_H264;
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
                assert_eq(ret, RECORDER_ERROR_NONE);
        }
 
-       ret = recorder_get_video_encoder(recorder, &ret_codec);
+       ret = recorder_get_video_encoder(video_recorder, &ret_codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        codec = RECORDER_VIDEO_CODEC_MPEG4;
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
                assert_eq(ret, RECORDER_ERROR_NONE);
        }
 
-       ret = recorder_get_video_encoder(recorder, &ret_codec);
+       ret = recorder_get_video_encoder(video_recorder, &ret_codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        codec = RECORDER_VIDEO_CODEC_THEORA;
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
                assert_eq(ret, RECORDER_ERROR_NONE);
        }
 
-       ret = recorder_get_video_encoder(recorder, &ret_codec);
+       ret = recorder_get_video_encoder(video_recorder, &ret_codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -2093,7 +1800,7 @@ int utc_media_recorder_set_get_video_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check audio level with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported audio encoder and file format. \n
                         3. Set supported audio encoder. \n
                         4. Set supported file format. \n
@@ -2112,10 +1819,7 @@ int utc_media_recorder_get_audio_level_p(void)
        double value = 0.0;
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -2138,7 +1842,7 @@ int utc_media_recorder_get_audio_level_p(void)
  * @since_tizen         2.3
  * @description         To check audio level with invalid parameter.
  * @scenario            This test is for checking invalid pointer. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get audio level.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2149,10 +1853,7 @@ int utc_media_recorder_get_audio_level_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_audio_level(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2165,9 +1866,8 @@ int utc_media_recorder_get_audio_level_n(void)
  * @since_tizen         2.3
  * @description         To check video resolution with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Get video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -2179,17 +1879,9 @@ int utc_media_recorder_get_video_resolution_p(void)
        int mHeight = 0;
        int mWidth = 0;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_get_video_resolution(recorder, &mWidth, &mHeight);
+       ret = recorder_get_video_resolution(video_recorder, &mWidth, &mHeight);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -2200,9 +1892,8 @@ int utc_media_recorder_get_video_resolution_p(void)
  * @since_tizen         2.3
  * @description         To check video resolution with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Get video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2212,17 +1903,9 @@ int utc_media_recorder_get_video_resolution_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_get_video_resolution(recorder, NULL, NULL);
+       ret = recorder_get_video_resolution(video_recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2233,9 +1916,8 @@ int utc_media_recorder_get_video_resolution_n1(void)
  * @since_tizen         2.3
  * @description         To check video resolution with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Get video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Get video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2245,15 +1927,7 @@ int utc_media_recorder_get_video_resolution_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_get_video_resolution(NULL, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2267,7 +1941,7 @@ int utc_media_recorder_get_video_resolution_n2(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -2279,10 +1953,7 @@ int utc_media_recorder_set_audio_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_foreach_supported_audio_encoder(recorder, _audio_encoder_cb, &codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -2303,7 +1974,7 @@ int utc_media_recorder_set_audio_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2315,10 +1986,7 @@ int utc_media_recorder_set_audio_encoder_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = -2;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_audio_encoder(recorder, codec);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2332,7 +2000,7 @@ int utc_media_recorder_set_audio_encoder_n1(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2344,10 +2012,7 @@ int utc_media_recorder_set_audio_encoder_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = -2;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_audio_encoder(NULL, codec);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2361,7 +2026,7 @@ int utc_media_recorder_set_audio_encoder_n2(void)
  * @since_tizen         2.3
  * @description         To check audio encoder with invalid parameter with precodition.
  * @scenario            This test is for checking invalid parameter disable audio with creating audio recorder. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2372,10 +2037,7 @@ int utc_media_recorder_set_audio_encoder_n3(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_DISABLE);
        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
@@ -2391,7 +2053,7 @@ int utc_media_recorder_set_audio_encoder_n3(void)
  * @since_tizen         2.3
  * @description         To check file format with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file format.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -2403,10 +2065,7 @@ int utc_media_recorder_set_file_format_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_file_format(recorder, format);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -2419,7 +2078,7 @@ int utc_media_recorder_set_file_format_p(void)
  * @since_tizen         2.3
  * @description         To check set file format with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file format.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2431,10 +2090,7 @@ int utc_media_recorder_set_file_format_n(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e format = -1;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_file_format(recorder, format);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2447,7 +2103,7 @@ int utc_media_recorder_set_file_format_n(void)
  * @since_tizen         2.3
  * @description         To check file name with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file name.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
@@ -2459,10 +2115,7 @@ int utc_media_recorder_set_filename_p(void)
        int ret = RECORDER_ERROR_NONE;
        char *media_path = NULL;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        utc_media_recorder_util_get_media_path(&media_path);
        assert(media_path);
@@ -2481,7 +2134,7 @@ int utc_media_recorder_set_filename_p(void)
  * @since_tizen         2.3
  * @description         To check file name with invalid handle.
  * @scenario            This test is for checking invalid pointer. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file name.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2492,10 +2145,7 @@ int utc_media_recorder_set_filename_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_filename(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2508,9 +2158,8 @@ int utc_media_recorder_set_filename_n(void)
  * @since_tizen         2.3
  * @description         To check video encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -2521,17 +2170,9 @@ int utc_media_recorder_set_video_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_MPEG4;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -2542,9 +2183,8 @@ int utc_media_recorder_set_video_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check video encoder with invalid parameter.
  * @scenario            This test is for checking invalid pointer which is out of range. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encodeer.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encodeer.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2555,17 +2195,9 @@ int utc_media_recorder_set_video_encoder_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = -1;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_set_video_encoder(recorder, codec);
+       ret = recorder_set_video_encoder(video_recorder, codec);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2576,9 +2208,8 @@ int utc_media_recorder_set_video_encoder_n1(void)
  * @since_tizen         2.3
  * @description         To check video encoder with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Set video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2589,15 +2220,7 @@ int utc_media_recorder_set_video_encoder_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = -1;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_set_video_encoder(NULL, codec);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2611,12 +2234,9 @@ int utc_media_recorder_set_video_encoder_n2(void)
  * @since_tizen         2.3
  * @description         To check video resolution with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Create video recorder. \n
-                        4. Get video resolution. \n
-                        5. Set video resolution. \n
-                        6. Destroy recorder.
+                        1. Check video recording and camera feature. \n
+                        2. Get video resolution. \n
+                        3. Set video resolution. \n
  * @parameter           N/A
  * @return              1 is the fail. You need  to check log in tct tool. \n
                         0 is the success. \n
@@ -2627,28 +2247,14 @@ int utc_media_recorder_set_video_resolution_p(void)
        int ret = RECORDER_ERROR_NONE;
        int width = 0;
        int height = 0;
-       recorder_h video_recorder = NULL;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_create_videorecorder(camera, &video_recorder);
-       assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_get_video_resolution(video_recorder, &width, &height);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        ret = recorder_set_video_resolution(video_recorder, width, height);
 
-       recorder_destroy(video_recorder);
-
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -2659,7 +2265,7 @@ int utc_media_recorder_set_video_resolution_p(void)
  * @since_tizen         2.3
  * @description         To check file fomrat with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file format 3GP. \n
                         3. Get file format. \n
                         4. Set file format MP4. \n
@@ -2683,10 +2289,7 @@ int utc_media_recorder_set_get_file_format_p(void)
        recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
        recorder_file_format_e ret_format = RECORDER_FILE_FORMAT_3GP;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        format = RECORDER_FILE_FORMAT_3GP;
        ret = recorder_set_file_format(recorder, format);
@@ -2752,9 +2355,8 @@ int utc_media_recorder_set_get_file_format_p(void)
  * @since_tizen         2.3
  * @description         To check video resolution with invalid parameter.
  * @scenario            This test is for checking invalid value which is out of range. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Set video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2764,17 +2366,9 @@ int utc_media_recorder_set_video_resolution_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_set_video_resolution(recorder, 0, 0);
+       ret = recorder_set_video_resolution(video_recorder, 0, 0);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2785,9 +2379,8 @@ int utc_media_recorder_set_video_resolution_n1(void)
  * @since_tizen         2.3
  * @description         To check video resolution with invalid handle.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Set video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Set video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -2797,15 +2390,7 @@ int utc_media_recorder_set_video_resolution_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_set_video_resolution(NULL, 0, 0);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2819,7 +2404,7 @@ int utc_media_recorder_set_video_resolution_n2(void)
  * @since_tizen         2.3
  * @description         To check file name with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set file name. \n
                         3. Get file name. \n
                         4. Free file name.
@@ -2834,10 +2419,7 @@ int utc_media_recorder_get_filename_p(void)
        char *set_name = NULL;
        char *get_name = NULL;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        utc_media_recorder_util_get_media_path(&set_name);
        assert(set_name);
@@ -2863,7 +2445,7 @@ int utc_media_recorder_get_filename_p(void)
  * @since_tizen         2.3
  * @description         To check file name with invalid handle.
  * @scenario            This test is for checking invalid pointer which is null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Get filename.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2874,10 +2456,7 @@ int utc_media_recorder_get_filename_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_get_filename(recorder, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -2890,7 +2469,7 @@ int utc_media_recorder_get_filename_n(void)
  * @since_tizen         3.0
  * @description         To check sound stream information setting with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Create sound stream information. \n
                         3. Check sound stream information. \n
                         4. Set sound stream information.
@@ -2905,16 +2484,13 @@ int utc_media_recorder_set_sound_stream_info_p(void)
        int ret2 = SOUND_MANAGER_ERROR_NONE;
        sound_stream_info_h stream_info = NULL;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret2 = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA,
                _sound_stream_focus_state_changed_cb, NULL, &stream_info);
 
        assert_eq(ret2, SOUND_MANAGER_ERROR_NONE);
-       assert_neq(stream_info, NULL);
+       assert(stream_info);
 
        ret = recorder_set_sound_stream_info(recorder, stream_info);
 
@@ -2931,7 +2507,7 @@ int utc_media_recorder_set_sound_stream_info_p(void)
  * @since_tizen         3.0
  * @description         To check sound stream information setting with invalid stream information pointer.
  * @scenario            This test is for checking invalid pointer which is null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set NULL for stream_info parameter.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -2942,10 +2518,7 @@ int utc_media_recorder_set_sound_stream_info_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_sound_stream_info(recorder, NULL);
 
index b2e4a2aec8172c01169280ca4fb1c2c31d7dbd39..29a4c2779d3f64e5f87ed9935d353e93df5042da 100644 (file)
 
 #define CALLBACK_CHECK_COUNT    10
 
+
+static bool audio_recording_supported = false;
+static bool video_recording_supported = false;
+static bool camera_supported = false;
+
 static recorder_h recorder = NULL;
+static recorder_h video_recorder = NULL;
 static camera_h camera = NULL;
-static bool video_recording_supported = false;
-static bool audio_recording_supported = false;
+
 static int startup_ret = RECORDER_ERROR_NONE;
+static int startup_ret_video_recorder = RECORDER_ERROR_NONE;
 static int startup_ret_camera = CAMERA_ERROR_NONE;
 
+#define CHECK_FEATURE_AUDIO_RECORDING \
+       do {\
+               if (!audio_recording_supported) {\
+                       assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+                       return 0;\
+               }\
+       } while (0)
+
+#define CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret_recorder) \
+       do {\
+               if (!audio_recording_supported) {\
+                       assert_eq(ret_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+                       return 0;\
+               }\
+       } while (0)
+
+#define CHECK_FEATURE_VIDEO_RECORDING \
+       do {\
+               if (!video_recording_supported) {\
+                       if (camera_supported)\
+                               assert_eq(startup_ret_video_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+                       else\
+                               assert_eq(startup_ret_video_recorder, RECORDER_ERROR_INVALID_PARAMETER);\
+                       return 0;\
+               }\
+       } while (0)
+
+
 /**
  * @function            utc_media_recorder_callback_startup
  * @description         Called before each test. \n
-                        This is the precondition for checking apis. \n
-                        Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario            1. Check device storage supported. \n
-                        2. Create audio recorder.
+                        The handles are created and supported features are checked.
+ * @scenario            1. Get platform feature for recordings and camera. \n
+                        2. Create handles(audio recorder, camera, video recorder).
  * @parameter           N/A
  * @return              N/A
  */
 void utc_media_recorder_callback_startup(void)
 {
-       utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+       audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+       video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+       camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
 
        startup_ret = recorder_create_audiorecorder(&recorder);
        startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-
-       return;
+       startup_ret_video_recorder = recorder_create_videorecorder(camera, &video_recorder);
 }
 
 /**
  * @function            utc_media_recorder_callback_cleanup
  * @description         Called after each test. \n
-                        This is the postcondition for checking apis. \n
-                        This postcondition is recorder_destroy for cleaning up all recorder resources for next test.
- * @scenario            1. Destroy recorder.
+                        The handles are destroyed for next test. \n
+ * @scenario            1. Destroy handles(audio recorder, camera, video recorder).
  * @parameter           N/A
  * @return              N/A
  */
@@ -65,12 +98,15 @@ void utc_media_recorder_callback_cleanup(void)
                recorder = NULL;
        }
 
+       if (video_recorder) {
+               recorder_destroy(video_recorder);
+               video_recorder = NULL;
+       }
+
        if (camera) {
                camera_destroy(camera);
                camera = NULL;
        }
-
-       return;
 }
 
 static bool _video_encoder_cb(recorder_video_codec_e codec,  void *user_data)
@@ -179,7 +215,7 @@ static bool _video_encode_decision_cb(recorder_video_data_s *frame, void *user_d
  * @since_tizen         2.3
  * @description         To check supported audio encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -190,10 +226,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_foreach_supported_audio_encoder(recorder, _audio_encoder_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -206,7 +239,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check supported audio encoder with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -217,10 +250,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_foreach_supported_audio_encoder(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -233,7 +263,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_n(void)
  * @since_tizen         2.3
  * @description         To check supported file format with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported file format.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -244,10 +274,7 @@ int utc_media_recorder_foreach_supported_file_format_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_foreach_supported_file_format(recorder, _file_format_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -260,7 +287,7 @@ int utc_media_recorder_foreach_supported_file_format_p(void)
  * @since_tizen         2.3
  * @description         To check supported file format with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported file format.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -271,10 +298,7 @@ int utc_media_recorder_foreach_supported_file_format_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_foreach_supported_file_format(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -287,9 +311,8 @@ int utc_media_recorder_foreach_supported_file_format_n(void)
  * @since_tizen         2.3
  * @description         To check supported video encoder with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Check supported video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -299,17 +322,9 @@ int utc_media_recorder_foreach_supported_video_encoder_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_foreach_supported_video_encoder(recorder, _video_encoder_cb, NULL);
+       ret = recorder_foreach_supported_video_encoder(video_recorder, _video_encoder_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -320,9 +335,8 @@ int utc_media_recorder_foreach_supported_video_encoder_p(void)
  * @since_tizen         2.3
  * @description         To check supported video encoder with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported video encoder.
+                        1. Check video recording and camera feature. \n
+                        2. Check supported video encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -332,17 +346,9 @@ int utc_media_recorder_foreach_supported_video_encoder_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_foreach_supported_video_encoder(recorder, NULL, NULL);
+       ret = recorder_foreach_supported_video_encoder(video_recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -353,9 +359,8 @@ int utc_media_recorder_foreach_supported_video_encoder_n(void)
  * @since_tizen                2.3
  * @description         To check supported video resolution with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Check supported video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -364,26 +369,12 @@ int utc_media_recorder_foreach_supported_video_encoder_n(void)
 int utc_media_recorder_foreach_supported_video_resolution_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h video_recorder = NULL;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_create_videorecorder(camera, &video_recorder);
-       assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_foreach_supported_video_resolution(video_recorder, _video_resolution_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
-       recorder_destroy(video_recorder);
-
        return 0;
 }
 
@@ -392,9 +383,8 @@ int utc_media_recorder_foreach_supported_video_resolution_p(void)
  * @since_tizen         2.3
  * @description         To check supported video resolution with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check camera supported or not. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported video resolution.
+                        1. Check video recording and camera feature. \n
+                        2. Check supported video resolution.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -404,17 +394,9 @@ int utc_media_recorder_foreach_supported_video_resolution_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       ret = recorder_foreach_supported_video_resolution(recorder, NULL, NULL);
+       ret = recorder_foreach_supported_video_resolution(video_recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -425,7 +407,7 @@ int utc_media_recorder_foreach_supported_video_resolution_n(void)
  * @since_tizen         2.3
  * @description         To check file size, time limited callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set limited callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -436,10 +418,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_recording_limit_reached_cb(recorder, _limit_reached_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -466,7 +445,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_p(void)
  * @since_tizen         2.3
  * @description         To check file size, time limited callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set limited callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -477,10 +456,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_recording_limit_reached_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -494,7 +470,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_n(void)
  * @since_tizen         2.3
  * @description         To check recording status with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set recording status callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -506,10 +482,7 @@ int utc_media_recorder_set_recording_status_cb_p(void)
        int ret = RECORDER_ERROR_NONE;
        int status_count = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_recording_status_cb(recorder, _recording_status_cb, (void *)&status_count);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -533,7 +506,7 @@ int utc_media_recorder_set_recording_status_cb_p(void)
  * @since_tizen         2.3
  * @description         To check recording status with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set recording status callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -544,10 +517,7 @@ int utc_media_recorder_set_recording_status_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_recording_status_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -560,7 +530,7 @@ int utc_media_recorder_set_recording_status_cb_n(void)
  * @since_tizen         2.3
  * @description         To check state changed callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set changed callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -571,10 +541,7 @@ int utc_media_recorder_set_state_changed_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_state_changed_cb(recorder, _state_changed_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -594,7 +561,7 @@ int utc_media_recorder_set_state_changed_cb_p(void)
  * @since_tizen         2.3
  * @description         To check state changed callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set state changed callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -605,10 +572,7 @@ int utc_media_recorder_set_state_changed_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_state_changed_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -621,7 +585,7 @@ int utc_media_recorder_set_state_changed_cb_n(void)
  * @since_tizen         2.3
  * @description         To check interrupted callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set interrupted callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -632,10 +596,7 @@ int utc_media_recorder_set_interrupted_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_interrupted_cb(recorder, _interrupted_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -648,7 +609,7 @@ int utc_media_recorder_set_interrupted_cb_p(void)
  * @since_tizen         2.3
  * @description         To check interrupted callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set interrupted callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -659,10 +620,7 @@ int utc_media_recorder_set_interrupted_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_interrupted_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -675,7 +633,7 @@ int utc_media_recorder_set_interrupted_cb_n(void)
  * @since_tizen         2.3
  * @description         To check audio stream callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -687,10 +645,7 @@ int utc_media_recorder_set_audio_stream_cb_p(void)
        int ret = RECORDER_ERROR_NONE;
        int buffer_count = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_audio_stream_cb(recorder, _audio_stream_cb, (void *)&buffer_count);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -714,7 +669,7 @@ int utc_media_recorder_set_audio_stream_cb_p(void)
  * @since_tizen         2.3
  * @description         To check audio stream callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set audio stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -725,10 +680,7 @@ int utc_media_recorder_set_audio_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_audio_stream_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -741,7 +693,7 @@ int utc_media_recorder_set_audio_stream_cb_n(void)
  * @since_tizen         2.3
  * @description         To check error callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set error callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -752,10 +704,7 @@ int utc_media_recorder_set_error_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_error_cb(recorder, _error_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -768,7 +717,7 @@ int utc_media_recorder_set_error_cb_p(void)
  * @since_tizen         2.3
  * @description         To check error callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set error callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -779,10 +728,7 @@ int utc_media_recorder_set_error_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_error_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -795,7 +741,7 @@ int utc_media_recorder_set_error_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset recording limit callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset recording limit callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -806,10 +752,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_recording_limit_reached_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -822,7 +765,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset recording limit callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset recording limit callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -833,10 +776,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_recording_limit_reached_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -849,7 +789,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset recording status callback  with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset recording status callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -860,10 +800,7 @@ int utc_media_recorder_unset_recording_status_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_recording_status_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -876,7 +813,7 @@ int utc_media_recorder_unset_recording_status_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset recording status callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset recording status callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -887,10 +824,7 @@ int utc_media_recorder_unset_recording_status_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_recording_status_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -903,7 +837,7 @@ int utc_media_recorder_unset_recording_status_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset state changed callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset state changed callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -914,10 +848,7 @@ int utc_media_recorder_unset_state_changed_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_state_changed_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -930,7 +861,7 @@ int utc_media_recorder_unset_state_changed_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset state changed callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Check supported audio encoder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -941,10 +872,7 @@ int utc_media_recorder_unset_state_changed_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_state_changed_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -957,7 +885,7 @@ int utc_media_recorder_unset_state_changed_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset interrupted callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset interrupted callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -968,10 +896,7 @@ int utc_media_recorder_unset_interrupted_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_interrupted_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -984,7 +909,7 @@ int utc_media_recorder_unset_interrupted_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset interrupted callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset interrupted callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -995,10 +920,7 @@ int utc_media_recorder_unset_interrupted_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_interrupted_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1011,7 +933,7 @@ int utc_media_recorder_unset_interrupted_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset audio stream callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset audio stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1022,10 +944,7 @@ int utc_media_recorder_unset_audio_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_audio_stream_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1038,7 +957,7 @@ int utc_media_recorder_unset_audio_stream_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset audio stream callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset audio stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1049,10 +968,7 @@ int utc_media_recorder_unset_audio_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_audio_stream_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1065,7 +981,7 @@ int utc_media_recorder_unset_audio_stream_cb_n(void)
  * @since_tizen         2.3
  * @description         To check to unset error callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset error callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1076,10 +992,7 @@ int utc_media_recorder_unset_error_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_error_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1092,7 +1005,7 @@ int utc_media_recorder_unset_error_cb_p(void)
  * @since_tizen         2.3
  * @description         To check to unset error callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset error callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1103,10 +1016,7 @@ int utc_media_recorder_unset_error_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_error_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1120,7 +1030,7 @@ int utc_media_recorder_unset_error_cb_n(void)
  * @description         To check adding device state changed callback with valid parameters.
  * @scenario            This test is for checking device state changed callback adding with valid parameters.
                         1. Add device state changed callback with valid parameters. \n
-                        2. Check microphone device which is supported or not. \n
+                        2. Check audio recording feature. \n
                         3-1. If supported, compare "ret" value with RECORDER_ERROR_NONE. \n
                         3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED. \n
                         4. Remove added callback if cb_id is valid.
@@ -1136,24 +1046,22 @@ int utc_media_recorder_add_device_state_changed_cb_p(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
 
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_start(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               utc_media_recorder_util_mainloop_run();
+       ret = recorder_start(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               recorder_remove_device_state_changed_cb(cb_id);
+       utc_media_recorder_util_mainloop_run();
 
-               recorder_cancel(recorder);
-               recorder_unprepare(recorder);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       recorder_remove_device_state_changed_cb(cb_id);
+
+       recorder_cancel(recorder);
+       recorder_unprepare(recorder);
 
        return 0;
 }
@@ -1212,7 +1120,7 @@ int utc_media_recorder_add_device_state_changed_cb_n2(void)
  * @description         To check removing device state changed callback with valid parameter.
  * @scenario            This test is for checking device state changed callback removing with valid parameter.
                         1. Add device state changed callback with valid parameters. \n
-                        2. Check microphone device which is supported or not. \n
+                        2. Check audio recording feature. \n
                         3-1. If supported, remove device state changed callback with cb_id from recorder_add_device_state_changed_cb(). \n
                         3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
  * @parameter           N/A
@@ -1227,16 +1135,14 @@ int utc_media_recorder_remove_device_state_changed_cb_p(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
-               assert_neq(cb_id, 0);
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
+
+       assert_eq(ret, RECORDER_ERROR_NONE);
+       assert_neq(cb_id, 0);
 
-               ret = recorder_remove_device_state_changed_cb(cb_id);
+       ret = recorder_remove_device_state_changed_cb(cb_id);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -1248,7 +1154,7 @@ int utc_media_recorder_remove_device_state_changed_cb_p(void)
  * @description         To check removing device state changed callback with invalid condition.
  * @scenario            This test is for checking device state changed callback removing with invalid condition.
                         1. Remove device state changed callback without adding device state changed callback. \n
-                        2. Check microphone device which is supported or not. \n
+                        2. Check audio recording feature. \n
                         3-1. If supported, compare "ret" value with RECORDER_ERROR_INVALID_OPERATION. \n
                         3-2. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
  * @parameter           N/A
@@ -1259,16 +1165,12 @@ int utc_media_recorder_remove_device_state_changed_cb_p(void)
 int utc_media_recorder_remove_device_state_changed_cb_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       int check_ret = RECORDER_ERROR_NONE;
 
        ret = recorder_remove_device_state_changed_cb(0);
 
-       if (audio_recording_supported)
-               check_ret = RECORDER_ERROR_INVALID_OPERATION;
-       else
-               check_ret = RECORDER_ERROR_NOT_SUPPORTED;
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
 
-       assert_eq(ret, check_ret);
+       assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
 
        return 0;
 }
@@ -1280,7 +1182,7 @@ int utc_media_recorder_remove_device_state_changed_cb_n1(void)
  * @description         To check removing device state changed callback with valid parameter.
  * @scenario            This test is for checking device state changed callback removing with invalid parameter.
                         1. Remove device state changed callback with invalid parameter. \n
-                        2. Check microphone device which is supported or not. \n
+                        2. Check audio recording feature. \n
                         3-1. If supported, remove device state changed callback with invalid cb_id. \n
                         3-2. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
  * @parameter           N/A
@@ -1295,18 +1197,16 @@ int utc_media_recorder_remove_device_state_changed_cb_n2(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
-               assert_neq(cb_id, 0);
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
 
-               ret = recorder_remove_device_state_changed_cb(cb_id + 100);
+       assert_eq(ret, RECORDER_ERROR_NONE);
+       assert_neq(cb_id, 0);
 
-               recorder_remove_device_state_changed_cb(cb_id);
+       ret = recorder_remove_device_state_changed_cb(cb_id + 100);
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       recorder_remove_device_state_changed_cb(cb_id);
+
+       assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -1317,7 +1217,7 @@ int utc_media_recorder_remove_device_state_changed_cb_n2(void)
  * @since_tizen         4.0
  * @description         To check muxed stream callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set muxed stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1329,10 +1229,7 @@ int utc_media_recorder_set_muxed_stream_cb_p(void)
        int ret = RECORDER_ERROR_NONE;
        int buffer_count = 0;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_muxed_stream_cb(recorder, _muxed_stream_cb, (void *)&buffer_count);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1356,7 +1253,7 @@ int utc_media_recorder_set_muxed_stream_cb_p(void)
  * @since_tizen         4.0
  * @description         To check muxed stream callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set muxed stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1367,10 +1264,7 @@ int utc_media_recorder_set_muxed_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_muxed_stream_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1384,7 +1278,7 @@ int utc_media_recorder_set_muxed_stream_cb_n(void)
  * @since_tizen         4.0
  * @description         To check to unset muxed stream callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset muxed stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1395,10 +1289,7 @@ int utc_media_recorder_unset_muxed_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_muxed_stream_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1412,7 +1303,7 @@ int utc_media_recorder_unset_muxed_stream_cb_p(void)
  * @since_tizen         4.0
  * @description         To check to unset muxed stream callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset muxed stream callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1423,10 +1314,7 @@ int utc_media_recorder_unset_muxed_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_muxed_stream_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1440,7 +1328,7 @@ int utc_media_recorder_unset_muxed_stream_cb_n(void)
  * @since_tizen         6.0
  * @description         To check video encode decision callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check video recording and camera feature. \n
                         2. Set video encode decision callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1452,20 +1340,8 @@ int utc_media_recorder_set_video_encode_decision_cb_p(void)
        int ret = RECORDER_ERROR_NONE;
        int buffer_count = 0;
        char *media_path = NULL;
-       recorder_h video_recorder = NULL;
-
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
 
-       ret = recorder_create_videorecorder(camera, &video_recorder);
-       assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_set_video_encode_decision_cb(video_recorder, _video_encode_decision_cb, (void *)&buffer_count);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1487,7 +1363,6 @@ int utc_media_recorder_set_video_encode_decision_cb_p(void)
 
        recorder_cancel(video_recorder);
        recorder_unprepare(video_recorder);
-       recorder_destroy(video_recorder);
 
        return 0;
 }
@@ -1498,7 +1373,7 @@ int utc_media_recorder_set_video_encode_decision_cb_p(void)
  * @since_tizen         6.0
  * @description         To check video encode decision callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check video recording and camera feature. \n
                         2. Set video encode decision callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1509,17 +1384,9 @@ int utc_media_recorder_set_video_encode_decision_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_set_video_encode_decision_cb(recorder, NULL, NULL);
+       ret = recorder_set_video_encode_decision_cb(video_recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1531,7 +1398,7 @@ int utc_media_recorder_set_video_encode_decision_cb_n(void)
  * @since_tizen         6.0
  * @description         To check to unset video encode decision callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check video recording and camera feature. \n
                         2. Unset video encode decision callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1542,17 +1409,9 @@ int utc_media_recorder_unset_video_encode_decision_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
-       ret = recorder_unset_video_encode_decision_cb(recorder);
+       ret = recorder_unset_video_encode_decision_cb(video_recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
@@ -1564,7 +1423,7 @@ int utc_media_recorder_unset_video_encode_decision_cb_p(void)
  * @since_tizen         6.0
  * @description         To check to unset video encode decision callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check video recording and camera feature. \n
                         2. Unset video encode decision callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1575,15 +1434,7 @@ int utc_media_recorder_unset_video_encode_decision_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!video_recording_supported) {
-               assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_VIDEO_RECORDING;
 
        ret = recorder_unset_video_encode_decision_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1597,7 +1448,7 @@ int utc_media_recorder_unset_video_encode_decision_cb_n(void)
  * @since_tizen         4.0
  * @description         To check interrupt started callback with valid pointer and parameters.
  * @scenario            This test is for checking parameters valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set interrupt started callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1608,10 +1459,7 @@ int utc_media_recorder_set_interrupt_started_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_interrupt_started_cb(recorder, _interrupt_started_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1624,7 +1472,7 @@ int utc_media_recorder_set_interrupt_started_cb_p(void)
  * @since_tizen         4.0
  * @description         To check interrupt started callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as null callback. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set invalid pointer in second parameter which is null pointer.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1635,10 +1483,7 @@ int utc_media_recorder_set_interrupt_started_cb_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_interrupt_started_cb(recorder, NULL, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1651,7 +1496,7 @@ int utc_media_recorder_set_interrupt_started_cb_n1(void)
  * @since_tizen         4.0
  * @description         To check interrupt started callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle "null". \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set invalid pointer which is recorder handle null.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1662,10 +1507,7 @@ int utc_media_recorder_set_interrupt_started_cb_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_set_interrupt_started_cb(NULL, _interrupt_started_cb, NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
@@ -1678,7 +1520,7 @@ int utc_media_recorder_set_interrupt_started_cb_n2(void)
  * @since_tizen         4.0
  * @description         To check to unset interrupt started callback with valid parameter.
  * @scenario            This test is for checking parameter valid or not. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Unset interrupt started callback.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1689,10 +1531,7 @@ int utc_media_recorder_unset_interrupt_started_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_interrupt_started_cb(recorder);
        assert_eq(ret, RECORDER_ERROR_NONE);
@@ -1705,7 +1544,7 @@ int utc_media_recorder_unset_interrupt_started_cb_p(void)
  * @since_tizen         4.0
  * @description         To check to unset interrupt started callback with invalid parameter.
  * @scenario            This test is for checking invalid pointer such as recorder handle null. \n
-                        1. Check microphone supported or not. \n
+                        1. Check audio recording feature. \n
                         2. Set invalid pointer which is recorder handle null.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
@@ -1716,10 +1555,7 @@ int utc_media_recorder_unset_interrupt_started_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!audio_recording_supported) {
-               assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
+       CHECK_FEATURE_AUDIO_RECORDING;
 
        ret = recorder_unset_interrupt_started_cb(NULL);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
index 4a1fd93aecb7806a285f1c7f4ac5686f24e0e37d..a89a61f5be1794027563bc16a6509c8e0b9e6777 100644 (file)
 
 static bool video_recording_supported = false;
 static bool audio_recording_supported = false;
+static bool camera_supported = false;
+
+static recorder_h recorder = NULL;
+
+static int startup_ret = RECORDER_ERROR_NONE;
+
+
+#define CHECK_FEATURE_AUDIO_RECORDING \
+       do {\
+               if (!audio_recording_supported) {\
+                       assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+                       return 0;\
+               }\
+       } while (0)
+
+#define CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(check_ret) \
+       do {\
+               if (!audio_recording_supported) {\
+                       assert_eq(check_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+                       return 0;\
+               }\
+       } while (0)
 
 
 /**
  * @function            utc_media_recorder_lifecycle_startup
  * @description         Called before each test. \n
-                        This is the precondition for checking apis. \n
-                        Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario            1. Check device storage supported. \n
+                        The handles are created and supported features are checked.
+ * @scenario            1. Get platform feature for recordings and camera. \n
+                        2. Create audio recorder.
  * @parameter           N/A
  * @return              N/A
  */
 void utc_media_recorder_lifecycle_startup(void)
 {
-       utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+       audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+       video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+       camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
 
-       return;
+       startup_ret = recorder_create_audiorecorder(&recorder);
+}
+
+/**
+ * @function            utc_media_recorder_lifecycle_cleanup
+ * @description         Called after each test. \n
+                        The handles are destroyed for next test. \n
+ * @scenario            1. Destroy audio recorder.
+ * @parameter           N/A
+ * @return              N/A
+ */
+void utc_media_recorder_lifecycle_cleanup(void)
+{
+       /* end of TC */
+       if (recorder) {
+               recorder_destroy(recorder);
+               recorder = NULL;
+       }
 }
 
 
@@ -71,7 +112,8 @@ int utc_media_recorder_create_audiorecorder_n(void)
  * @description         To check audio recorder creation with valid parameter.
  * @scenario            This test is for checking valid pointer and parameters.
                         1. Create audio recorder. \n
-                        2. Check microphone supported or not.
+                        2. Check audio recording feature. \n
+                        3. Destroy recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -80,16 +122,15 @@ int utc_media_recorder_create_audiorecorder_n(void)
 int utc_media_recorder_create_audiorecorder_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
+       recorder_h audio_recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       ret = recorder_create_audiorecorder(&audio_recorder);
 
-       if (!audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       } else {
-               recorder_destroy(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       }
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
+
+       recorder_destroy(audio_recorder);
+
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -99,17 +140,16 @@ int utc_media_recorder_create_audiorecorder_p(void)
  * @since_tizen         2.3
  * @description         To check recorder cancel with valid parameter.
  * @scenario            This test is for checking valid pointer and parameters.
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Set file name. \n
-                        7. Prepare recorder. \n
-                        8. Start recorder. \n
-                        9. Record for some time while sleep. \n
-                        10. Cancel recorder. \n
-                        11. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Set file name. \n
+                        6. Prepare recorder. \n
+                        7. Start recorder. \n
+                        8. Record for some time while sleep. \n
+                        9. Cancel recorder. \n
+                        10. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -118,28 +158,22 @@ int utc_media_recorder_create_audiorecorder_p(void)
 int utc_media_recorder_cancel_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_start(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = recorder_start(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               sleep(1);
+       sleep(1);
 
-               ret = recorder_cancel(recorder);
+       ret = recorder_cancel(recorder);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -149,15 +183,13 @@ int utc_media_recorder_cancel_p(void)
  * @since_tizen         2.3
  * @description         To check recorder cancel with invalid precondition.
  * @scenario            This test is for checking with invalid precondition without calling recorder_start.
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Prepare recorder. \n
-                        7. Cancel recorder. \n
-                        8. Unprepare recorder. \n
-                        9. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Prepare recorder. \n
+                        6. Cancel recorder. \n
+                        7. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -166,23 +198,17 @@ int utc_media_recorder_cancel_p(void)
 int utc_media_recorder_cancel_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_cancel(recorder);
+       ret = recorder_cancel(recorder);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
 
        return 0;
 }
@@ -192,18 +218,16 @@ int utc_media_recorder_cancel_n(void)
  * @since_tizen         2.3
  * @description         To check recorder commit with valid precondition.
  * @scenario            This test is for checking with valid parameters and preconditions.
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Set file name. \n
-                        7. Prepare recorder. \n
-                        8. Start recorder. \n
-                        9. Sleep for a while. \n
-                        10. Commit recorder. \n
-                        11. Unprepare recorder. \n
-                        12. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Set file name. \n
+                        6. Prepare recorder. \n
+                        7. Start recorder. \n
+                        8. Sleep for a while. \n
+                        9. Commit recorder. \n
+                        10. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -212,27 +236,21 @@ int utc_media_recorder_cancel_n(void)
 int utc_media_recorder_commit_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               ret |= recorder_start(recorder);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       ret |= recorder_start(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               sleep(2);
+       sleep(2);
 
-               ret = recorder_commit(recorder);
+       ret = recorder_commit(recorder);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -242,15 +260,13 @@ int utc_media_recorder_commit_p(void)
  * @since_tizen         2.3
  * @description         To check recorder commit with invalid precondition.
  * @scenario            This test is for checking without precondition such as recorder_start. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Prepare recorder. \n
-                        7. Commit recorder. \n
-                        8. Unprepare recorder. \n
-                        9. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Prepare recorder. \n
+                        6. Commit recorder. \n
+                        7. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -259,23 +275,17 @@ int utc_media_recorder_commit_p(void)
 int utc_media_recorder_commit_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_commit(recorder);
+       ret = recorder_commit(recorder);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
 
        return 0;
 }
@@ -285,11 +295,9 @@ int utc_media_recorder_commit_n(void)
  * @since_tizen         2.3
  * @description         To check video recorder creation with valid precondition.
  * @scenario            This test is for checking with proper precondition. \n
-                        1. Create camera. \n
-                        2. Check camera supported or not. \n
-                        3. Create video recorder. \n
-                        4. Destroy recorder. \n
-                        5. Destroy camera.
+                        1. Check video recording feature. \n
+                        2. Create video recorder. \n
+                        3. Destroy recorder.
  * @paramter            N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -297,29 +305,33 @@ int utc_media_recorder_commit_n(void)
  */
 int utc_media_recorder_create_videorecorder_p(void)
 {
-       recorder_h recorder = NULL;
        camera_h camera = NULL;
-       int ret = CAMERA_ERROR_NONE;
-       int ret2 = RECORDER_ERROR_NONE;
+       recorder_h video_recorder = NULL;
+       int ret_recorder = RECORDER_ERROR_NONE;
+       int ret_camera = CAMERA_ERROR_NONE;
+
+       ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+       ret_recorder = recorder_create_videorecorder(camera, &video_recorder);
 
-       ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-       if (!video_recording_supported) {
-               assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
-               return 0;
+       if (video_recording_supported) {
+               assert_eq(ret_camera, CAMERA_ERROR_NONE);
+               assert_eq(ret_recorder, RECORDER_ERROR_NONE);
        } else {
-               assert_eq(ret, CAMERA_ERROR_NONE);
+               if (camera_supported) {
+                       assert_eq(ret_camera, CAMERA_ERROR_NONE);
+                       assert_eq(ret_recorder, RECORDER_ERROR_NOT_SUPPORTED);
+               } else {
+                       assert_eq(ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
+                       assert_eq(ret_recorder, RECORDER_ERROR_INVALID_PARAMETER);
+               }
        }
 
-       ret2 = recorder_create_videorecorder(camera, &recorder);
-
-       if (recorder)
-               recorder_destroy(recorder);
+       if (video_recorder)
+               recorder_destroy(video_recorder);
 
        if (camera)
                camera_destroy(camera);
 
-       assert_eq(ret2, RECORDER_ERROR_NONE);
-
        return 0;
 }
 
@@ -336,10 +348,10 @@ int utc_media_recorder_create_videorecorder_p(void)
  */
 int utc_media_recorder_create_videorecorder_n(void)
 {
-       recorder_h recorder = NULL;
+       recorder_h _video_recorder = NULL;
        int ret = RECORDER_ERROR_NONE;
 
-       ret = recorder_create_videorecorder(NULL, &recorder);
+       ret = recorder_create_videorecorder(NULL, &_video_recorder);
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -350,9 +362,9 @@ int utc_media_recorder_create_videorecorder_n(void)
  * @since_tizen         2.3
  * @description         To check to destroy recorder with valid precondition.
  * @scenario            This test is for checking with valid precondition.
-                        1. create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Create audio recorder. \n
+                        3. Destroy recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -360,19 +372,16 @@ int utc_media_recorder_create_videorecorder_n(void)
  */
 int utc_media_recorder_destroy_p(void)
 {
-       recorder_h recorder = NULL;
+       recorder_h audio_recorder = NULL;
        int ret = RECORDER_ERROR_NONE;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = recorder_create_audiorecorder(&audio_recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_destroy(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_destroy(audio_recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -403,19 +412,17 @@ int utc_media_recorder_destroy_n(void)
  * @since_tizen         2.3
  * @description         To check to pause recorder with valid precondition.
  * @scenario            This test is for checking with valid precondition.
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Set file name. \n
-                        7. Prepare recorder. \n
-                        8. Start recorder. \n
-                        9. Sleep for a while. \n
-                        10. Pause recorder. \n
-                        11. Cancel recorder. \n
-                        12. Unprepare recorder. \n
-                        13. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Set file name. \n
+                        6. Prepare recorder. \n
+                        7. Start recorder. \n
+                        8. Sleep for a while. \n
+                        9. Pause recorder. \n
+                        10. Cancel recorder. \n
+                        11. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -424,28 +431,22 @@ int utc_media_recorder_destroy_n(void)
 int utc_media_recorder_pause_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               ret |= recorder_start(recorder);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       ret |= recorder_start(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               sleep(2);
+       sleep(2);
 
-               ret = recorder_pause(recorder);
+       ret = recorder_pause(recorder);
 
-               recorder_cancel(recorder);
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_cancel(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -455,15 +456,13 @@ int utc_media_recorder_pause_p(void)
  * @since_tizen         2.3
  * @description         To check to pause recorder with invalid precondition.
  * @scenario            This test is for checking with invalid preconditon such as recorder_start. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Prepare recorder. \n
-                        7. Pause recorder. \n
-                        8. Unprepare recorder. \n
-                        9. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Prepare recorder. \n
+                        6. Pause recorder. \n
+                        7. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -472,23 +471,17 @@ int utc_media_recorder_pause_p(void)
 int utc_media_recorder_pause_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_pause(recorder);
+       ret = recorder_pause(recorder);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
 
        return 0;
 }
@@ -498,14 +491,12 @@ int utc_media_recorder_pause_n(void)
  * @since_tizen         2.3
  * @description         To check to prepare recorder with valid precondition.
  * @scenario            This test is for checking with valid precondition. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Prepare recorder. \n
-                        7. Unprepare recorder. \n
-                        8. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Prepare recorder. \n
+                        6. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -514,21 +505,15 @@ int utc_media_recorder_pause_n(void)
 int utc_media_recorder_prepare_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -538,10 +523,8 @@ int utc_media_recorder_prepare_p(void)
  * @since_tizen         2.3
  * @description         To check prepare recorder with invalid precondition.
  * @scenario            This test is for checking with invalid precondition with default setting. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Prepare recorder. \n
-                        4. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Prepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -551,21 +534,11 @@ int utc_media_recorder_prepare_p(void)
 int utc_media_recorder_prepare_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
-
-       ret = recorder_create_audiorecorder(&recorder);
 
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               ret = recorder_prepare(recorder);
-
-               recorder_destroy(recorder);
-
-               assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_prepare(recorder);
+       assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
 
        return 0;
 }
@@ -597,17 +570,15 @@ int utc_media_recorder_prepare_n2(void)
  * @since_tizen         2.3
  * @description         To check to start recorder with valid precondition.
  * @scenario            This test is for checking with valid precondition. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Set file name. \n
-                        7. Prepare recorder. \n
-                        8. Start recorder. \n
-                        9. Cancel recorder. \n
-                        10. Unprepare recorder. \n
-                        11. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Set file name. \n
+                        6. Prepare recorder. \n
+                        7. Start recorder. \n
+                        8. Cancel recorder. \n
+                        9. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -616,24 +587,18 @@ int utc_media_recorder_prepare_n2(void)
 int utc_media_recorder_start_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
 
-       ret = recorder_create_audiorecorder(&recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               ret = recorder_start(recorder);
+       ret = recorder_start(recorder);
 
-               recorder_cancel(recorder);
-               recorder_unprepare(recorder);
-               recorder_destroy(recorder);
+       recorder_cancel(recorder);
+       recorder_unprepare(recorder);
 
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -643,10 +608,8 @@ int utc_media_recorder_start_p(void)
  * @since_tizen         2.3
  * @description         To check to start recorder with invalid precondition.
  * @scenario            This test is for checking with invalid precondition such as recorder_prepare. \n
-                        1. Create audiorecorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Start recorder. \n
-                        4. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Start recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -655,21 +618,11 @@ int utc_media_recorder_start_p(void)
 int utc_media_recorder_start_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
-
-       ret = recorder_create_audiorecorder(&recorder);
-
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
-
-               ret = recorder_start(recorder);
 
-               recorder_destroy(recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_start(recorder);
+       assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
 
        return 0;
 }
@@ -679,14 +632,12 @@ int utc_media_recorder_start_n(void)
  * @since_tizen         2.3
  * @description         To check to unprepare recorder with valid precondition.
  * @scenario            This test is for checking with valid precondition. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Check supported audio encoder and file format. \n
-                        4. Set supported audio encoder. \n
-                        5. Set supported file format. \n
-                        6. Prepare recorder. \n
-                        7. Unprepare recorder. \n
-                        8. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Check supported audio encoder and file format. \n
+                        3. Set supported audio encoder. \n
+                        4. Set supported file format. \n
+                        5. Prepare recorder. \n
+                        6. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -695,22 +646,14 @@ int utc_media_recorder_start_n(void)
 int utc_media_recorder_unprepare_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
-
-       ret = recorder_create_audiorecorder(&recorder);
 
-       if (audio_recording_supported) {
-               ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               ret = recorder_unprepare(recorder);
+       ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
-               recorder_destroy(recorder);
-
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_unprepare(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -720,10 +663,8 @@ int utc_media_recorder_unprepare_p(void)
  * @since_tizen         2.3
  * @description         To check to unprepare recorder with invalid precondition.
  * @scenario            This test is for checking with invalid precondition such as recorder_prepare. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Unprepare recorder. \n
-                        4. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Unprepare recorder.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -732,21 +673,11 @@ int utc_media_recorder_unprepare_p(void)
 int utc_media_recorder_unprepare_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
-
-       ret = recorder_create_audiorecorder(&recorder);
-
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
-
-               ret = recorder_unprepare(recorder);
 
-               recorder_destroy(recorder);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_unprepare(recorder);
+       assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
 
        return 0;
 }
@@ -778,34 +709,22 @@ int utc_media_recorder_unprepare_n2(void)
  * @since_tizen         2.3
  * @description         To check recorder state with valid precondition.
  * @scenario            This test is for checking valid state of recorder. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Get state. \n
-                        4. Destroy recorder.
- * @parameter          N/A
- * @return             1 is the fail. You need to check log in tct tool. \n
+                        1. Check audio recording feature. \n
+                        2. Get state.
+ * @parameter           N/A
+ * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
                         The "ret" value should be success.
  */
 int utc_media_recorder_get_state_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
        recorder_state_e state = RECORDER_STATE_NONE;
 
-       ret = recorder_create_audiorecorder(&recorder);
-
-       if (audio_recording_supported) {
-               assert_eq(ret, RECORDER_ERROR_NONE);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               ret = recorder_get_state(recorder, &state);
-
-               recorder_destroy(recorder);
-
-               assert_eq(ret, RECORDER_ERROR_NONE);
-       } else {
-               assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_get_state(recorder, &state);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -837,10 +756,8 @@ int utc_media_recorder_get_state_n1(void)
  * @since_tizen         2.3
  * @description         To check recorder state with invalid parameter.
  * @scenario            This test is for checking invalid parameter such as null. \n
-                        1. Create audio recorder. \n
-                        2. Check microphone supported or not. \n
-                        3. Get state. \n
-                        4. Destroy recorder.
+                        1. Check audio recording feature. \n
+                        2. Get state.
  * @parameter           N/A
  * @return              1 is the fail. You need to check log in tct tool. \n
                         0 is the success. \n
@@ -849,19 +766,11 @@ int utc_media_recorder_get_state_n1(void)
 int utc_media_recorder_get_state_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       recorder_h recorder = NULL;
-
-       ret = recorder_create_audiorecorder(&recorder);
 
-       if (audio_recording_supported) {
-               ret = recorder_get_state(recorder, NULL);
+       CHECK_FEATURE_AUDIO_RECORDING;
 
-               recorder_destroy(recorder);
-
-               assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
-       } else {
-               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
-       }
+       ret = recorder_get_state(recorder, NULL);
+       assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -872,7 +781,7 @@ int utc_media_recorder_get_state_n2(void)
  * @description         To check device state with valid value in parameters.
  * @scenario            This test is for checking device state getting with valid parameters.
                         1. Get device state with valid parameters. \n
-                        2. Check microphone which is supported or not. \n
+                        2. Check audio recording feature. \n
                         3-1. If supported, compare "ret" value with RECORDER_ERROR_NONE. \n
                         3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
  * @parameter           N/A
@@ -883,17 +792,13 @@ int utc_media_recorder_get_state_n2(void)
 int utc_media_recorder_get_device_state_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
-       int check_ret = RECORDER_ERROR_NONE;
        recorder_device_state_e device_state = RECORDER_DEVICE_STATE_IDLE;
 
        ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, &device_state);
 
-       if (audio_recording_supported)
-               check_ret = RECORDER_ERROR_NONE;
-       else
-               check_ret = RECORDER_ERROR_NOT_SUPPORTED;
+       CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
 
-       assert_eq(ret, check_ret);
+       assert_eq(ret, RECORDER_ERROR_NONE);
 
        return 0;
 }
@@ -916,7 +821,6 @@ int utc_media_recorder_get_device_state_n1(void)
        recorder_device_state_e device_state = RECORDER_DEVICE_STATE_IDLE;
 
        ret = recorder_get_device_state(-1, &device_state);
-
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -939,7 +843,6 @@ int utc_media_recorder_get_device_state_n2(void)
        int ret = RECORDER_ERROR_NONE;
 
        ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, NULL);
-
        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
 
        return 0;
index 09c95e64b6dd07e0426d7f8b27b36e545d35263e..da2a2c5fd1e31193924f7ca1b337782bfdf0c333 100644 (file)
@@ -160,17 +160,18 @@ int utc_media_recorder_util_prepare_audio_recorder(recorder_h recorder)
        return ret;
 }
 
-void utc_media_recorder_util_get_recording_supported(bool *audio_recording_supported, bool *video_recording_supported)
+bool utc_media_recorder_util_get_feature_supported(const char *feature)
 {
-       if (audio_recording_supported) {
-               system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", audio_recording_supported);
-               dlog_print(DLOG_INFO, LOG_TAG, "Feature: Audio Recording [%d]", *audio_recording_supported);
-       }
+       int ret = SYSTEM_INFO_ERROR_NONE;
+       bool supported = false;
 
-       if (video_recording_supported) {
-               system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", video_recording_supported);
-               dlog_print(DLOG_INFO, LOG_TAG, "Feature: Video Recording [%d]", *video_recording_supported);
-       }
+       ret = system_info_get_platform_bool(feature, &supported);
+       if (ret != SYSTEM_INFO_ERROR_NONE)
+               dlog_print(DLOG_WARN, LOG_TAG, "Feature[%s] get failed[0x%x]", feature, ret);
+
+       dlog_print(DLOG_INFO, LOG_TAG, "Feature[%s] [%s]", feature, supported ? "TRUE" : "FALSE");
+
+       return supported;
 }
 
 gboolean utc_media_recorder_util_mainloop_quit(gpointer user_data)
index b81f615a55ec2933aab3c7d6eef06f003f579c8c..f71353702717a43811688f2176b0895677aa79c4 100644 (file)
 
 #include <glib.h>
 
+#define FEATURE_AUDIO_RECORDING     "http://tizen.org/feature/media.audio_recording"
+#define FEATURE_VIDEO_RECORDING     "http://tizen.org/feature/media.video_recording"
+#define FEATURE_CAMERA              "http://tizen.org/feature/camera"
+
 bool _audio_encoder_cb(recorder_audio_codec_e codec, void *user_data);
 bool _file_format_cb(recorder_file_format_e format, void *user_data);
 
 int utc_media_recorder_util_prepare_audio_recorder(recorder_h recorder);
 void utc_media_recorder_util_get_media_path(char **media_path);
-void utc_media_recorder_util_get_recording_supported(bool *audio_recording_supported, bool *video_recording_supported);
+bool utc_media_recorder_util_get_feature_supported(const char *feature);
 
 gboolean utc_media_recorder_util_mainloop_quit(gpointer user_data);
 void utc_media_recorder_util_mainloop_run(void);