0

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:

enter image description here

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.

  • hi, @IgorStravlov, could you have a try with the latest beta of TestNG Eclipse plugin, you can install from the [beta update site]( http://testng.org/eclipse-beta). I'm not sure how come the java ServiceLoader failed to parse the configuration file `org.testng.remote.support.RemoteTestNGFactory` on your classpath. BTW, could you try to install your eclipse instance and TestNG plugin to a normal path, for example, `c:\eclipse` (the point is to make sure not special char on the path) – XuQing Tan Aug 05 '16 at 10:24

1 Answers1

0

You've found an issue. I reported it on https://github.com/cbeust/testng-eclipse/issues/271

juherr
  • 5,640
  • 1
  • 21
  • 63