Ben Jenkins xUnit eklentisi benim Qt birim test proje için kullanmaya çalışıyorum, ama iş yapamazsınız ... İşte eklentisi
Ben ettik nedir Bugüne kadar yapılan: her şeydenBirincisi, qmakebuilder eklenti, o zaman bir Execute Shell
inşa bölüm ekleyin (qmakebuilder eklenti için .pro sağlayarak) nerede ilk rm -f
testResult ile benim birim test proje oluşturmak xml dosyası, bunun için benim için xml dosyası oluşturmak için -xunitxml
bayrağı ile test ikili çalıştırın ve diğer kelime testResult.xml
, xml dosya adı:
rm -f /home/guest/QT/unitTest/testResult.xml
cd /home/guest/QT/unitTest
./tst_unittesttest -xunitxml > testResult.xml
Son olarak Post ben Publish xUnit test result
seçip *.xml
olarak desen belirtin Eylem oluşturun.
işi Bina Burada Jenkins ile işi oluştururken alıyorum çıkışı olsa başarısız olur:
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing QTestlib-Version N/A
[xUnit] [INFO] - [QTestlib-Version N/A] - 1 test report file(s) were found with
the pattern '*.xml' relative to '/home/guest/QT/unitTest' for the testing framework
'QTestlib-Version N/A'.
[xUnit] [ERROR] - The converted file for the result file '/home/guest/QT/unitTest
/testResult.xml' (during conversion process for the metric 'QTestlib') is not
valid.
The report file has been skipped.
[xUnit] [ERROR] - The plugin hasn't been performed correctly: hudson.util.IOException2:
Failed to read /home/guest/QT/unitTest/generatedJUnitFiles/QTestlib/TEST--735044756.xml
Build step 'Publish xUnit test result report' changed build result to FAILURE
Build step 'Publish xUnit test result report' marked build as failure
Finished: FAILURE
ne xUnit Tak benim test sonucu xml dosyası dönüştürme sorun olduğunu görebileceğiniz gibi okuyabilir. <?xml version="1.0" encoding="UTF-8"?>
Herkes ne yanlış yapıyorum bir ipucu vardır:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="2" failures="0" tests="4" name="UnitTestTest">
<properties>
<property value="4.7.4" name="QTestVersion"/>
<property value="4.7.4" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase">
<!-- message="called before everything else" type="qdebug" -->
</testcase>
<testcase result="pass" name="myFirstTest"/>
<testcase result="pass" name="mySecondTest"/>
<testcase result="pass" name="cleanupTestCase">
<!-- message="called after myFirstTest and mySecondTest" type="qdebug" -->
</testcase>
<system-err>
<![CDATA[called before everything else]]>
<![CDATA[called after myFirstTest and mySecondTest]]>
</system-err>
</testsuite>
ama TEST--735044756.xml
bir tek satır xml dosyasıdır: My testResult.xml dosyası şöyle? Çıkış xml dosyası oluştururken bir sorun olmalı. Farklı bir kayda göre
Sanırım xUnit eklentisinin yapılandırmasında seçtiğiniz biçime bağlı. "QTestLib-Version N/A" (eklentinin 1.50 sürümünde eklenen) formatı, QTestLib'in -xml formatını beklemektedir. – Ignitor