Invalid XML in test result (fl-run-test)
Hi, I'm using Python 2.7.1 and FunkLoad 1.16.1, and get invalid XML when running the tests. Here's an example output:
wei:simple wei$ make
fl-run-test test_Simple.py -v
test_simple (test_Simple.Simple) ... Ok
----------------------------------------------------------------------
Ran 1 test in 0.041s
OK
wei:simple wei$ fl-build-report simple-test.xml
Error: invalid xml bench result file
Note that you can generate a report only for a
bench result done with fl-run-bench (and not on a test
resu1lt done with fl-run-test).
Xml parser element stack: ['root']
Traceback (most recent call last):
File "/usr/local/bin/fl-build-report", line 8, in <module>
load_entry_point('funkload==1.16.1', 'console_scripts', 'fl-build-report')()
File "/Library/Python/2.7/site-packages/funkload-1.16.1-py2.7.egg/funkload/ReportBuilder.py", line 285, in main
File "/Library/Python/2.7/site-packages/funkload-1.16.1-py2.7.egg/funkload/ReportBuilder.py", line 104, in parse
xml.parsers.expat.ExpatError: junk after document element: line 2, column 0
The generated XML is here: https://gist.github.com/1a3d55e8a386bbf514ad
Oh, apparently you can't build reports from individual test results, only bench results. That said, is there a way to generate valid XML from fl-run-test, since I'm writing a custom parser to process the results?
Hi, yes reporting works only on bench result file, this is reported in the above error message.
Anyway you are right the test result output is not XML and should be fixed, this is in the todo list, thanks for the reminder.
ben
Thanks Ben. Do you have an estimate on when this will be fixed? Or, if you point me to the approximate place I can fix it for us.