Added description for each test case
authorIngo Huerner <ingo.huerner@xse.de>
Thu, 9 Jan 2014 08:57:32 +0000 (09:57 +0100)
committerIngo Huerner <ingo.huerner@xse.de>
Thu, 9 Jan 2014 08:57:32 +0000 (09:57 +0100)
test/persCheck_0.9.8.h [new file with mode: 0644]
test/persCheck_0.9.9.h [new file with mode: 0644]
test/pers_test_base.h [new file with mode: 0644]
test/persistence_client_library_test.c

diff --git a/test/persCheck_0.9.8.h b/test/persCheck_0.9.8.h
new file mode 100644 (file)
index 0000000..1a75892
--- /dev/null
@@ -0,0 +1,180 @@
+/******************************************************************************
+ * Project         Persistency
+ * (c) copyright   2013
+ * Company         XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file           persCheck_0.9.8.h
+ * @ingroup        Persistence client library test
+ * @author         awehrle
+ * @brief          Test of persistence client library
+ * @see
+ */
+
+#ifndef PERSCHECK_H_
+#define PERSCHECK_H_
+
+#include "pers_test_base.h"
+#include <check.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum X_TEST_REPORTS{
+X_TEST_REPORTED_RESULT
+};
+
+int _optTestsReported;
+char _optTestID[50];
+
+#define X_TEST_INIT() do { \
+_optTestID[0] = '\0'; \
+} while(0)
+
+#define ___FILE___ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define REPORT_WARNINGS(){ \
+if(0==(_optTestsReported & (1 << X_TEST_REPORTED_RESULT))) \
+X_TEST_REPORT_RESULT(PASSED); \
+}
+
+/**
+* @brief: Report name of test. This has to be reported first.
+* MANDATORY
+*/
+#define X_TEST_REPORT_TEST_NAME(...) do { \
+char buf[sizeof(_optTestID)]; \
+snprintf(buf,sizeof(buf), __VA_ARGS__); \
+snprintf (_optTestID, sizeof(_optTestID),"%s::%s", ___FILE___, buf); \
+X_TEST_REPORT_TEST_ID(_optTestID); \
+X_TEST_REPORT_TEST_NAME_ID(_optTestID, __VA_ARGS__); \
+} while(0)
+
+/**
+* @brief: Path to root of source code directory under test
+* MANDATORY
+*/
+#define X_TEST_REPORT_PATH(...) do { \
+X_TEST_REPORT_PATH_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Name of subcomponent under test, leave empty or set value NONE if not suitable for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_COMP_NAME(...) do { \
+X_TEST_REPORT_COMP_NAME_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Name of class or file under test, leave empty or set value NONE for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_FILE_NAME(...) do { \
+X_TEST_REPORT_FILE_NAME_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: If information exists: Reference to a requirement, feature or bug ID. Else leave empty or set value NONE
+* MANDATORY
+*/
+#define X_TEST_REPORT_REFERENCE(...) do { \
+X_TEST_REPORT_REFERENCE_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: A short description of test case.
+* Do not leave empty, can also be a internal department Test ID like CORE-OS-BOOT-0001
+* MANDATORY
+*/
+#define X_TEST_REPORT_DESCRIPTION(...) do { \
+X_TEST_REPORT_DESCRIPTION_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Reports weather this is a UNIT or a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_KIND(kind) do { \
+X_TEST_REPORT_KIND_ID( _optTestID, kind ); \
+} while(0)
+
+/**
+* @brief: valid values: PASSED, FAILED or NONE. PASSED if test result is ok, FAILED if test result is not as expected, NONE if no test exists for whole file or class
+* MANDATORY
+*/
+#define X_TEST_REPORT_RESULT(result) do { \
+X_TEST_REPORT_RESULT_ID( _optTestID, result); \
+_optTestsReported |= 1 << X_TEST_REPORTED_RESULT; \
+} while(0)
+
+/**
+* @brief: Additional information, if test "just" checks common information flow inside structure (GOOD test case) or if structure is tested with invalid or border values(BORDER)
+* OPTIONAL
+*/
+#define X_TEST_REPORT_TYPE(type) do { \
+X_TEST_REPORT_TYPE_ID( _optTestID, type ); \
+} while(0)
+
+#undef START_TEST
+/* Start a unit test with START_TEST(unit_name), end with END_TEST
+One must use braces within a START_/END_ pair to declare new variables
+*/
+#define START_TEST(__testname)\
+static void __testname (int _i CK_ATTRIBUTE_UNUSED)\
+{\
+X_TEST_INIT(); \
+X_TEST_REPORT_TEST_NAME(""# __testname); \
+tcase_fn_start (""# __testname, __FILE__, __LINE__);
+
+#undef fail_unless
+/* Fail the test case unless expr is true */
+/* The space before the comma sign before ## is essential to be compatible
+with gcc 2.95.3 and earlier.
+*/
+#define fail_unless(expr, ...){\
+int result = expr; \
+if(!result){ \
+X_TEST_REPORT_RESULT(FAILED); \
+} \
+_ck_assert_msg(result, __FILE__, __LINE__,\
+"Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef fail_if
+/* FIXME: these macros may conflict with C89 if expr is
+FIXME: strcmp (str1, str2) due to excessive string length. */
+#define fail_if(expr, ...) {\
+int result = expr; \
+if(result){ \
+X_TEST_REPORT_RESULT(FAILED); \
+} \
+_ck_assert_msg(!(result), __FILE__, __LINE__,\
+"Failure '"#expr"' occured" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef fail
+/* Always fail */
+#define fail(...) {\
+X_TEST_REPORT_RESULT(FAILED); \
+_ck_assert_msg(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef END_TEST
+/* End a unit test */
+#define END_TEST {\
+REPORT_WARNINGS(); \
+_optTestsReported = 0; }\
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PERSCHECK_H_ */
diff --git a/test/persCheck_0.9.9.h b/test/persCheck_0.9.9.h
new file mode 100644 (file)
index 0000000..b81ad80
--- /dev/null
@@ -0,0 +1,180 @@
+/******************************************************************************
+ * Project         Persistency
+ * (c) copyright   2013
+ * Company         XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file           persCheck_0.9.9.h
+ * @ingroup        Persistence client library test
+ * @author         awehrle
+ * @brief          Test of persistence client library
+ * @see
+ */
+
+#ifndef PERSCHECK_H_
+#define PERSCHECK_H_
+
+#include "pers_test_base.h"
+#include <check.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum X_TEST_REPORTS{
+X_TEST_REPORTED_RESULT
+};
+
+int _optTestsReported;
+char _optTestID[256];
+
+#define X_TEST_INIT() do { \
+_optTestID[0] = '\0'; \
+} while(0)
+
+#define ___FILE___ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define REPORT_WARNINGS(){ \
+if(0==(_optTestsReported & (1 << X_TEST_REPORTED_RESULT))) \
+X_TEST_REPORT_RESULT(PASSED); \
+}
+
+/**
+* @brief: Report name of test. This has to be reported first.
+* MANDATORY
+*/
+#define X_TEST_REPORT_TEST_NAME(...) do { \
+char buf[sizeof(_optTestID)]; \
+snprintf(buf,sizeof(buf), __VA_ARGS__); \
+snprintf (_optTestID, sizeof(_optTestID),"%s::%s", ___FILE___, buf); \
+X_TEST_REPORT_TEST_ID(_optTestID); \
+X_TEST_REPORT_TEST_NAME_ID(_optTestID, __VA_ARGS__); \
+} while(0)
+
+/**
+* @brief: Path to root of source code directory under test
+* MANDATORY
+*/
+#define X_TEST_REPORT_PATH(...) do { \
+X_TEST_REPORT_PATH_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Name of subcomponent under test, leave empty or set value NONE if not suitable for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_COMP_NAME(...) do { \
+X_TEST_REPORT_COMP_NAME_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Name of class or file under test, leave empty or set value NONE for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_FILE_NAME(...) do { \
+X_TEST_REPORT_FILE_NAME_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: If information exists: Reference to a requirement, feature or bug ID. Else leave empty or set value NONE
+* MANDATORY
+*/
+#define X_TEST_REPORT_REFERENCE(...) do { \
+X_TEST_REPORT_REFERENCE_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: A short description of test case.
+* Do not leave empty, can also be a internal department Test ID like CORE-OS-BOOT-0001
+* MANDATORY
+*/
+#define X_TEST_REPORT_DESCRIPTION(...) do { \
+X_TEST_REPORT_DESCRIPTION_ID( _optTestID, __VA_ARGS__ ); \
+} while(0)
+
+/**
+* @brief: Reports weather this is a UNIT or a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_KIND(kind) do { \
+X_TEST_REPORT_KIND_ID( _optTestID, kind ); \
+} while(0)
+
+/**
+* @brief: valid values: PASSED, FAILED or NONE. PASSED if test result is ok, FAILED if test result is not as expected, NONE if no test exists for whole file or class
+* MANDATORY
+*/
+#define X_TEST_REPORT_RESULT(result) do { \
+X_TEST_REPORT_RESULT_ID( _optTestID, result); \
+_optTestsReported |= 1 << X_TEST_REPORTED_RESULT; \
+} while(0)
+
+/**
+* @brief: Additional information, if test "just" checks common information flow inside structure (GOOD test case) or if structure is tested with invalid or border values(BORDER)
+* OPTIONAL
+*/
+#define X_TEST_REPORT_TYPE(type) do { \
+X_TEST_REPORT_TYPE_ID( _optTestID, type ); \
+} while(0)
+
+#undef START_TEST
+/* Start a unit test with START_TEST(unit_name), end with END_TEST
+One must use braces within a START_/END_ pair to declare new variables
+*/
+#define START_TEST(__testname)\
+static void __testname (int _i CK_ATTRIBUTE_UNUSED)\
+{\
+X_TEST_INIT(); \
+X_TEST_REPORT_TEST_NAME(""# __testname); \
+tcase_fn_start (""# __testname, __FILE__, __LINE__);
+
+#undef fail_unless
+/* Fail the test case unless expr is true */
+/* The space before the comma sign before ## is essential to be compatible
+with gcc 2.95.3 and earlier.
+*/
+#define fail_unless(expr, ...){\
+int result = expr; \
+if(!result){ \
+X_TEST_REPORT_RESULT(FAILED); \
+} \
+_fail_unless(result, __FILE__, __LINE__,\
+"Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef fail_if
+/* FIXME: these macros may conflict with C89 if expr is
+FIXME: strcmp (str1, str2) due to excessive string length. */
+#define fail_if(expr, ...) {\
+int result = expr; \
+if(result){ \
+X_TEST_REPORT_RESULT(FAILED); \
+} \
+_fail_unless(!(result), __FILE__, __LINE__,\
+"Failure '"#expr"' occured" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef fail
+/* Always fail */
+#define fail(...) {\
+X_TEST_REPORT_RESULT(FAILED); \
+_fail_unless(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL); \
+} while(0)
+
+#undef END_TEST
+/* End a unit test */
+#define END_TEST {\
+REPORT_WARNINGS(); \
+_optTestsReported = 0; }\
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PERSCHECK_H_ */
diff --git a/test/pers_test_base.h b/test/pers_test_base.h
new file mode 100644 (file)
index 0000000..83c7d95
--- /dev/null
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * Project         Persistency
+ * (c) copyright   2013
+ * Company         XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file           pers_test_base.h
+ * @ingroup        Persistence client library test
+ * @author         awehrle
+ * @brief          Test of persistence client library
+ * @see
+ */
+
+
+#ifndef PERSBASETEST_H_
+#define PERSBASETEST_H_
+
+#include <stdbool.h>
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAGIC_STRING "$$XS_TEST$$"
+
+#define FAILED 0
+#define PASSED 1
+#define NONE 2
+
+#define BORDER 0
+#define GOOD 1
+
+#define UNIT 0
+#define COMPONENT 1
+
+/**
+* @brief: Report name of test. This has to be reported first.
+* MANDATORY
+*/
+#define X_TEST_REPORT_TEST_ID(ID) do { \
+printf (MAGIC_STRING"%s", ID); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: Report name of test. This has to be reported first.
+* MANDATORY
+*/
+#define X_TEST_REPORT_TEST_NAME_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("testName:%s", __VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: Path to root of source code directory under test
+* MANDATORY
+*/
+#define X_TEST_REPORT_PATH_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("path:"__VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: Name of subcomponent under test, leave empty or set value NONE if not suitable for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_COMP_NAME_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("compName:"__VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: Name of class or file under test, leave empty or set value NONE for a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_FILE_NAME_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("fileName:"__VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: If information exists: Reference to a requirement, feature or bug ID. Else leave empty or set value NONE
+* MANDATORY
+*/
+#define X_TEST_REPORT_REFERENCE_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("ref:"__VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: A short description of test case.
+* Do not leave empty, can also be a internal department Test ID like CORE-OS-BOOT-0001
+* MANDATORY
+*/
+#define X_TEST_REPORT_DESCRIPTION_ID(ID, ...) do { \
+printf (MAGIC_STRING"%s$$", ID); \
+printf ("desc:"__VA_ARGS__); \
+printf ("\n"); \
+} while(0)
+
+/**
+* @brief: Reports weather this is a UNIT or a COMPONENT test
+* MANDATORY
+*/
+#define X_TEST_REPORT_KIND_ID(ID, kind) do { \
+printf (MAGIC_STRING"%s$$kind:%s\n", ID, kind==UNIT?"UNIT":kind==COMPONENT?"COMPONENT":"NONE"); \
+} while(0)
+
+/**
+* @brief: valid values: PASSED, FAILED or NONE. PASSED if test result is ok, FAILED if test result is not as expected, NONE if no test exists for whole file or class
+* MANDATORY
+*/
+#define X_TEST_REPORT_RESULT_ID(ID, result) do { \
+printf (MAGIC_STRING"%s$$result:%s\n", ID, result==PASSED?"PASSED":result==FAILED?"FAILED":"NONE"); \
+} while(0)
+
+/**
+* @brief: Additional information, if test "just" checks common information flow inside structure (GOOD test case) or if structure is tested with invalid or border values(BORDER)
+* OPTIONAL
+*/
+#define X_TEST_REPORT_TYPE_ID(ID, type) do { \
+printf (MAGIC_STRING"%s$$type:%s\n", ID, type==BORDER?"BORDER":"GOOD"); \
+} while(0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PERSBASETEST_H_ */
index 56037cf..0e187aa 100644 (file)
@@ -21,7 +21,6 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>     /* exit */
-#include <check.h>
 #include <time.h>
 #include <fcntl.h>
 #include <sys/mman.h>
@@ -29,6 +28,9 @@
 #include <dlt/dlt.h>
 #include <dlt/dlt_common.h>
 
+#include "persCheck_0.9.9.h"
+
+
 #include "../include/persistence_client_library_file.h"
 #include "../include/persistence_client_library_key.h"
 #include "../include/persistence_client_library.h"
@@ -58,6 +60,12 @@ char* dayOfWeek[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "F
  */
 START_TEST (test_GetData)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of get data");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    unsigned int shutdownReg = (PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL);
 
@@ -155,6 +163,12 @@ END_TEST
  */
 START_TEST (test_GetDataHandle)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of get data handle");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0, handle = 0, handle2 = 0, handle3 = 0, handle4 = 0, size = 0;
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
 
@@ -260,6 +274,12 @@ END_TEST
  */
 START_TEST(test_SetData)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of set data");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
    unsigned char buffer[READ_SIZE]  = {0};
@@ -380,6 +400,12 @@ END_TEST
  */
 START_TEST(test_SetDataNoPRCT)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of set data no PRCT");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
    unsigned char buffer[READ_SIZE] = {0};
@@ -425,6 +451,12 @@ END_TEST
  */
 START_TEST(test_GetDataSize)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of get data size");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int size = 0, ret = 0;
 
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
@@ -459,6 +491,12 @@ END_TEST
  */
 START_TEST(test_DeleteData)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of delete data");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int rval = 0;
    unsigned char buffer[READ_SIZE];
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
@@ -508,6 +546,12 @@ END_TEST
  */
 START_TEST(test_DataFile)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of data file");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int fd = 0, i = 0, idx = 0;
    int size = 0, ret = 0;
    int writeSize = 16*1024;
@@ -605,6 +649,12 @@ END_TEST
 
 START_TEST(test_DataFileRecovery)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of data file recovery");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int fd_RW = 0, fd_RO = 0;
    int ret = 0;
    char* wBuffer = "This is a buffer to write";
@@ -637,6 +687,12 @@ END_TEST
  */
 START_TEST(test_DataHandle)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of data handle");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int handle1 = 0, handle2 = 0, size = 0;
    int handleArray[4] = {0};
    int ret = 0;
@@ -726,6 +782,12 @@ END_TEST
  */
 START_TEST(test_DataHandleOpen)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of data handle open");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int hd1 = -2, hd2 = -2, hd3 = -2, hd4 = -2, hd5 = -2, hd6 = -2, hd7 = -2, hd8 = -2, hd9 = -2, ret = 0;
    unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL;
 
@@ -802,6 +864,12 @@ END_TEST
  */
 START_TEST(test_Cursor)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of cursor");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int handle = -1, rval = 0, size = 0, handle1 = 0;
    char bufferKeySrc[READ_SIZE]  = {0};
    char bufferDataSrc[READ_SIZE] = {0};
@@ -866,6 +934,12 @@ END_TEST
 
 START_TEST(test_Plugin)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of plugins");
+   X_TEST_REPORT_TYPE(GOOD);
+
        int ret = 0;
        unsigned char buffer[READ_SIZE]  = {0};
 
@@ -914,6 +988,12 @@ END_TEST
 
 START_TEST(test_ReadDefault)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of read default");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    unsigned char buffer[READ_SIZE]  = {0};
 
@@ -940,6 +1020,12 @@ END_TEST
 
 START_TEST(test_ReadConfDefault)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of configurable default data");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    unsigned char buffer[READ_SIZE]  = {0};
 
@@ -964,6 +1050,12 @@ END_TEST
 
 START_TEST(test_GetPath)
 {
+   X_TEST_REPORT_TEST_NAME("persistence_client_library_test");
+   X_TEST_REPORT_COMP_NAME("libpersistence_client_library");
+   X_TEST_REPORT_REFERENCE("NONE");
+   X_TEST_REPORT_DESCRIPTION("Test of get path");
+   X_TEST_REPORT_TYPE(GOOD);
+
    int ret = 0;
    char* path = NULL;
    const char* thePath = "/Data/mnt-wt/lt-persistence_client_library_test/user/1/seat/1/media/mediaDB_create.db";