diff --git a/recipes/qt-advanced-docking-system/all/test_package/CMakeLists.txt b/recipes/qt-advanced-docking-system/all/test_package/CMakeLists.txt
index 0451993feb0165..45de036e186d6e 100644
--- a/recipes/qt-advanced-docking-system/all/test_package/CMakeLists.txt
+++ b/recipes/qt-advanced-docking-system/all/test_package/CMakeLists.txt
@@ -3,10 +3,7 @@ project(PackageTest CXX)
 set(CMAKE_CXX_STANDARD 14)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup(TARGETS)
-
 find_package(qt-advanced-docking-system CONFIG REQUIRED)
 
 add_executable(example example.cpp)
-target_link_libraries(example qt-advanced-docking-system::qt-advanced-docking-system)
+target_link_libraries(example qt-advanced-docking-system::qt-advanced-docking-system Qt::Core)
diff --git a/recipes/qt-advanced-docking-system/all/test_package/conanfile.py b/recipes/qt-advanced-docking-system/all/test_package/conanfile.py
index fd42f214c6b309..87d6d3e03e447a 100644
--- a/recipes/qt-advanced-docking-system/all/test_package/conanfile.py
+++ b/recipes/qt-advanced-docking-system/all/test_package/conanfile.py
@@ -1,10 +1,19 @@
-from conans import ConanFile, CMake, tools
+from conan import ConanFile
+from conan.tools.build import can_run
+from conan.tools.cmake import CMake, cmake_layout
 import os
 
 
 class AdsTestConan(ConanFile):
     settings = "os", "compiler", "build_type", "arch"
-    generators = "cmake", "cmake_find_package_multi"
+    generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
+    test_type = "explicit"
+    
+    def requirements(self):
+        self.requires(self.tested_reference_str)
+
+    def layout(self):
+        cmake_layout(self)
 
     def build(self):
         cmake = CMake(self)
@@ -13,5 +22,5 @@ def build(self):
 
     def test(self):
         if not tools.cross_building(self):
-            bin_path = os.path.join("bin", "example")
-            self.run(bin_path, run_environment=True)
+            bin_path = os.path.join(self.cpp.build.bindir, "test_package")
+            self.run(bin_path, env="conanrun")