[UTC][widget_service][Non-ACR][Fix not checked logic and using ui_app_exit]
authorHyunho Kang <hhstark.kang@samsung.com>
Tue, 12 Jul 2016 08:04:45 +0000 (17:04 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 12 Jul 2016 08:04:45 +0000 (17:04 +0900)
Change-Id: I302e28e83639cd6d4cb15f1d13b01148e276d40c
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/utc/widget_service/tct-widget_service-core.c
src/utc/widget_service/utc-widget_service.c

index 114ad89..00c1eb6 100755 (executable)
@@ -96,7 +96,6 @@ static void app_control(app_control_h app_control, void *data)
 \r
                        CLOSE_UTC_ERRLOG();\r
                        FREE_MEMORY_TC(pszGetTCName);\r
-                       ui_app_exit();\r
                        return;\r
                }\r
        }\r
@@ -104,7 +103,6 @@ static void app_control(app_control_h app_control, void *data)
        dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName);\r
        PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName);\r
        FREE_MEMORY_TC(pszGetTCName);\r
-       ui_app_exit();\r
        return;\r
 }\r
 \r
index f38c1c2..4e3ddd4 100755 (executable)
@@ -30,6 +30,7 @@
 #include <widget_viewer_evas.h>
 
 #include "assert.h"
+#include "assert_common.h"
 #include "tct_app_common.h"
 
 #define SAMPLE_NAME            "sample"
@@ -42,10 +43,16 @@ static struct info {
        int is_asserted;
        bool appwidget_supported;
 } s_info = {
-               .is_asserted = 0,
-               .appwidget_supported = 0
+       .is_asserted = 0,
+       .appwidget_supported = 0
 };
 
+static int lifecycle_resume;
+static int result = -1;
+
+typedef int (*test_case_cb)(Evas_Object *widget);
+int add_a_sample_widget(test_case_cb cb);
+
 
 /**
  * Setup the TC environment
@@ -96,12 +103,13 @@ int utc_widget_service_get_size_n(void)
        ret = widget_service_get_size(WIDGET_SIZE_TYPE_UNKNOWN, &w, &h);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED); 
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -118,20 +126,21 @@ int utc_widget_service_get_size_type_n(void)
        /* Out-param is NULL */
        ret = widget_service_get_size_type(1, 1, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
        /* Invalid width & height */
        ret = widget_service_get_size_type(1, 1, &type);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -148,12 +157,13 @@ int utc_widget_service_get_need_of_mouse_event_n(void)
        /* Package name is not valid */
        ret = widget_service_get_need_of_mouse_event(NULL, WIDGET_SIZE_TYPE_2x2, &mouse_event);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -169,12 +179,13 @@ int utc_widget_service_get_need_of_touch_effect_n(void)
 
        ret = widget_service_get_need_of_touch_effect(NULL, WIDGET_SIZE_TYPE_2x2, &touch_effect);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -190,12 +201,13 @@ int utc_widget_service_get_need_of_frame_n(void)
 
        ret = widget_service_get_need_of_frame(NULL, WIDGET_SIZE_TYPE_2x2, &frame);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -210,10 +222,10 @@ int utc_widget_service_trigger_update_n(void)
 
        ret = widget_service_trigger_update(NULL, NULL, NULL, 0);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        /**
@@ -222,6 +234,7 @@ int utc_widget_service_trigger_update_n(void)
         *  If it is okay for security view.
         */
 
+       normal_exit(0);
        return 0;
 }
 
@@ -236,12 +249,13 @@ int utc_widget_service_change_period_n(void)
 
        ret = widget_service_change_period(NULL, NULL, -0.1f);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -256,12 +270,13 @@ int utc_widget_service_get_widget_list_n(void)
 
        ret = widget_service_get_widget_list(NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -275,11 +290,12 @@ int utc_widget_service_get_main_app_id_n(void)
        char *ret;
 
        ret = widget_service_get_main_app_id(NEGATIVE_SAMPLE_WIDGET);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_main_app_id(NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -294,12 +310,13 @@ int utc_widget_service_get_widget_list_by_pkgid_n(void)
 
        ret = widget_service_get_widget_list_by_pkgid(NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -313,11 +330,12 @@ int utc_widget_service_get_widget_id_n(void)
        char *ret;
 
        ret = widget_service_get_widget_id(NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_widget_id(NEGATIVE_SAMPLE_WIDGET);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -331,11 +349,12 @@ int utc_widget_service_get_app_id_of_setup_app_n(void)
        char *ret;
 
        ret = widget_service_get_app_id_of_setup_app(NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_app_id_of_setup_app(NEGATIVE_SAMPLE_WIDGET);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -349,11 +368,12 @@ int utc_widget_service_get_package_id_n(void)
        char *ret;
 
        ret = widget_service_get_package_id(NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_package_id(NEGATIVE_SAMPLE_WIDGET);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -367,11 +387,12 @@ int utc_widget_service_get_name_n(void)
        char *ret;
 
        ret = widget_service_get_name(NULL, NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_name(NEGATIVE_SAMPLE_WIDGET, NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -385,14 +406,15 @@ int utc_widget_service_get_preview_image_path_n(void)
        char *ret;
 
        ret = widget_service_get_preview_image_path(NULL, WIDGET_SIZE_TYPE_UNKNOWN);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_preview_image_path(NEGATIVE_SAMPLE_WIDGET, WIDGET_SIZE_TYPE_UNKNOWN);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_preview_image_path(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_1x1);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -406,11 +428,12 @@ int utc_widget_service_get_icon_n(void)
        char *ret;
 
        ret = widget_service_get_icon(NULL, NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
        ret = widget_service_get_icon(NEGATIVE_SAMPLE_WIDGET, NULL);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -427,12 +450,13 @@ int utc_widget_service_get_nodisplay_n(void)
        if (ret == 0)
                ret = get_last_result();
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -450,45 +474,44 @@ int utc_widget_service_get_supported_sizes_n(void)
 
        ret = widget_service_get_supported_sizes(NULL, NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, (int **)&w, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_sizes(NEGATIVE_SAMPLE_WIDGET, &cnt, (int **)&w, (int **)&h);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NOT_EXIST);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_EXIST);
        }
-
-
+       normal_exit(0);
        return 0;
 }
 
@@ -505,69 +528,70 @@ int utc_widget_service_get_supported_size_types_n(void)
 
        ret = widget_service_get_supported_size_types(NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(NULL, &cnt, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(NULL, NULL, &size_types);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, &cnt, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(NULL, &cnt, &size_types);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, NULL, &size_types);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_supported_size_types(NEGATIVE_SAMPLE_WIDGET, &cnt, &size_types);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
-               assert_eq(cnt, 0);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(cnt, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -582,12 +606,13 @@ int utc_widget_service_get_widget_instance_list_n(void)
 
        ret = widget_service_get_widget_instance_list(NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -602,13 +627,14 @@ int utc_widget_service_set_lifecycle_event_cb_n(void)
 
        ret = widget_service_set_lifecycle_event_cb(NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
-       return 0;
+       normal_exit(0);
+return 0;;
 }
 
 /**
@@ -621,11 +647,12 @@ int utc_widget_service_unset_lifecycle_event_cb_n(void)
        int ret;
        ret = widget_service_unset_lifecycle_event_cb(SAMPLE_WIDGET, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NOT_EXIST);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_EXIST);
        }
+       normal_exit(0);
        return 0;
 }
 
@@ -640,36 +667,37 @@ int utc_widget_service_get_content_of_widget_instance_n(void)
 
        ret = widget_service_get_content_of_widget_instance(NULL, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, "error", NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
        ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, "error", NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -689,12 +717,13 @@ int utc_widget_service_get_size_p(void)
 
        ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -712,22 +741,23 @@ int utc_widget_service_get_size_type_p(void)
 
        ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        ret = widget_service_get_size_type(w, h, &type);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
-               assert_eq(type, WIDGET_SIZE_TYPE_2x2);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(type, WIDGET_SIZE_TYPE_2x2);
        }
 
 
+       normal_exit(0);
        return 0;
 }
 
@@ -744,12 +774,13 @@ int utc_widget_service_get_need_of_mouse_event_p(void)
        /* Package name is not valid */
        ret = widget_service_get_need_of_mouse_event(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &mouse_event);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -765,13 +796,14 @@ int utc_widget_service_get_need_of_touch_effect_p(void)
 
        ret = widget_service_get_need_of_touch_effect(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &touch_effect);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
-               assert_eq(touch_effect, false);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(touch_effect, false);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -787,15 +819,59 @@ int utc_widget_service_get_need_of_frame_p(void)
 
        ret = widget_service_get_need_of_frame(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &frame);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
+static int __list_cb(const char *widget_id, const char *instance_id, void *data)
+{
+       int ret;
+       bundle *b;
+
+       if (strcmp(widget_id, "org.tizen.sample_widget")) {
+               normal_exit(0);
+               return WIDGET_ERROR_NONE;
+       }
+
+       b = bundle_create();
+       if (b == NULL)
+               return WIDGET_ERROR_OUT_OF_MEMORY;
+
+       bundle_add_str(b, "CI_KEY", "CI_VALUE");
+
+       ret = widget_service_trigger_update(widget_id, instance_id, b, true);
+       if (s_info.appwidget_supported == false) {
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+       }
+
+       bundle_free(b);
+
+       normal_exit(0);
+       return WIDGET_ERROR_NONE;
+}
+
+static int tc_trigger_update_p_callback(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_service_get_widget_instance_list("org.tizen.sample_widget", __list_cb, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+       }
+
+       return ret;
+}
+
 /**
  * @testcase           utc_widget_service_trigger_update_p
  * @since_tizen                2.3.1
@@ -809,12 +885,12 @@ int utc_widget_service_trigger_update_p(void)
         * @note
         * TC could not trigger the update, because the TC is not packaged in with Sample Widget
         */
-       ret = widget_service_trigger_update(SAMPLE_WIDGET, NULL, NULL, 1);
+       ret = add_a_sample_widget(tc_trigger_update_p_callback);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_PERMISSION_DENIED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        return 0;
@@ -828,12 +904,13 @@ typedef int (*test_case_cb)(Evas_Object *widget);
 static int tct_async_ret_callback(test_case_cb cb, struct widget_evas_event_info *info)
 {
        assert_neq(info, NULL);
-       assert_eq(info->error, WIDGET_ERROR_NONE);
+       assert_eq_with_exit(info->error, WIDGET_ERROR_NONE);
        assert_neq(info->widget_app_id, NULL);
-       assert_eq(strcmp(info->widget_app_id, "org.tizen.sample_widget"), 0);
-       assert_eq(info->event, WIDGET_EVENT_CREATED);
+       assert_eq_with_exit(strcmp(info->widget_app_id, "org.tizen.sample_widget"), 0);
+       assert_eq_with_exit(info->event, WIDGET_EVENT_CREATED);
 
-       return 0;
+       normal_exit(0);
+       return 0;;
 }
 
 static void _widget_create_cb(void *data, Evas_Object *obj, void *event_info)
@@ -845,43 +922,59 @@ static void _widget_create_cb(void *data, Evas_Object *obj, void *event_info)
        ret = tct_async_ret_callback(cb, info);
        s_info.is_asserted = ret;
        if (!ret && cb) {
-               cb(obj);
+               result = cb(obj);
        }
 }
 
+
+Evas_Object *_win;
 static int __lifecycle_cb(const char *widget_id, widget_lifecycle_event_e lifecycle_event,
                const char *widget_instance_id, void *data)
 {
-       if (lifecycle_event == WIDGET_LIFE_CYCLE_EVENT_RESUME &&
-                       s_info.is_asserted == 0)
-               elm_exit();
+       int ret;
+       if (lifecycle_event == WIDGET_LIFE_CYCLE_EVENT_RESUME)
+               lifecycle_resume = 1;
+
+       if (result != -1 && lifecycle_resume) {
+               widget_service_unset_lifecycle_event_cb("org.tizen.sample_widget", NULL);
+               ret = widget_viewer_evas_fini();
+               if (s_info.appwidget_supported == false) {
+                       assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
+                       return WIDGET_ERROR_NOT_SUPPORTED;
+               } else {
+                       assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+               }
+               evas_object_del(_win);
 
+               elm_exit();
+               normal_exit(0);
+       }
        return 0;
 }
 
 int add_a_sample_widget(test_case_cb cb)
 {
-       Evas_Object *win;
+
        Evas_Object *widget;
        int w, h;
        int ret;
 
-       win = elm_win_add(NULL, "sample_widget", ELM_WIN_BASIC);
-       assert_neq(win, NULL);
-       evas_object_size_hint_weight_set(win, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       _win = elm_win_add(NULL, "sample_widget", ELM_WIN_BASIC);
+       assert_neq(_win, NULL);
+       evas_object_size_hint_weight_set(_win, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-       ret = widget_viewer_evas_init(win);
+       ret = widget_viewer_evas_init(_win);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
                return WIDGET_ERROR_NOT_SUPPORTED;
        } else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
-       evas_object_show(win);
+       evas_object_show(_win);
 
-       widget = widget_viewer_evas_add_widget(win, "org.tizen.sample_widget", NULL, 0.0f);
+       widget = widget_viewer_evas_add_widget(_win, "org.tizen.sample_widget", NULL, 0.0f);
        if (s_info.appwidget_supported == false) {
-               assert_eq(widget, NULL);
+               assert_eq_with_exit(widget, NULL);
                return WIDGET_ERROR_NOT_SUPPORTED;
        } else {
                assert_neq(widget, NULL);
@@ -891,10 +984,10 @@ int add_a_sample_widget(test_case_cb cb)
 
        ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
                return WIDGET_ERROR_NOT_SUPPORTED;
        } else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        widget_service_set_lifecycle_event_cb("org.tizen.sample_widget", __lifecycle_cb, NULL);
@@ -902,19 +995,7 @@ int add_a_sample_widget(test_case_cb cb)
        evas_object_show(widget);
 
        elm_run();
-
-       widget_service_unset_lifecycle_event_cb("org.tizen.sample_widget", NULL);
-       ret = widget_viewer_evas_fini();
-       if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
-               return WIDGET_ERROR_NOT_SUPPORTED;
-       } else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
-       }
-
-       evas_object_del(win);
-
-       return s_info.is_asserted;
+       return WIDGET_ERROR_NONE;
 }
 /* Common routines for creating a widget instance - END*/
 
@@ -940,7 +1021,7 @@ static int tc_change_period_p_callback(Evas_Object *widget)
        if (s_info.appwidget_supported == false) {
                assert_neq(ret, WIDGET_ERROR_NONE);
        } else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        return ret;
@@ -957,9 +1038,9 @@ int utc_widget_service_change_period_p(void)
 
        ret = add_a_sample_widget(tc_change_period_p_callback);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        } else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        return s_info.is_asserted;
@@ -967,6 +1048,7 @@ int utc_widget_service_change_period_p(void)
 
 static int widget_list_cb_p(const char *pkgid, const char *widget_id, int is_prime, void *data)
 {
+       normal_exit(0);
        return 0;
 }
 
@@ -984,11 +1066,12 @@ int utc_widget_service_get_widget_list_p(void)
         */
        ret = widget_service_get_widget_list(widget_list_cb_p, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        } else {
                assert_neq(ret, WIDGET_ERROR_NOT_EXIST);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1006,21 +1089,23 @@ int utc_widget_service_get_main_app_id_p(void)
 
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
                result = strcmp(ret, SAMPLE_WIDGET);
                free(ret);
-               assert_eq(result, 0);
+               assert_eq_with_exit(result, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
 
 static int utc_widget_service_get_widget_list_by_pkgid_p_cb(const char *widget_id, int is_primary, void *data)
 {
+       normal_exit(0);
        return 0;
 }
 
@@ -1034,12 +1119,13 @@ int utc_widget_service_get_widget_list_by_pkgid_p(void)
        int ret;
        ret = widget_service_get_widget_list_by_pkgid(SAMPLE_WIDGET, utc_widget_service_get_widget_list_by_pkgid_p_cb, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, 1);
+               assert_eq_with_exit(ret, 1);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1056,7 +1142,7 @@ int utc_widget_service_get_widget_id_p(void)
        ret = widget_service_get_widget_id(SAMPLE_WIDGET);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
@@ -1064,10 +1150,11 @@ int utc_widget_service_get_widget_id_p(void)
                result = strcmp(ret, SAMPLE_WIDGET);
                free(ret);
 
-               assert_eq(result, 0);
+               assert_eq_with_exit(result, 0);
        }
 
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1081,8 +1168,9 @@ int utc_widget_service_get_app_id_of_setup_app_p(void)
        char *ret;
 
        ret = widget_service_get_app_id_of_setup_app(SAMPLE_WIDGET);
-       assert_eq(ret, NULL);
+       assert_eq_with_exit(ret, NULL);
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1099,7 +1187,7 @@ int utc_widget_service_get_package_id_p(void)
        ret = widget_service_get_package_id(SAMPLE_WIDGET);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
@@ -1107,9 +1195,10 @@ int utc_widget_service_get_package_id_p(void)
                result = strcmp(ret, SAMPLE_PKGNAME);
                free(ret);
 
-               assert_eq(result, 0);
+               assert_eq_with_exit(result, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1125,13 +1214,14 @@ int utc_widget_service_get_name_p(void)
        ret = widget_service_get_name(SAMPLE_WIDGET, NULL);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
                free(ret);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1148,7 +1238,7 @@ int utc_widget_service_get_preview_image_path_p(void)
        ret = widget_service_get_preview_image_path(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
@@ -1157,6 +1247,7 @@ int utc_widget_service_get_preview_image_path_p(void)
                assert_neq(result, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1173,7 +1264,7 @@ int utc_widget_service_get_icon_p(void)
        ret = widget_service_get_icon(SAMPLE_WIDGET, NULL);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, NULL);
+               assert_eq_with_exit(ret, NULL);
        }
        else {
                assert_neq(ret, NULL);
@@ -1182,6 +1273,7 @@ int utc_widget_service_get_icon_p(void)
                assert_neq(result, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1196,9 +1288,10 @@ int utc_widget_service_get_nodisplay_p(void)
 
        if (s_info.appwidget_supported == true) {
                ret = widget_service_get_nodisplay(SAMPLE_WIDGET);
-               assert_eq(ret, 0);
+               assert_eq_with_exit(ret, 0);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1219,23 +1312,24 @@ int utc_widget_service_get_supported_sizes_p(void)
        ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, &w, &h);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
 
-               assert_eq(cnt, 1);
+               assert_eq_with_exit(cnt, 1);
 
                ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &sw, &sh);
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
 
-               assert_eq(w[0], sw);
-               assert_eq(h[0], sh);
+               assert_eq_with_exit(w[0], sw);
+               assert_eq_with_exit(h[0], sh);
 
                free(w);
                free(h);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1253,23 +1347,25 @@ int utc_widget_service_get_supported_size_types_p(void)
        ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, &cnt, &size_types);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
-               assert_eq(cnt, 1);
-               assert_eq(size_types[0], WIDGET_SIZE_TYPE_2x2);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(cnt, 1);
+               assert_eq_with_exit(size_types[0], WIDGET_SIZE_TYPE_2x2);
 
                free(size_types);
        }
 
 
 
+       normal_exit(0);
        return 0;
 }
 
 static int utc_widget_instance_list_cb_p(const char *widget_id, const char *instance_id, void *data)
 {
+       normal_exit(0);
        return 0;
 }
 
@@ -1294,17 +1390,19 @@ int utc_widget_service_get_widget_instance_list_p(void)
        ret = add_a_sample_widget(tc_get_widget_instance_list_p_callback);
 
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
 static int widget_lifecycle_event_cb_p(const char *widget_id, widget_lifecycle_event_e lifecycle_event, const char *widget_instance_id, void *data)
 {
+       normal_exit(0);
        return 0;
 }
 
@@ -1319,20 +1417,21 @@ int utc_widget_service_set_lifecycle_event_cb_p(void)
 
        ret = widget_service_set_lifecycle_event_cb(NULL, widget_lifecycle_event_cb_p, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        ret = widget_service_unset_lifecycle_event_cb(NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1347,20 +1446,21 @@ int utc_widget_service_unset_lifecycle_event_cb_p(void)
 
        ret = widget_service_set_lifecycle_event_cb(NULL, widget_lifecycle_event_cb_p, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
        ret = widget_service_unset_lifecycle_event_cb(NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NONE);
        }
 
+       normal_exit(0);
        return 0;
 }
 
@@ -1379,12 +1479,13 @@ int utc_widget_service_get_content_of_widget_instance_p(void)
         */
        ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, NULL, NULL);
        if (s_info.appwidget_supported == false) {
-               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               assert_eq_with_exit(ret, WIDGET_ERROR_NOT_SUPPORTED);
        }
        else {
-               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+               assert_eq_with_exit(ret, WIDGET_ERROR_INVALID_PARAMETER);
        }
 
+       normal_exit(0);
        return 0;
 }