Hello
i am writing a small script to dive into the XML database, read the files in there and calculate some report or overview data in a form expected by managers in the company etc.
Using some basic core XML reading functions from PHP i have noticed that some of the XML files are malformed
i consistently get this type of error
On checking the file the last 2 lines in the file are
So after the XML file has finished its adding a uite> which is causing the XML to be malformed and unreadable.
If i go back into Testlog again and Edit the folder again and dont even update it, just click edit, then ok. It updates the file again and fixes it.
In our system we have hundreds of suites and thousands of testcases, so we cant be cleaning up after testlog errors everywhere its just not practical. Is this a bug? Is it known? Is there a solution like a function for testlog which will validate each files format (like editing and click ok without having to manually do it) So i can gauruntee the integrity of the files meaning i can guaruntee the integrity of the report i generate
Thanks
Aidan
i am writing a small script to dive into the XML database, read the files in there and calculate some report or overview data in a form expected by managers in the company etc.
Using some basic core XML reading functions from PHP i have noticed that some of the XML files are malformed
i consistently get this type of error
Code:
Warning: simplexml_load_file() [[URL="http://qa01.cr2.local/sandbox/function.simplexml-load-file"]function.simplexml-load-file[/URL]]: /testlog/live/Projects/Studio 1.1/Project Test Cases/Build 6/Product - Regression/Services.tgp:7: parser error : Extra content at the end of the document in /www/sandbox/testlog/testlog_report_functions.php on line 320 Warning: simplexml_load_file() [[URL="http://qa01.cr2.local/sandbox/function.simplexml-load-file"]function.simplexml-load-file[/URL]]: uite> in /sandbox/testlog/testlog_report_functions.php on line 320 Warning: simplexml_load_file() [[URL="http://qa01.cr2.local/sandbox/function.simplexml-load-file"]function.simplexml-load-file[/URL]]: ^ in /sandbox/testlog/testlog_report_functions.php on line 320
Code:
</test_suite> uite>
If i go back into Testlog again and Edit the folder again and dont even update it, just click edit, then ok. It updates the file again and fixes it.
In our system we have hundreds of suites and thousands of testcases, so we cant be cleaning up after testlog errors everywhere its just not practical. Is this a bug? Is it known? Is there a solution like a function for testlog which will validate each files format (like editing and click ok without having to manually do it) So i can gauruntee the integrity of the files meaning i can guaruntee the integrity of the report i generate
Thanks
Aidan
Comment