diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 41e6bf3e29e115914f6732e87cb44818ed9c28ae..868c363870779a234d96a33b46b0a88c830c3ac4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -110,6 +110,9 @@ foreach (i RANGE "${len_test_cases}")
         ${CONAN_LIBS_OPENSSL} ${CONAN_LIBS_C-ARES} ${CONAN_LIBS_BZIP2}
         ${CONAN_LIBS_PROTOBUF} ${CONAN_LIBS_ZLIB} ${CONAN_LIBS_RE2}
         ${CONAN_LIBS_BOOST})
+    if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
+        target_link_libraries(${test_case_name} PRIVATE caosdb_grpc)
+    endif()
     target_include_directories(${test_case_name}
         PUBLIC ${CONAN_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
     if(LINTING)