I'm struggling with this problem since 2 Days and i don't know:
1/what i did wrong
2/how to solve it
This is my Code. Very simple, no WebDriver, no Maven, no Ant, nothing.
Just a Test annotation and a System.out.println.
MyCode:
package afterall;
import org.testng.annotations.Test;
public class TestA {
@Test
public void methodA(){
System.out.println("yes");}
}
My Project Structure looks like this:
1/ I right-click on TestA.java.
2/Run as
3/TestNG Test
Stacktrace This is the only output i get:
Exception in thread "main" java.util.ServiceConfigurationError: org.testng.remote.support.RemoteTestNGFactory: Error reading configuration file
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.parse(Unknown Source)
at java.util.ServiceLoader.access$200(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
at java.util.ServiceLoader$1.hasNext(Unknown Source)
at org.testng.remote.support.ServiceLoaderHelper.getFirst(ServiceLoaderHelper.java:16)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:43)
Caused by: java.io.FileNotFoundException: C:\Users\MyUsername(Das System kann die angegebene Datei nicht finden)
//Translation: Can't find the requested file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
... 7 more
Steps done I uninstalled testng plugin and reinstalled many times.
I downgraded the plugin to 6.9.11 and 6.9.10
I deleted the .metadata from eclipse workspace.
Please Help! Thanx in advance.
You've found an issue. I reported it on https://github.com/cbeust/testng-eclipse/issues/271