diff --git a/cmake/modules/DumuxTestMacros.cmake b/cmake/modules/DumuxTestMacros.cmake
index 5268191a609f304cd7c55db34fad75a756c3eb08..b484dd5f82b429e604e2f3ce404d6fd94deb2b38 100644
--- a/cmake/modules/DumuxTestMacros.cmake
+++ b/cmake/modules/DumuxTestMacros.cmake
@@ -258,7 +258,7 @@ function(dumux_add_test)
 
   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/TestMetaData")
   file(WRITE "${CMAKE_BINARY_DIR}/TestMetaData/${ADDTEST_NAME}.json"
-             "{\n  \"name\": \"${ADDTEST_NAME}\",\n  \"target\": \"${ADDTEST_TARGET}\"\n}\n")
+             "{\n  \"name\": \"${ADDTEST_NAME}\",\n  \"target\": \"${ADDTEST_TARGET}\",\n  \"source_dir\": \"${CMAKE_CURRENT_SOURCE_DIR}\"\n}\n")
 endfunction()
 
 # Evaluate test guards like dune_add_test internally does