Show Test Results of QtTest in Jenkins
05:34 15 Mar 2024

I have Qt 5.12.12 and Jenkins 2.440.1 on Windows.

In my Jenkinsfile I have:

stage('Test') {
            steps {
                echo 'Testing...'
                bat 'mingw32-make -f Makefile check'
            }
        }

Which does correctly run my QtTest tests on precompiled at the stage before and returns success or failure base on tests (tested and works right).

However in Jenkins command line output and my cmd.exe terminal output differs even if I'm running the same command.

On Jenkins:

mingw32-make[3]: Entering directory 'C:/ProgramData/Jenkins/.jenkins/workspace/MyProject_main/tests/TestMessages'
call C:\ProgramData\Jenkins\.jenkins\workspace\MyProject_main\tests\TestMessages\target_wrapper.bat  debug\TestMessages.exe 
mingw32-make[3]: Leaving directory 'C:/ProgramData/Jenkins/.jenkins/workspace/MyProject_main/tests/TestMessages'

On cmd.exe output:

mingw32-make[3]: Entering directory 'C:/ProgramData/Jenkins/.jenkins/workspace/MyProject_main/tests/TestMessages'
call C:\ProgramData\Jenkins\.jenkins\workspace\MyProject_main\tests\TestMessages\target_wrapper.bat  debug\TestMessages.exe
********* Start testing of TestMessages *********
Config: Using QtTest library 5.12.12, Qt 5.12.12 (x86_64-little_endian-llp64 shared (dynamic) debug build; by GCC 7.3.0)PASS   : TestMessages::initTestCase()
PASS   : TestMessages::parseMessage1()
PASS   : TestMessages::parseMessage2()
PASS   : TestMessages::parseMessage3()
PASS   : TestMessages::parseMessage4()
PASS   : TestMessages::parseMessage5()
PASS   : TestMessages::parseMessage6()
PASS   : TestMessages::parseMessage7()
PASS   : TestMessages::parseMessage8()
PASS   : TestMessages::parseMessage9()
PASS   : TestMessages::cleanupTestCase()
Totals: 11 passed, 0 failed, 0 skipped, 0 blacklisted, 18ms
********* Finished testing of TestMessages *********
mingw32-make[3]: Leaving directory 'C:/ProgramData/Jenkins/.jenkins/workspace/MyProject_main/tests/TestMessages'

So basically:

call C:\ProgramData\Jenkins\.jenkins\workspace\MyProject_main\tests\TestMessages\target_wrapper.bat  debug\TestMessages.exe

does not output anything on Jenkins console output but can execute correctly in cmd.exe (standard windows terminal output) manually executed by me.

How can I show the test results in Jenkins console output?

Thanks...

windows qt jenkins