2017-11-08 2:35 GMT+01:00 Christian Gagneraud <chg...@gmail.com>: > On 8/11/2017 11:50 AM, Xavier Bigand wrote: >> >> Thank you Christian for answer. >> >> Yes I thought to create a static library of our project, but as we have >> many IDE it will be an effort to do that. So I think that I found a better >> solution as we already have a special build Developer for us, we can simply >> add support of new application command line options to launch it in >> automated test mode. >> >> But if I do that will we able to launch tests directly from QtCreator as >> suite tests or at least with a new running target (with correct launch >> options)? > > > I think i see what you're trying to do, let's see: > - you have an (GUI) app that has built-in auto-tests > - you want these auto-test to be executed by QtC when you hit the "run all > tests" > - your app needs extra parameter to tell it to run the auto-tests > > If you're on Linux, you could add a shell script that has a name (and a > path) compatible with QtC test scanner. > This shell script is as simple as: > ---- > #!/bin/sh > set -e > relative/path/to/app --run-auto-tests > ---- > > But then your app will have to generate test results compatible with either > QtTest or GoogleTest. I think they both generate junit files, so your app in > auto-test mode has to generate junit files, that QtC will be able to parse > and analyse.
Just want to add: I know that at least in the case of GoogleTest, Qt Creator will parse the stdout/stderr output from gtest, not junit files (I know because I was recently trying to make some improvements there). Elvis > > Is it what you're trying to do? > > Chris > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest