IntelliJ cannot recognize the 'xml' File from Selenium Test with TestNG
I am using an IntelliJ ULTIMATE 14 in a MAC and I would like to develop a Selenium Test with TestNG. My Java class runs well. But when I create the
test.xmlfile, IntelliJ does not recognize this. This means, when I click with right Button on the
test.xmlfile I have not the Option to RUN the Test with the
test.xmlfile.
I've been in Run/Debug Configurations and I've set up a new RUN Option:
-
+
TestNG - Name: LoginTest
- Suite Option selected
- Suite:
/PATH/PROJECT/src/test/resources/test.xml
- In single Module:
/PATH/PROJECT/src/test/resources/test.xml
- JDK Settings / VM option:
-ea
Below this window I get the following ERROR message:
Run Configuration Error: Unable to parse
`/PATH/PROJECT/src/test/resources/test.xml`
I have used too the Maven Dependency:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
Please someone has a tip?
请先登录再写评论。
Hi,
from the error: bundled testng failed to parse your test.xml. Could you please share its content?
Thanks
The
content is:works fine here. Did you try to restart?
Yes I've tried re-start.
file.My IntelliJ does not recognize the
This means, when I click with right Button on the file, I have not the Option to RUN the Test with the file.
I've been in Run/Debug Configurations and I've set up a new RUN Option, but below this window I get the following ERROR message:
Run Configuration Error: Unable to parse `/PATH/PROJECT/src/test/resources/test.xml`when I run though XML file I get the following message:
...
...
Can you run this test.xml from command line? Because you've paste an internal testng error and IDEA can't influence this behaviour.
I found the problem. In
file I forgot the quotes ("") in the command:DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"
Thank you very much for listening.
No, it does not solve the problem here.
Reported as a bug: https://youtrack.jetbrains.com/issue/IDEA-228314?project=IDEA&clearDraft=true&description=%0A%0AIC-193.5233.102,%20JRE%2011.0.4%2B10-b520.11x64%20JetBrains%20s.r.o,%20OS%20Windows%2010(amd64)%20v10.0%20,%20screens%203840x2160