[UTC/ITC][context][ACR-1068, ACR-1069][Added history feature]
authorSomin Kim <somin926.kim@samsung.com>
Tue, 19 Sep 2017 09:45:43 +0000 (18:45 +0900)
committerSomin Kim <somin926.kim@samsung.com>
Thu, 28 Sep 2017 05:18:14 +0000 (05:18 +0000)
Change-Id: I8ed91e3feb22792c428fbaebfe8cd3079e46bfca
Signed-off-by: Somin Kim <somin926.kim@samsung.com>
12 files changed:
packaging/utc/core-context-tests.spec
src/itc/context/CMakeLists.txt
src/itc/context/ITs-context-common.c
src/itc/context/ITs-context-common.h
src/itc/context/ITs-context-history.c
src/itc/context/tct-context-native_wearable.h
src/utc/context/CMakeLists.txt
src/utc/context/tct-context-core.c
src/utc/context/tct-context-core_wearable.h
src/utc/context/utc-context-common.h
src/utc/context/utc-context-history.c
tct_unsupported.txt

index bc1ef75..911068b 100755 (executable)
@@ -8,10 +8,6 @@ Group:      Development/Tools
 License:    Apache License, Version 2.0, Samsung Properietary
 Source0:    %{name}-%{version}.tar.gz
 
-%if "%{?profile}" == "wearable"
-ExcludeArch: %{arm} %ix86 x86_64
-%endif
-
 %if "%{?profile}" == "tv"
 ExcludeArch: %{arm} %ix86 x86_64
 %endif
index fa39939..c4edd09 100755 (executable)
@@ -4,11 +4,21 @@ SET(EXEC_NAME "tct-${PKG_NAME}-native")
 SET(RPM_NAME "native-${PKG_NAME}-itc")
 
 SET(CAPI_LIB "context")
+
+IF(DEFINED MOBILE)
 SET(TC_SOURCES
     ITs-context-common.c
        ITs-context-history.c
        ITs-context-trigger.c
 )
+ENDIF()
+
+IF(DEFINED WEARABLE)
+SET(TC_SOURCES
+    ITs-context-common.c
+    ITs-context-history.c
+)
+ENDIF()
 
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
     ${CAPI_LIB}
index 56f2b25..906513b 100755 (executable)
@@ -96,6 +96,7 @@ char* ContextHistoryGetError(int nRet)
        return pszErrorVal;
 }
 
+#ifdef MOBILE
 /**
 * @function            ContextTriggerGetError
 * @description         Maps error enums to string values
@@ -211,5 +212,6 @@ char* ContextTriggerEvent(context_trigger_event_e eTriggerEvent)
 
        return pszTriggerEvent;
 }
+#endif //MOBILE
 
-/** @} */ //end of itc-context
\ No newline at end of file
+/** @} */ //end of itc-context
index 6857f64..9138dcd 100755 (executable)
 
 #include "tct_common.h"
 #include "tct_app_common.h"
-#include "context_history.h"
-#include "context_trigger.h"
+#include <context_history.h>
+#ifdef MOBILE
+#include <context_trigger.h>
+#endif //MOBILE
 
 /** @addtogroup itc-context
 * @ingroup             itc
 * @{
 */
 
+bool g_bHistoryMismatch;
+bool g_bHistoryNotSupported;
+bool g_bIsHistoryFeatureSupported;
+#ifdef MOBILE
 bool g_bTriggerMismatch;
 bool g_bTriggerNotSupported;
 bool g_bIsTriggerFeatureSupported;
+#endif //MOBILE
 
 //Add test package related includes here
+#define HISTORY_FEATURE                                "http://tizen.org/feature/app_history"
+#define BATTERY_FEATURE                                "http://tizen.org/feature/battery"
+#ifdef MOBILE
 #define TRIGGER_FEATURE                                "http://tizen.org/feature/contextual_trigger"
+#endif //MOBILE
 
 #define API_NAMESPACE                          "Context_ITC"
 #define RECORD_INT_KEY                         CONTEXT_HISTORY_TOTAL_COUNT
@@ -44,16 +55,32 @@ bool g_bIsTriggerFeatureSupported;
 #define ADD_COMP_INT_VAL                       960
 #define ADD_OPTION_INT_VAL                     1
 
+#ifdef MOBILE
 #define CONTEXT_TEST_PACKAGE_ID "native-context-itc"
 #define CUSTOM_ITEM_WEATHER "weather"
 #define CUSTOM_WEATHER_TEMPLATE "{ \"temperature\": { \"type\": \"integer\", \"minimum\": -50, \"maximum\": 50}, \"status\": { \"enum\": [ \"sunny\", \"snowy\", \"cloudy\", \"rainy\"]} }"
 #define CUSTOM_WEATHER_DATA1 "{\"temperature\": 30, \"status\":\"sunny\"}"
-#define BATTERY_FEATURE                                "http://tizen.org/feature/battery"
+#endif //MOBILE
 
 #define START_TEST {\
        FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
 }
 
+#define START_TEST_HISTORY {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE,__FUNCTION__);\
+       if ( g_bHistoryMismatch )\
+       {\
+               FPRINTF("[Line : %d][%s] Feature support as returned by TCTCheckSystemInfoFeatureSupported() and error code as returned by context_history_is_supported() mismatched, Leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+       else if ( g_bHistoryNotSupported )\
+       {\
+               FPRINTF("[Line : %d][%s] feature not supported, Leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 0;\
+       }\
+}
+
+#ifdef MOBILE
 #define START_TEST_TRIGGER {\
        FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE,__FUNCTION__);\
        if ( g_bTriggerMismatch )\
@@ -67,6 +94,7 @@ bool g_bIsTriggerFeatureSupported;
                return 0;\
        }\
 }
+#endif //MOBILE
 
 #define CHECK_HANDLE_CLEANUP(Handle, API, FreeResource) {\
     if ( Handle == NULL )\
@@ -79,9 +107,12 @@ bool g_bIsTriggerFeatureSupported;
 
 //Add helper function declarations here
 char* ContextHistoryGetError(int nRet);
+char* ContextHistoryGetHistoryData(context_history_data_e eDataVal);
+
+#ifdef MOBILE
 char* ContextTriggerGetError(int nRet);
 char* ContextTriggerEvent(context_trigger_event_e eTriggerEvent);
-char* ContextHistoryGetHistoryData(context_history_data_e eDataVal);
+#endif //MOBILE
 
 /** @} */ //end of itc-context
 
index dafdaeb..7f7d1e1 100755 (executable)
@@ -35,6 +35,9 @@ context_history_record_h g_history_record;
 */
 void ITs_context_history_startup(void)
 {
+       g_bHistoryMismatch = false;
+       g_bHistoryNotSupported = false;
+
        struct stat stBuff;
        if ( stat(ERR_LOG, &stBuff) == 0 )
        {
@@ -44,6 +47,19 @@ void ITs_context_history_startup(void)
        FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Context_p\\n", __LINE__, API_NAMESPACE);
 #endif
        TCT_CheckInstalledApp(2, TEST_TESTAPPLICATION_APPID, TEST_HELLOWORLD_APPID);
+
+       g_bIsHistoryFeatureSupported = TCTCheckSystemInfoFeatureSupported(HISTORY_FEATURE, API_NAMESPACE);
+
+       bool bSupported;
+       int nRet = context_history_is_supported(CONTEXT_HISTORY_RECENTLY_USED_APP, &bSupported);
+       if (!g_bIsHistoryFeatureSupported)
+       {
+               if (nRet == CONTEXT_HISTORY_ERROR_NOT_SUPPORTED) {
+                       g_bHistoryNotSupported = true;
+               } else {
+                       g_bHistoryMismatch = true;
+               }
+       }
 }
 
 /**
@@ -85,7 +101,7 @@ void ITs_context_history_cleanup(void)
 */
 int ITc_context_history_create_destroy_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        //Target API
        int nRet = context_history_create(&g_Handle);
@@ -117,7 +133,7 @@ int ITc_context_history_create_destroy_p(void)
 */
 int ITc_context_history_filter_create_destroy_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        //Target API
        int nRet = context_history_filter_create(&g_filter);
@@ -148,7 +164,7 @@ int ITc_context_history_filter_create_destroy_p(void)
 */
 int ITc_context_history_filter_set_int_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet = context_history_filter_create(&g_filter);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_create", ContextHistoryGetError(nRet));
@@ -181,15 +197,15 @@ int ITc_context_history_filter_set_int_p(void)
 */
 int ITc_context_history_filter_set_string_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet = context_history_filter_create(&g_filter);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_create", ContextHistoryGetError(nRet));
-
+#ifdef MOBILE
        //Target API
        nRet = context_history_filter_set_string(g_filter, CONTEXT_HISTORY_FILTER_APP_ID, TEST_TESTAPPLICATION_APPID);
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_string", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter));
-
+#endif //MOBILE
        nRet = context_history_filter_destroy(g_filter);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_destroy", ContextHistoryGetError(nRet));
 
@@ -215,7 +231,7 @@ int ITc_context_history_filter_set_string_p(void)
 */
 int ITc_context_history_get_list_destroy_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet = context_history_create(&g_Handle);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_create", ContextHistoryGetError(nRet));
@@ -230,7 +246,14 @@ int ITc_context_history_get_list_destroy_p(void)
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_int", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, g_filter, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_BATTERY_USAGE, g_filter, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_BATTERY_USAGE. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_filter_destroy(g_filter);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
@@ -264,7 +287,7 @@ int ITc_context_history_get_list_destroy_p(void)
 */
 int ITc_context_history_list_get_count_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nListCount;
 
@@ -280,7 +303,14 @@ int ITc_context_history_list_get_count_p(void)
        nRet = context_history_filter_set_int(g_filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, INT_VAL2);
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_int", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, g_filter, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_BATTERY_USAGE, g_filter, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_BATTERY_USAGE. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_filter_destroy(g_filter);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
@@ -317,7 +347,7 @@ int ITc_context_history_list_get_count_p(void)
 */
 int ITc_context_history_list_get_current_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet;
 
@@ -333,7 +363,14 @@ int ITc_context_history_list_get_current_p(void)
        nRet = context_history_filter_set_int(g_filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, INT_VAL2);
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_int", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, g_filter, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_BATTERY_USAGE, g_filter, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_BATTERY_USAGE. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_filter_destroy(g_filter);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
@@ -373,7 +410,7 @@ int ITc_context_history_list_get_current_p(void)
 */
 int ITc_context_history_list_move_first_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet = context_history_create(&g_Handle);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_create", ContextHistoryGetError(nRet));
@@ -387,7 +424,14 @@ int ITc_context_history_list_move_first_p(void)
        nRet = context_history_filter_set_int(g_filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, INT_VAL2);
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_int", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, g_filter, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_BATTERY_USAGE, g_filter, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_BATTERY_USAGE. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_filter_destroy(g_filter);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
@@ -424,7 +468,7 @@ int ITc_context_history_list_move_first_p(void)
 */
 int ITc_context_history_list_move_next_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nRet = context_history_create(&g_Handle);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_create", ContextHistoryGetError(nRet));
@@ -438,7 +482,14 @@ int ITc_context_history_list_move_next_p(void)
        nRet = context_history_filter_set_int(g_filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, INT_VAL2);
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_filter_set_int", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, g_filter, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_BATTERY_USAGE, g_filter, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_BATTERY_USAGE. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_filter_destroy(g_filter);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_filter_destroy(g_filter);context_history_destroy(g_Handle));
 
        //Target API
@@ -476,7 +527,7 @@ int ITc_context_history_list_move_next_p(void)
 */
 int ITc_context_history_record_get_int_string_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        int nValue = -1;
        char *sValue = NULL;
@@ -484,7 +535,13 @@ int ITc_context_history_record_get_int_string_p(void)
        int nRet = context_history_create(&g_Handle);
        PRINT_RESULT(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_create", ContextHistoryGetError(nRet));
 
-       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RARELY_USED_APP, NULL, &g_history_list);
+       nRet = context_history_get_list(g_Handle, CONTEXT_HISTORY_RECENTLY_USED_APP, NULL, &g_history_list);
+       if (nRet == CONTEXT_HISTORY_ERROR_NO_DATA)
+       {
+               FPRINTF("[Line : %d][%s] Skip context_history_get_list() for CONTEXT_HISTORY_RECENTLY_USED_APP. Data not exist.\\n", __LINE__, API_NAMESPACE);
+               context_history_destroy(g_Handle);
+               return 0;
+       }
        PRINT_RESULT_CLEANUP(CONTEXT_HISTORY_ERROR_NONE, nRet, "context_history_get_list", ContextHistoryGetError(nRet), context_history_destroy(g_Handle));
 
        nRet = context_history_list_get_current(g_history_list, &g_history_record);
@@ -548,7 +605,7 @@ int ITc_context_history_record_get_int_string_p(void)
 */
 int ITc_context_history_record_get_double_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        double nValue;
 
@@ -616,7 +673,7 @@ int ITc_context_history_record_get_double_p(void)
 */
 int ITc_context_history_get_list_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        context_history_data_e eContextHistory[]={
                                                        CONTEXT_HISTORY_RECENTLY_USED_APP,
@@ -686,7 +743,7 @@ int ITc_context_history_get_list_p(void)
 */
 int ITc_context_history_is_supported_p(void)
 {
-       START_TEST;
+       START_TEST_HISTORY;
 
        context_history_data_e eContextHistory[]={
                                                        CONTEXT_HISTORY_RECENTLY_USED_APP,
index 8e8fb81..68c6b84 100755 (executable)
@@ -21,8 +21,6 @@
 
 extern void ITs_context_history_startup(void);
 extern void ITs_context_history_cleanup(void);
-extern void ITs_context_trigger_startup(void);
-extern void ITs_context_trigger_cleanup(void);
 
 extern int ITc_context_history_create_destroy_p(void);
 extern int ITc_context_history_filter_create_destroy_p(void);
@@ -34,29 +32,6 @@ extern int ITc_context_history_list_get_current_p(void);
 extern int ITc_context_history_list_move_first_p(void);
 extern int ITc_context_history_list_move_next_p(void);
 extern int ITc_context_history_record_get_int_string_p(void);
-extern int ITc_context_trigger_rule_create_destroy_p(void);
-extern int ITc_context_trigger_rule_set_get_description_p(void);
-extern int ITc_context_trigger_rule_event_create_destroy_p(void);
-extern int ITc_context_trigger_rule_condition_create_destroy_p(void);
-extern int ITc_context_trigger_rule_add_entry_p(void);
-extern int ITc_context_trigger_rule_entry_add_key_p(void);
-extern int ITc_context_trigger_rule_entry_add_comparison_int_p(void);
-extern int ITc_context_trigger_rule_entry_add_comparison_string_p(void);
-extern int ITc_context_trigger_rule_set_action_notification_p(void);
-extern int ITc_context_trigger_rule_event_is_supported_p(void);
-extern int ITc_context_trigger_rule_condition_is_supported_p(void);
-extern int ITc_context_trigger_rule_set_action_app_control_p(void);
-extern int ITc_context_trigger_add_remove_rule_p(void);
-extern int ITc_context_trigger_get_rule_by_id_p(void);
-extern int ITc_context_trigger_enable_disable_rule_p(void);
-extern int ITc_context_trigger_get_own_rule_ids_p(void);
-extern int ITc_context_trigger_rule_entry_add_option_int_p(void);
-extern int ITc_context_trigger_rule_entry_add_option_string_p(void);
-extern int ITc_context_trigger_rule_entry_add_option_p(void);
-extern int ITc_context_trigger_custom_register_unregister_p(void);
-extern int ITc_context_trigger_custom_publish_p(void);
-extern int ITc_context_trigger_rule_custom_event_create_p(void);
-extern int ITc_context_trigger_rule_custom_condition_create_p(void);
 
 testcase tc_array[] = {
        {"ITc_context_history_create_destroy_p",ITc_context_history_create_destroy_p,ITs_context_history_startup,ITs_context_history_cleanup},
@@ -69,29 +44,6 @@ testcase tc_array[] = {
        {"ITc_context_history_list_move_first_p",ITc_context_history_list_move_first_p,ITs_context_history_startup,ITs_context_history_cleanup},
        {"ITc_context_history_list_move_next_p",ITc_context_history_list_move_next_p,ITs_context_history_startup,ITs_context_history_cleanup},
        {"ITc_context_history_record_get_int_string_p",ITc_context_history_record_get_int_string_p,ITs_context_history_startup,ITs_context_history_cleanup},
-       {"ITc_context_trigger_rule_create_destroy_p",ITc_context_trigger_rule_create_destroy_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_set_get_description_p",ITc_context_trigger_rule_set_get_description_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_event_create_destroy_p",ITc_context_trigger_rule_event_create_destroy_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_condition_create_destroy_p",ITc_context_trigger_rule_condition_create_destroy_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_add_entry_p",ITc_context_trigger_rule_add_entry_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_key_p",ITc_context_trigger_rule_entry_add_key_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_comparison_int_p",ITc_context_trigger_rule_entry_add_comparison_int_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_comparison_string_p",ITc_context_trigger_rule_entry_add_comparison_string_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_set_action_notification_p",ITc_context_trigger_rule_set_action_notification_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_event_is_supported_p",ITc_context_trigger_rule_event_is_supported_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_condition_is_supported_p",ITc_context_trigger_rule_condition_is_supported_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_set_action_app_control_p",ITc_context_trigger_rule_set_action_app_control_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_add_remove_rule_p",ITc_context_trigger_add_remove_rule_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_get_rule_by_id_p",ITc_context_trigger_get_rule_by_id_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_enable_disable_rule_p",ITc_context_trigger_enable_disable_rule_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_get_own_rule_ids_p",ITc_context_trigger_get_own_rule_ids_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_option_int_p",ITc_context_trigger_rule_entry_add_option_int_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_option_string_p",ITc_context_trigger_rule_entry_add_option_string_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_entry_add_option_p",ITc_context_trigger_rule_entry_add_option_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_custom_register_unregister_p",ITc_context_trigger_custom_register_unregister_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_custom_publish_p",ITc_context_trigger_custom_publish_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_custom_event_create_p",ITc_context_trigger_rule_custom_event_create_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
-       {"ITc_context_trigger_rule_custom_condition_create_p",ITc_context_trigger_rule_custom_condition_create_p,ITs_context_trigger_startup,ITs_context_trigger_cleanup},
        {NULL, NULL}
 };
 
index 20c2fe9..9238714 100755 (executable)
@@ -4,10 +4,18 @@ SET(EXEC_NAME "tct-${PKG_NAME}-core")
 SET(RPM_NAME "core-${PKG_NAME}-tests")
 
 SET(CAPI_LIB "context")
+
+IF(DEFINED MOBILE)
+SET(TC_SOURCES
+    utc-context-history.c
+    utc-context-trigger.c
+)
+ENDIF()
+IF(DEFINED WEARABLE)
 SET(TC_SOURCES
-       utc-context-trigger.c
     utc-context-history.c
 )
+ENDIF()
 
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
        ${CAPI_LIB}
index eb803b1..aed6980 100755 (executable)
@@ -33,7 +33,7 @@
 #include "tct-context-core_mobile.h"
 #endif //MOBILE
 
-#ifdef COMMON_IOT    
+#ifdef COMMON_IOT
 #include "tct-context-core_common_iot.h"
 #endif //COMMON_IOT
 
index cab5974..32f5d43 100755 (executable)
 #include "testcase.h"
 #include "tct_common.h"
 
-extern void utc_context_trigger_startup(void);
-extern void utc_context_trigger_cleanup(void);
 extern void utc_context_history_startup(void);
 extern void utc_context_history_cleanup(void);
 
-extern int utc_context_trigger_add_rule_p(void);
-extern int utc_context_trigger_add_rule_n(void);
-extern int utc_context_trigger_remove_rule_p(void);
-extern int utc_context_trigger_remove_rule_n(void);
-extern int utc_context_trigger_enable_rule_p(void);
-extern int utc_context_trigger_enable_rule_n(void);
-extern int utc_context_trigger_disable_rule_p(void);
-extern int utc_context_trigger_disable_rule_n(void);
-extern int utc_context_trigger_get_own_rule_ids_p(void);
-extern int utc_context_trigger_get_own_rule_ids_n(void);
-extern int utc_context_trigger_get_rule_by_id_p(void);
-extern int utc_context_trigger_get_rule_by_id_n(void);
-extern int utc_context_trigger_rule_create_p(void);
-extern int utc_context_trigger_rule_create_n(void);
-extern int utc_context_trigger_rule_destroy_p(void);
-extern int utc_context_trigger_rule_destroy_n(void);
-extern int utc_context_trigger_rule_add_entry_p(void);
-extern int utc_context_trigger_rule_add_entry_n1(void);
-extern int utc_context_trigger_rule_add_entry_n2(void);
-extern int utc_context_trigger_rule_set_action_app_control_p(void);
-extern int utc_context_trigger_rule_set_action_app_control_n(void);
-extern int utc_context_trigger_rule_set_action_notification_p(void);
-extern int utc_context_trigger_rule_set_action_notification_n(void);
-extern int utc_context_trigger_rule_set_description_p(void);
-extern int utc_context_trigger_rule_set_description_n(void);
-extern int utc_context_trigger_rule_get_description_p(void);
-extern int utc_context_trigger_rule_get_description_n(void);
-extern int utc_context_trigger_rule_event_create_p(void);
-extern int utc_context_trigger_rule_event_create_n(void);
-extern int utc_context_trigger_rule_event_is_supported_p(void);
-extern int utc_context_trigger_rule_event_is_supported_n(void);
-extern int utc_context_trigger_rule_condition_create_p(void);
-extern int utc_context_trigger_rule_condition_create_n(void);
-extern int utc_context_trigger_rule_condition_is_supported_p(void);
-extern int utc_context_trigger_rule_condition_is_supported_n(void);
-extern int utc_context_trigger_rule_entry_destroy_p(void);
-extern int utc_context_trigger_rule_entry_destroy_n(void);
-extern int utc_context_trigger_rule_entry_add_key_p(void);
-extern int utc_context_trigger_rule_entry_add_key_n(void);
-extern int utc_context_trigger_rule_entry_add_comparison_int_p(void);
-extern int utc_context_trigger_rule_entry_add_comparison_int_n(void);
-extern int utc_context_trigger_rule_entry_add_comparison_string_p(void);
-extern int utc_context_trigger_rule_entry_add_comparison_string_n(void);
-extern int utc_context_trigger_rule_entry_add_comparison_p1(void);
-extern int utc_context_trigger_rule_entry_add_comparison_p2(void);
-extern int utc_context_trigger_rule_entry_add_comparison_n(void);
-extern int utc_context_trigger_rule_entry_add_option_int_p(void);
-extern int utc_context_trigger_rule_entry_add_option_int_n(void);
-extern int utc_context_trigger_rule_entry_add_option_string_p(void);
-extern int utc_context_trigger_rule_entry_add_option_string_n(void);
-extern int utc_context_trigger_rule_entry_add_option_p1(void);
-extern int utc_context_trigger_rule_entry_add_option_p2(void);
-extern int utc_context_trigger_rule_entry_add_option_p3(void);
-extern int utc_context_trigger_rule_entry_add_option_n(void);
-extern int utc_context_trigger_custom_register_p(void);
-extern int utc_context_trigger_custom_register_n(void);
-extern int utc_context_trigger_custom_unregister_p(void);
-extern int utc_context_trigger_custom_unregister_n(void);
-extern int utc_context_trigger_custom_publish_p(void);
-extern int utc_context_trigger_custom_publish_n(void);
-extern int utc_context_trigger_rule_custom_event_create_p(void);
-extern int utc_context_trigger_rule_custom_event_create_n(void);
-extern int utc_context_trigger_rule_custom_condition_create_p(void);
-extern int utc_context_trigger_rule_custom_condition_create_n(void);
 extern int utc_context_history_create_p(void);
 extern int utc_context_history_create_n(void);
 extern int utc_context_history_destroy_p(void);
@@ -98,8 +32,6 @@ extern int utc_context_history_filter_destroy_p(void);
 extern int utc_context_history_filter_destroy_n(void);
 extern int utc_context_history_filter_set_int_p(void);
 extern int utc_context_history_filter_set_int_n(void);
-extern int utc_context_history_filter_set_string_p(void);
-extern int utc_context_history_filter_set_string_n(void);
 extern int utc_context_history_get_list_p(void);
 extern int utc_context_history_get_list_n(void);
 extern int utc_context_history_list_get_count_p(void);
@@ -122,70 +54,6 @@ extern int utc_context_history_record_destroy_p(void);
 extern int utc_context_history_record_destroy_n(void);
 
 testcase tc_array[] = {
-       {"utc_context_trigger_add_rule_p",utc_context_trigger_add_rule_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_add_rule_n",utc_context_trigger_add_rule_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_remove_rule_p",utc_context_trigger_remove_rule_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_remove_rule_n",utc_context_trigger_remove_rule_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_enable_rule_p",utc_context_trigger_enable_rule_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_enable_rule_n",utc_context_trigger_enable_rule_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_disable_rule_p",utc_context_trigger_disable_rule_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_disable_rule_n",utc_context_trigger_disable_rule_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_get_own_rule_ids_p",utc_context_trigger_get_own_rule_ids_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_get_own_rule_ids_n",utc_context_trigger_get_own_rule_ids_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_get_rule_by_id_p",utc_context_trigger_get_rule_by_id_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_get_rule_by_id_n",utc_context_trigger_get_rule_by_id_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_create_p",utc_context_trigger_rule_create_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_create_n",utc_context_trigger_rule_create_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_destroy_p",utc_context_trigger_rule_destroy_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_destroy_n",utc_context_trigger_rule_destroy_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_add_entry_p",utc_context_trigger_rule_add_entry_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_add_entry_n1",utc_context_trigger_rule_add_entry_n1,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_add_entry_n2",utc_context_trigger_rule_add_entry_n2,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_action_app_control_p",utc_context_trigger_rule_set_action_app_control_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_action_app_control_n",utc_context_trigger_rule_set_action_app_control_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_action_notification_p",utc_context_trigger_rule_set_action_notification_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_action_notification_n",utc_context_trigger_rule_set_action_notification_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_description_p",utc_context_trigger_rule_set_description_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_set_description_n",utc_context_trigger_rule_set_description_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_get_description_p",utc_context_trigger_rule_get_description_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_get_description_n",utc_context_trigger_rule_get_description_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_event_create_p",utc_context_trigger_rule_event_create_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_event_create_n",utc_context_trigger_rule_event_create_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_event_is_supported_p",utc_context_trigger_rule_event_is_supported_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_event_is_supported_n",utc_context_trigger_rule_event_is_supported_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_condition_create_p",utc_context_trigger_rule_condition_create_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_condition_create_n",utc_context_trigger_rule_condition_create_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_condition_is_supported_p",utc_context_trigger_rule_condition_is_supported_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_condition_is_supported_n",utc_context_trigger_rule_condition_is_supported_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_destroy_p",utc_context_trigger_rule_entry_destroy_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_destroy_n",utc_context_trigger_rule_entry_destroy_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_key_p",utc_context_trigger_rule_entry_add_key_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_key_n",utc_context_trigger_rule_entry_add_key_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_int_p",utc_context_trigger_rule_entry_add_comparison_int_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_int_n",utc_context_trigger_rule_entry_add_comparison_int_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_string_p",utc_context_trigger_rule_entry_add_comparison_string_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_string_n",utc_context_trigger_rule_entry_add_comparison_string_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_p1",utc_context_trigger_rule_entry_add_comparison_p1,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_p2",utc_context_trigger_rule_entry_add_comparison_p2,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_comparison_n",utc_context_trigger_rule_entry_add_comparison_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_int_p",utc_context_trigger_rule_entry_add_option_int_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_int_n",utc_context_trigger_rule_entry_add_option_int_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_string_p",utc_context_trigger_rule_entry_add_option_string_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_string_n",utc_context_trigger_rule_entry_add_option_string_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_p1",utc_context_trigger_rule_entry_add_option_p1,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_p2",utc_context_trigger_rule_entry_add_option_p2,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_p3",utc_context_trigger_rule_entry_add_option_p3,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_entry_add_option_n",utc_context_trigger_rule_entry_add_option_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_register_p",utc_context_trigger_custom_register_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_register_n",utc_context_trigger_custom_register_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_unregister_p",utc_context_trigger_custom_unregister_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_unregister_n",utc_context_trigger_custom_unregister_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_publish_p",utc_context_trigger_custom_publish_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_custom_publish_n",utc_context_trigger_custom_publish_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_custom_event_create_p",utc_context_trigger_rule_custom_event_create_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_custom_event_create_n",utc_context_trigger_rule_custom_event_create_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_custom_condition_create_p",utc_context_trigger_rule_custom_condition_create_p,utc_context_trigger_startup,utc_context_trigger_cleanup},
-       {"utc_context_trigger_rule_custom_condition_create_n",utc_context_trigger_rule_custom_condition_create_n,utc_context_trigger_startup,utc_context_trigger_cleanup},
        {"utc_context_history_create_p",utc_context_history_create_p,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_create_n",utc_context_history_create_n,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_destroy_p",utc_context_history_destroy_p,utc_context_history_startup,utc_context_history_cleanup},
@@ -196,8 +64,6 @@ testcase tc_array[] = {
        {"utc_context_history_filter_destroy_n",utc_context_history_filter_destroy_n,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_filter_set_int_p",utc_context_history_filter_set_int_p,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_filter_set_int_n",utc_context_history_filter_set_int_n,utc_context_history_startup,utc_context_history_cleanup},
-       {"utc_context_history_filter_set_string_p",utc_context_history_filter_set_string_p,utc_context_history_startup,utc_context_history_cleanup},
-       {"utc_context_history_filter_set_string_n",utc_context_history_filter_set_string_n,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_get_list_p",utc_context_history_get_list_p,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_get_list_n",utc_context_history_get_list_n,utc_context_history_startup,utc_context_history_cleanup},
        {"utc_context_history_list_get_count_p",utc_context_history_list_get_count_p,utc_context_history_startup,utc_context_history_cleanup},
index 39d335b..aa55d29 100755 (executable)
        dlog_print (DLOG_INFO, "core-context-tests", "[%s:%d] "fmt"\n", __func__, __LINE__, ##args); \
 }
 
+#define HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(CONDITION, VALUE1, VALUE2) \
+               do { \
+                       if (CONDITION) { \
+                               assert_eq(VALUE1, VALUE2); \
+                       } else { \
+                               assert_eq(VALUE1, CONTEXT_HISTORY_ERROR_NOT_SUPPORTED); \
+                       } \
+               } while (0)
+
+#define HISTORY_ASSERT_GEQ_IF_SUPPORTED(CONDITION, VALUE1, VALUE2) \
+               do { \
+                       if (CONDITION) { \
+                               assert_geq(VALUE1, VALUE2); \
+                       } \
+               } while (0)
+
+#define HISTORY_ASSERT_IF_SUPPORTED(CONDITION, VALUE1) \
+               do { \
+                       if (CONDITION) { \
+                               assert(VALUE1); \
+                       } \
+               } while (0)
+
 #define TRIGGER_ASSERT_EQ_WITH_CHECK_SUPPORTED(CONDITION, VALUE1, VALUE2) \
                do { \
                        if (CONDITION) { \
index c4e2677..f25eee8 100755 (executable)
 #include "tct_app_common.h"
 
 //& set: Context - History
+#define HISTORY_FEATURE                "http://tizen.org/feature/app_history"
 #ifdef MOBILE
 #define NUM_HISTORY_DATA_TYPE 12
 #endif //MOBILE
-#ifdef TV
-#define NUM_HISTORY_DATA_TYPE 9
-#endif //TV
+#ifdef WEARABLE
+#define NUM_HISTORY_DATA_TYPE 4
+#endif //WEARABLE
 static context_history_h handle = NULL;
 
+bool history_checked = false;
+bool is_history_supported = false;
+
 static context_history_data_e history_data_enum[NUM_HISTORY_DATA_TYPE] = {
+#ifdef MOBILE
        CONTEXT_HISTORY_RECENTLY_USED_APP,
        CONTEXT_HISTORY_FREQUENTLY_USED_APP,
+       CONTEXT_HISTORY_BATTERY_USAGE,
+       CONTEXT_HISTORY_RECENT_BATTERY_USAGE,
        CONTEXT_HISTORY_RARELY_USED_APP,
        CONTEXT_HISTORY_PEAK_TIME_FOR_APP,
        CONTEXT_HISTORY_PEAK_TIME_FOR_MUSIC,
        CONTEXT_HISTORY_PEAK_TIME_FOR_VIDEO,
        CONTEXT_HISTORY_COMMON_SETTING_FOR_APP,
        CONTEXT_HISTORY_COMMON_SETTING_FOR_MUSIC,
-#ifdef MOBILE
        CONTEXT_HISTORY_COMMON_SETTING_FOR_VIDEO,
-       CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS,
+       CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS};
+#endif //MOBILE
+#ifdef WEARABLE
+       CONTEXT_HISTORY_RECENTLY_USED_APP,
+       CONTEXT_HISTORY_FREQUENTLY_USED_APP,
        CONTEXT_HISTORY_BATTERY_USAGE,
        CONTEXT_HISTORY_RECENT_BATTERY_USAGE};
-#endif //MOBILE
-#ifdef TV
-       CONTEXT_HISTORY_COMMON_SETTING_FOR_VIDEO};
-#endif //TV
+#endif //WEARABLE
 
 static const char *history_data_name[NUM_HISTORY_DATA_TYPE] = {
+#ifdef MOBILE
        "CONTEXT_HISTORY_RECENTLY_USED_APP",
        "CONTEXT_HISTORY_FREQUENTLY_USED_APP",
+       "CONTEXT_HISTORY_BATTERY_USAGE",
+       "CONTEXT_HISTORY_RECENT_BATTERY_USAGE",
        "CONTEXT_HISTORY_RARELY_USED_APP",
        "CONTEXT_HISTORY_PEAK_TIME_FOR_APP",
        "CONTEXT_HISTORY_PEAK_TIME_FOR_MUSIC",
        "CONTEXT_HISTORY_PEAK_TIME_FOR_VIDEO",
        "CONTEXT_HISTORY_COMMON_SETTING_FOR_APP",
        "CONTEXT_HISTORY_COMMON_SETTING_FOR_MUSIC",
-#ifdef MOBILE
        "CONTEXT_HISTORY_COMMON_SETTING_FOR_VIDEO",
-       "CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS",
+       "CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS"};
+#endif //MOBILE
+#ifdef WEARABLE
+       "CONTEXT_HISTORY_RECENTLY_USED_APP",
+       "CONTEXT_HISTORY_FREQUENTLY_USED_APP",
        "CONTEXT_HISTORY_BATTERY_USAGE",
        "CONTEXT_HISTORY_RECENT_BATTERY_USAGE"};
-#endif //MOBILE
-#ifdef TV
-       "CONTEXT_HISTORY_COMMON_SETTING_FOR_VIDEO"};
-#endif //TV
+#endif //WEARABLE
 
 #define SKIP_TEST_CONTINUE(Error, CaseIdx, MaxIdx, DataName) {\
-       if (Error == CONTEXT_HISTORY_ERROR_NOT_SUPPORTED) {\
+       if (is_history_supported && Error == CONTEXT_HISTORY_ERROR_NOT_SUPPORTED) {\
                PRINT_INFO("(%d/%d) Skipping this test for %s. Not supported",\
                                CaseIdx, MaxIdx, DataName);\
                continue;\
-       } else if (Error == CONTEXT_HISTORY_ERROR_NO_DATA) {\
+       } else if (is_history_supported && Error == CONTEXT_HISTORY_ERROR_NO_DATA) {\
                PRINT_INFO("(%d/%d) Skipping this test for %s. Data not exist",\
                                CaseIdx, MaxIdx, DataName);\
                continue;\
@@ -82,10 +92,10 @@ static const char *history_data_name[NUM_HISTORY_DATA_TYPE] = {
 }
 
 #define SKIP_TEST(Error, CaseIdx, MaxIdx, DataName) \
-       if (Error == CONTEXT_HISTORY_ERROR_NOT_SUPPORTED) {\
+       if (is_history_supported && Error == CONTEXT_HISTORY_ERROR_NOT_SUPPORTED) {\
                PRINT_INFO("(%d/%d) Skipping this test for %s. Not supported",\
                                CaseIdx, MaxIdx, DataName);\
-       } else if (Error == CONTEXT_HISTORY_ERROR_NO_DATA) {\
+       } else if (is_history_supported && Error == CONTEXT_HISTORY_ERROR_NO_DATA) {\
                PRINT_INFO("(%d/%d) Skipping this test for %s. Data not exist",\
                                CaseIdx, MaxIdx, DataName);\
        }
@@ -101,6 +111,14 @@ void utc_context_history_startup(void)
        TCT_UTCCheckInstalledApp(2, "org.tizen.testapplication", "org.tizen.helloworld");
 
        context_history_create(&handle);
+
+       if (!history_checked) {
+               system_info_get_platform_bool(HISTORY_FEATURE, &is_history_supported);
+               history_checked = true;
+       }
+
+       if (!is_history_supported)
+               PRINT_INFO("Feature(%s) is not supported", HISTORY_FEATURE);
 }
 
 /**
@@ -129,7 +147,7 @@ int utc_context_history_create_p(void)
 
        error = context_history_create(&history_h);
 
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
        context_history_destroy(history_h);
 
        return 0;
@@ -145,7 +163,7 @@ int utc_context_history_create_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_create(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -163,7 +181,7 @@ int utc_context_history_destroy_p(void)
        context_history_create(&history_h);
        error = context_history_destroy(history_h);
 
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        return 0;
 }
@@ -178,7 +196,7 @@ int utc_context_history_destroy_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_destroy(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -194,7 +212,7 @@ int utc_context_history_filter_create_p(void)
        context_history_filter_h filter = NULL;
 
        error = context_history_filter_create(&filter);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        context_history_filter_destroy(filter);
 
@@ -211,7 +229,7 @@ int utc_context_history_filter_create_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_filter_create(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -229,7 +247,7 @@ int utc_context_history_filter_destroy_p(void)
        context_history_filter_create(&filter);
        error = context_history_filter_destroy(filter);
 
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        return 0;
 }
@@ -244,7 +262,7 @@ int utc_context_history_filter_destroy_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_filter_destroy(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -262,25 +280,27 @@ int utc_context_history_filter_set_int_p(void)
        context_history_filter_create(&filter);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 10);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, 10);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-
-       error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_WEEKDAYS);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_START_TIME, 1433116800); // 2015.06.01 00:00:00
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_END_TIME, 1433548800); // 2015.06.06. 00:00:00
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+
+#ifdef MOBILE
+       error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_WEEKDAYS);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_AUDIO_JACK, CONTEXT_HISTORY_FILTER_AUDIO_JACK_CONNECTED);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE, CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE_CALL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+#endif //MOBILE
 
        context_history_filter_destroy(filter);
 
@@ -300,39 +320,44 @@ int utc_context_history_filter_set_int_n(void)
        context_history_filter_create(&filter);
 
        error = context_history_filter_set_int(NULL, CONTEXT_HISTORY_FILTER_TIME_SPAN, 10);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
+#ifdef MOBILE
        // Invalid filter data type
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_APP_ID, 0);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
        // Invalid filter data
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
-
-       error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_START_TIME, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_END_TIME, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+
+#ifdef MOBILE
+       error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK, -1);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_AUDIO_JACK, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE, -1);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
        context_history_filter_destroy(filter);
 
        return 0;
 }
 
+#ifdef MOBILE
 /**
  * @testcase           utc_context_history_filter_set_string_p
  * @since_tizen                2.4
@@ -346,10 +371,10 @@ int utc_context_history_filter_set_string_p(void)
        context_history_filter_create(&filter);
 
        error = context_history_filter_set_string(filter, CONTEXT_HISTORY_FILTER_APP_ID, "org.tizen.testapplication");
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        error = context_history_filter_set_string(filter, CONTEXT_HISTORY_FILTER_WIFI_BSSID, "office");
-       assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
        context_history_filter_destroy(filter);
 
@@ -369,23 +394,24 @@ int utc_context_history_filter_set_string_n(void)
        context_history_filter_create(&filter);
 
        error = context_history_filter_set_string(NULL, CONTEXT_HISTORY_FILTER_APP_ID, "org.tizen.testapplication");
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        // Invalid filter data type
        error = context_history_filter_set_string(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, "10");
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        // Invalid filter data
        error = context_history_filter_set_string(filter, CONTEXT_HISTORY_FILTER_APP_ID, NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        error = context_history_filter_set_string(filter, CONTEXT_HISTORY_FILTER_WIFI_BSSID, NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        context_history_filter_destroy(filter);
 
        return 0;
 }
+#endif //MOBILE
 
 /**
  * @testcase           utc_context_history_is_supported_p
@@ -400,10 +426,10 @@ int utc_context_history_is_supported_p(void)
 
        for (i = 0; i < NUM_HISTORY_DATA_TYPE; ++i) {
                error = context_history_is_supported(history_data_enum[i], &supported);
-               if (!supported)
+               if (is_history_supported && !supported)
                        PRINT_INFO("(%d/%d) %s is not supported.", i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
        }
 
        return 0;
@@ -419,7 +445,7 @@ int utc_context_history_is_supported_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_is_supported(history_data_enum[0], NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -441,8 +467,8 @@ int utc_context_history_get_list_p(void)
                error = context_history_get_list(handle, history_data_enum[i], NULL, &list);
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(list);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, list);
 
                context_history_list_destroy(list);
        }
@@ -461,20 +487,22 @@ int utc_context_history_get_list_n(void)
        context_history_filter_h filter = NULL;
        context_history_list_h list = NULL;
 
-       error = context_history_get_list(NULL, CONTEXT_HISTORY_RARELY_USED_APP, NULL, &list);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       error = context_history_get_list(NULL, CONTEXT_HISTORY_FREQUENTLY_USED_APP, NULL, &list);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
-       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, NULL, NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, NULL, NULL);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
+#ifdef MOBILE
        // Invalid filter
        context_history_filter_create(&filter);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 30);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, 10);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK, CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_WEEKDAYS);
 
-       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, filter, &list);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, filter, &list);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
        context_history_list_destroy(list);
        context_history_filter_destroy(filter);
@@ -502,8 +530,8 @@ int utc_context_history_list_get_count_p(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_count(list, &count);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(count, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, count, 0);
 
                context_history_list_destroy(list);
        }
@@ -529,7 +557,7 @@ int utc_context_history_list_get_count_n(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_count(list, NULL);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
                context_history_list_destroy(list);
        }
@@ -557,8 +585,8 @@ int utc_context_history_list_get_current_p(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_current(list, &record);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(record);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, record);
 
                context_history_list_destroy(list);
                context_history_record_destroy(record);
@@ -587,7 +615,7 @@ int utc_context_history_list_get_current_n(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_current(list, NULL);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
                context_history_list_destroy(list);
                context_history_record_destroy(record);
@@ -614,7 +642,7 @@ int utc_context_history_list_move_first_p(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_move_first(list);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
                context_history_list_destroy(list);
        }
@@ -632,7 +660,7 @@ int utc_context_history_list_move_first_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_list_move_first(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -657,8 +685,8 @@ int utc_context_history_list_move_next_p(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_count(list, &count);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               if (count < 2) {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               if (is_history_supported && count < 2) {
                        PRINT_INFO("(%d/%d) Skipping this test for %s. The number of records is %d.",
                                        i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i], count);
                        context_history_list_destroy(list);
@@ -667,7 +695,7 @@ int utc_context_history_list_move_next_p(void)
                }
 
                error = context_history_list_move_next(list);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
                context_history_list_destroy(list);
        }
@@ -685,7 +713,7 @@ int utc_context_history_list_move_next_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_list_move_next(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -707,11 +735,11 @@ int utc_context_history_list_destroy_p(void)
                error = context_history_get_list(handle, history_data_enum[i], NULL, &list);
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(list);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, list);
 
                error = context_history_list_destroy(list);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
        }
 
        return 0;
@@ -727,7 +755,7 @@ int utc_context_history_list_destroy_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_list_destroy(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
@@ -748,67 +776,93 @@ int utc_context_history_record_get_int_p(void)
        context_history_filter_create(&filter);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 30);
 
+       error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, filter, &list);
+       SKIP_TEST(error, 1, 4, history_data_name[1]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               context_history_list_get_current(list, &record);
+
+               value = -1;
+               error = context_history_record_get_int(record, CONTEXT_HISTORY_TOTAL_COUNT, &value);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
+
+               value = -1;
+               error = context_history_record_get_int(record, CONTEXT_HISTORY_TOTAL_DURATION, &value);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
+
+               value = -3;
+               error = context_history_record_get_int(record, CONTEXT_HISTORY_LAST_TIME, &value);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, -1);
+
+               context_history_record_destroy(record);
+               context_history_list_destroy(list);
+       }
+
+#ifdef MOBILE
        error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, filter, &list);
-       SKIP_TEST(error, 1, 3, history_data_name[2]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 2, 4, history_data_name[4]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_TOTAL_COUNT, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_TOTAL_DURATION, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                value = -3;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_LAST_TIME, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, -1);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, -1);
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
        }
 
        error = context_history_get_list(handle, CONTEXT_HISTORY_COMMON_SETTING_FOR_APP, filter, &list);
-       SKIP_TEST(error, 2, 3, history_data_name[6]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 3, 4, history_data_name[8]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                error = context_history_list_get_current(list, &record);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_AUDIO_JACK, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_SYSTEM_VOLUME, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_MEDIA_VOLUME, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
        }
 
        error = context_history_get_list(handle, CONTEXT_HISTORY_PEAK_TIME_FOR_APP, filter, &list);
-       SKIP_TEST(error, 3, 3, history_data_name[3]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 4, 4, history_data_name[5]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                value = -1;
                error = context_history_record_get_int(record, CONTEXT_HISTORY_HOUR_OF_DAY, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
        }
+#endif //MOBILE
 
        context_history_filter_destroy(filter);
 
@@ -827,21 +881,23 @@ int utc_context_history_record_get_int_n(void)
        context_history_list_h list = NULL;
        context_history_record_h record = NULL;
 
-       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, NULL, &list);
-       SKIP_TEST(error, 1, 1, history_data_name[2]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, NULL, &list);
+       SKIP_TEST(error, 1, 1, history_data_name[1]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                error = context_history_record_get_int(record, CONTEXT_HISTORY_TOTAL_COUNT, NULL);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
                // Invalid record data type
                error = context_history_record_get_int(record, CONTEXT_HISTORY_APP_ID, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
+#ifdef MOBILE
                // Invalid record key
                error = context_history_record_get_int(record, CONTEXT_HISTORY_HOUR_OF_DAY, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
@@ -866,15 +922,15 @@ int utc_context_history_record_get_string_p(void)
        context_history_filter_create(&filter);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 30);
 
-       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, filter, &list);
-       SKIP_TEST(error, 1, 2, history_data_name[2]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, filter, &list);
+       SKIP_TEST(error, 1, 3, history_data_name[1]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                value = NULL;
                error = context_history_record_get_string(record, CONTEXT_HISTORY_APP_ID, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(strlen(value) > 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, strlen(value) > 0);
 
                free(value);
                context_history_record_destroy(record);
@@ -882,15 +938,30 @@ int utc_context_history_record_get_string_p(void)
        }
 
 #ifdef MOBILE
+       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, filter, &list);
+       SKIP_TEST(error, 2, 3, history_data_name[4]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               context_history_list_get_current(list, &record);
+
+               value = NULL;
+               error = context_history_record_get_string(record, CONTEXT_HISTORY_APP_ID, &value);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, strlen(value) > 0);
+
+               free(value);
+               context_history_record_destroy(record);
+               context_history_list_destroy(list);
+       }
+
        error = context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS, filter, &list);
-       SKIP_TEST(error, 2, 2, history_data_name[9]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 3, 3, history_data_name[11]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                value = NULL;
                error = context_history_record_get_string(record, CONTEXT_HISTORY_ADDRESS, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(strlen(value) > 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, strlen(value) > 0);
 
                free(value);
                context_history_record_destroy(record);
@@ -915,21 +986,23 @@ int utc_context_history_record_get_string_n(void)
        context_history_list_h list = NULL;
        context_history_record_h record = NULL;
 
-       error = context_history_get_list(handle, CONTEXT_HISTORY_RARELY_USED_APP, NULL, &list);
+       error = context_history_get_list(handle, CONTEXT_HISTORY_BATTERY_USAGE, NULL, &list);
        SKIP_TEST(error, 1, 1, history_data_name[2]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                error = context_history_record_get_string(record, CONTEXT_HISTORY_APP_ID, NULL);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
                // Invalid record data type
-               error = context_history_record_get_string(record, CONTEXT_HISTORY_TOTAL_COUNT, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               error = context_history_record_get_string(record, CONTEXT_HISTORY_TOTAL_AMOUNT, &value);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
+#ifdef MOBILE
                // Invalid record key
                error = context_history_record_get_string(record, CONTEXT_HISTORY_ADDRESS, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
@@ -954,21 +1027,19 @@ int utc_context_history_record_get_double_p(void)
        context_history_filter_create(&filter);
        context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 30);
 
-#ifdef MOBILE
        error = context_history_get_list(handle, CONTEXT_HISTORY_BATTERY_USAGE, filter, &list);
-       SKIP_TEST(error, 1, 1, history_data_name[10]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 1, 1, history_data_name[2]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                value = -1;
                error = context_history_record_get_double(record, CONTEXT_HISTORY_TOTAL_AMOUNT, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert_geq(value, 0);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_GEQ_IF_SUPPORTED(is_history_supported, value, 0);
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
        }
-#endif //MOBILE
 
        context_history_filter_destroy(filter);
 
@@ -987,27 +1058,27 @@ int utc_context_history_record_get_double_n(void)
        context_history_list_h list = NULL;
        context_history_record_h record = NULL;
 
-#ifdef MOBILE
        error = context_history_get_list(handle, CONTEXT_HISTORY_BATTERY_USAGE, NULL, &list);
-       SKIP_TEST(error, 1, 1, history_data_name[11]) else {
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+       SKIP_TEST(error, 1, 1, history_data_name[2]) else {
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
                context_history_list_get_current(list, &record);
 
                error = context_history_record_get_double(record, CONTEXT_HISTORY_TOTAL_AMOUNT, NULL);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
                // Invalid record data type
                error = context_history_record_get_double(record, CONTEXT_HISTORY_APP_ID, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
+#ifdef MOBILE
                // Invalid record key
                error = context_history_record_get_double(record, CONTEXT_HISTORY_HOUR_OF_DAY, &value);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+#endif //MOBILE
 
                context_history_record_destroy(record);
                context_history_list_destroy(list);
        }
-#endif //MOBILE
 
        return 0;
 }
@@ -1032,11 +1103,11 @@ int utc_context_history_record_destroy_p(void)
                SKIP_TEST_CONTINUE(error, i + 1, NUM_HISTORY_DATA_TYPE, history_data_name[i]);
 
                error = context_history_list_get_current(list, &record);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
-               assert(record);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_IF_SUPPORTED(is_history_supported, record);
 
                error = context_history_record_destroy(record);
-               assert_eq(error, CONTEXT_HISTORY_ERROR_NONE);
+               HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_NONE);
 
                context_history_list_destroy(list);
        }
@@ -1054,7 +1125,7 @@ int utc_context_history_record_destroy_n(void)
        int error = CONTEXT_HISTORY_ERROR_NONE;
 
        error = context_history_record_destroy(NULL);
-       assert_eq(error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
+       HISTORY_ASSERT_EQ_WITH_CHECK_SUPPORTED(is_history_supported, error, CONTEXT_HISTORY_ERROR_INVALID_PARAMETER);
 
        return 0;
 }
index f1570fd..aa95975 100755 (executable)
@@ -59,10 +59,6 @@ wearable:armv7l:utc:attach-panel;
 wearable:aarch64:utc:attach-panel;
 wearable:x86:utc:attach-panel;
 wearable:x86_64:utc:attach-panel;
-wearable:armv7l:utc:context;
-wearable:aarch64:utc:context;
-wearable:x86:utc:context;
-wearable:x86_64:utc:context;
 wearable:armv7l:utc:geofence-manager;
 wearable:aarch64:utc:geofence-manager;
 wearable:x86:utc:geofence-manager;
@@ -132,10 +128,6 @@ wearable:armv7l:itc:attach-panel;
 wearable:aarch64:itc:attach-panel;
 wearable:x86:itc:attach-panel;
 wearable:x86_64:itc:attach-panel;
-wearable:armv7l:itc:context;
-wearable:aarch64:itc:context;
-wearable:x86:itc:context;
-wearable:x86_64:itc:context;
 wearable:armv7l:itc:geofence-manager;
 wearable:aarch64:itc:geofence-manager;
 wearable:x86:itc:geofence-manager;