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.xml file, IntelliJ does not recognize this. This means, when I click with right Button on the test.xml file I have not the Option to RUN the Test with the test.xml file.
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?
UPDATE-01:
when I run though XML file I get the following message:
org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 24; System-ID muss mit einem einzelnen oder doppelten Anführungszeichen beginnen.
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:340)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
at ...
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 24; System-ID muss mit einem einzelnen oder doppelten Anführungszeichen beginnen.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at ...
Process finished with exit code 0
UPDATE-02
The test.xml content is:
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Login Tests"> <test name="P1 Test"> <groups> <run> <include name="p1" /> </run> </groups> <classes> <class name="com.facebook.tests.Login_Test"/> </classes> </test> <test name="P2 Test"> <groups> <run> <include name="p2" /> </run> </groups> <classes> <class name="com.facebook.tests.Login_Test"> <methods> <exclude name="filloutPassFld"/> </methods> </class> </classes> </test> </suite>