org.testng.xml.Parser chokes on file: URI reference
See original GitHub issueIf the test suite definition file is specified using a file: URI value, java.io.IOException is thrown, indicating that
“The filename, directory name, or volume label syntax is incorrect”
e.g.
>java -cp ./testng-6.5.1.jar org.testng.TestNG "file:///C:/TEMP/testng.xml"
A suggested fix is to replace line 148 in org.testng.xml.Parser with
147 if (m_fileName != null) {
148 File mainFile = (m_fileName.startsWith("file:"))
? new File(URI.create(m_fileName)) : new File(m_fileName);
Issue Analytics
- State:
- Created 11 years ago
- Comments:5
Top Results From Across the Web
3 - Stack Overflow
I have installed TestNG plugin in eclipse still I see the below error Referenced file contains errors (http://testng.org/testng-1.0.dtd).
Read more >During running testng xml file get error. | Selenium Forum
During running testng xml file get error. ... <?xml version="1.0" encoding="UTF-8"?> ... Error i am getting : org.testng.TestNGException: org.xml.
Read more >Any idea how to get rid of this FNF exception while running in ...
Parser.parse(Parser.java:248). at org.testng.TestNG. ... FileNotFoundException: /<project-path>/10 (No such file or directory). at java.io.
Read more >TestNG by default disables loading DTD from unsecured Urls ...
I was trying to run a simple TestNG test from the IntelliJ Idea as in the below screenshot. But ended up with the...
Read more >Untitled
Lindsay pillatsch, Football u17 nationaux, Bataluri petrom? ... Easy marwari mehndi designs, Fxp file type, Gift for christmas for kids, Preterist view of ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let me see if I can send a PR that addresses this.
@krmahadevan I think we just have to try to convert the string to URI (convert it to “file://” if fails) and provide the URI to
ISuiteParser
: