HtmlTestRunner
HtmlTestRunner copied to clipboard
java.io.IOException: org.xml.sax.SAXParseException
- HtmlTestRunner version: latest
- Python version: 2.7
- Operating System: Linux Ubuntu 16.04
Description
Build step 'Run Performance Test' changed build result to SUCCESS
Publishing Selenium report...
Copying the reports.
parsing resultFile TestResults___main__.SeleniumTest_2019-03-28_12-40-01.html
Unable to parse TestResults___main__.SeleniumTest_2019-03-28_12-40-01.html: java.io.IOException: org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/citygo_nginx/builds/39/seleniumReports/TestResults___main__.SeleniumTest_2019-03-28_12-40-01.html; lineNumber: 8; columnNumber: 3; The element type "link" must be terminated by the matching end-tag "</link>".
Set result to FAILURE
Build step 'Publish Selenium Html Report' changed build result to FAILURE
Finished: FAILURE
What I Did
It's shows when I run tests over Jenkins using Selenium HTML report jenkins plugin to recollect HTML generated by tests. Also no css it shows over Jenkins:
Content Security Policy: The page’s settings blocked the loading of a resource at https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css (“style-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“style-src”).
This is cause HTMLTestRunner generates a wrong link :
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
instead of
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"/>