Qt Creator: Auto test with custom executable
-
wrote on 19 Oct 2019, 15:31 last edited by
Hello everyone,
We're getting started with the handy Qt Quick Test framework recently, but I got a little problem with the Qt Creator AutoTest interpreted feature.
Since our application has some external runtime dependencies, the compiled programs (including the test stub) cannot be run directly in the output directory. Rather than theDESTDIR
we run the executable inDLLDESTDIR
, by adding custom executable in "Run settings".
So far so good, but when I try to run tests in Qt Creator, it always use the default run configuration to run tests so that I can never get auto tests works with Qt Creator.
Then I wonder is it possible to specify run configuration for a auto test project?
Appreciate for any ideas!Environment: Windows 10 x64, Qt Creator 4.10.0
-
Hi,
Out of curiosity, why not do it the simpler way: modify the PATH environment of the Run part and add the paths to these third party libraries ?
-
wrote on 21 Oct 2019, 16:03 last edited by
Hi SGaist, thank you for the reply.
Even though setting the PATH environment is a nice solution for most situation, but there're some other resource dependencies in our project which are base on the absolute path of the main executable. -
Can you give more details about that ?
-
wrote on 23 Oct 2019, 13:52 last edited by
For example that there's an dependency module(DLL) will use
qApp->applicationDirPath()
to make up paths to load fonts, images, add QML import paths, etc.
3/5