Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Blocker
-
Resolution: Won't Fix
-
Component/s: fitnesse-plugin
-
Labels:None
-
Environment:Fitnesse 1.4
-
Similar Issues:
Description
The FitNesse Hudson Plugin version 1.4 allows Hudson to store the results in a results.xml file.
After running all the tests, Hudson can also publish these Fitnesse results.
This is the problem that we have when the Hudson job is done:
Xml results saved as windows-1252 to D:\hudson\workspace\FitNesse 8332 BE Full\results\test.xml
Reading results as windows-1252 from D:\hudson\workspace\FitNesse 8332 BE Full\results\test.xml
Parsing results...
Got results: null
java.lang.NullPointerException
at hudson.plugins.fitnesse.FitnesseResults.getFailCount(FitnesseResults.java:98)
at hudson.tasks.test.TestResult.getBuildResult(TestResult.java:93)
at hudson.plugins.fitnesse.FitnesseResultsRecorder.perform(FitnesseResultsRecorder.java:64)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:602)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:581)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:559)
at hudson.model.Build$RunnerImpl.post2(Build.java:158)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
at hudson.model.Run.run(Run.java:1278)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:124)
Email was triggered for: Failure
Sending email for trigger: Failure
We did some investigation:
The ending tag </testResults> is missing at the end of the results.xml file and the FitNesse test results are written 2 times to the results.xml file.
Inside the results.xml file, we also see that the xml-header <?xml version="1.0"?> is written twice.
This causes the XML file to be invalid xml.
Hey i discovered the reason for that error. Here some explanation what happened.
We created a test with the name CreateAppointmentWithMedicalcaseTest.
We ran the test from within Hudson.
Hudson FitNesse plugin created a folder in the "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalcaseTest"
Then someone changed the name to CreateAppointmentWithMedicalCaseTest, without renaming the folder to "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalCaseTest"
Notice the uppercase in new name of the test in the word ..CaseTest
When executing the test in Hudson again the result folder "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalcaseTest" was again used, but when Hudson wanted to write the fitnesse results to publish in hudson, he did not seem to find the results folder. Indeed, hudson was looking for "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalCaseTest" while the folder was still "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalcaseTest".
We renamed the folder to "..\FitNesseRoot\files\testResults\CreateAppointmentWithMedicalCaseTest" and the problem in Hudson was solved.