I’m having some problems implementing a simple GuiTest (that uses QTestLib) in Jenkins. In a terminal I can execute the following command:
./tst_testgui -xunitxml > testresult.xml
This command generates the following .xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" tests="3" name="TestGui">
<properties>
<property value="5.0.2" name="QTestVersion"/>
<property value="5.0.2" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testGui"/>
<testcase result="pass" name="cleanupTestCase"/>
<system-err/>
</testsuite>
In Jenkins I’m trying to do the same by executing the same command in an Execute Shell, but after building the project (works fine) and then executing de command:
./tst_testgui -xunitxml > testresult.xml
I get the following message in Jenkins:
QXcbConnection: Could not connect to display
Aborted (core dumped)
Build step ‘Execute shell’ marked build as failure
Finished: FAILURE
Does somebody know what could be the problem?
I’m running Jenkins (for the moment) on my localhost and I don’t know if I have a graphic server.
Where can I check if I’m using a graphic server in Jenkins?
BTW: There is an empty testresult.xml generated in de workspace folder.
Grtz. Niels
↧