Question


I have a couple of tests written in funcunit by Bitovi, and after finally getting them to work with phantomjs I would love to automate it in a Jenkins job.
This actually allready works but I need a way to visualize my tesresults, so I read that it should be possible with the XUnit plugin for Jenkins, but it doesn't matter to what type of test patter I set it, it either says it's empty or it's not a valid xml.
Below you'll find the command I execute for running the testsuite and the results from the xml file
If anyone could help me out how to let this show he results I would be really grateful and you can have a virtual beer on me!!!

Cheers ;)

COMMAND:

cd /D D:\Jenkins\jobs\funcunit-testing\workspace\src\main\webapp
call js funcunit/open/phantomjs http://localhost:8080/qunit/BudgetTest.html -out "testresult.xml"
COPY D:\Jenkins\jobs\funcunit-testing\workspace\src\main\webapp\testresult.xml D:\Jenkins\jobs\funcunit-testing\workspace\testresult.xml

XML:

<?xml version="1.0" encoding="UTF-8" ?> 
 <testsuites>
 <testsuite time="70.448" tests="13" errors="0" failures="0" assertions="115" name="Regression tests Phase 1 - Budget">
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Wijzigen simulatiegegevens - back button" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Bedrijfswagen electrische aandrijving" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Creatie fictieve werknemer" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Extra info bij parameters" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Foutmelding maaltijdcheques" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Scherm betalingen niet tonen" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Selectie bestaande/fictieve dossiers overslaan voor boekhouder" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Labels effectieve uren" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="2 aanvragen na elkaar + breadcrumb" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Simulatiegegevens aanpassen - Wettelijk samenwonen" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Simulatiegegevens wijzigen - Voltijdse arbeidsduur" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Simulatiegegevens wijzigen - Negatieve bedragen" /> 
  <testcase class="QUnit.phantomjs:Regression tests Phase 1 - Budget" name="Loonsimulatie anuleren - werknemers niet geselecteerd" /> 
 </testsuite>
</testsuites>
Was it helpful?

Solution

Afterall it was a funcunit fault class isn't a property in testcase it has to be testclass, I've modified output.js in funcunit to write classname and it all worked. Also I've filed a bug with the developers and how they can fix it so hopefully in futer releases it'll be gone :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top