New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guice configuration error #19
Comments
Could you include your test file as well, so I can reproduce exactly what you are seeing? Thanks. |
One more thing: the stack trace is showing RemoteTestNG, which is only used by the Eclipse plug-in. How are you invoking TestNG exactly? |
Here is the main class:
And here is the test class:
NoticeExactly the same result can be achieved by using maven: The result is then something like this: ...------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite org.apache.maven.surefire.booter.SurefireExecutionException: Guice configuration errors: 1) Error at org.testng.internal.Configuration.m_configurable(Configuration.java:54): Binding to org.testng.IConfigurable not found. No bindings to that type were found. 2) Error at org.testng.internal.Configuration.m_hookable(Configuration.java:44): Binding to org.testng.IHookable not found. No bindings to that type were found. 3) Error at org.testng.internal.Configuration.m_objectFactory(Configuration.java:10): Binding to org.testng.IObjectFactory not found. No bindings to that type were found. 4) Error at org.testng.internal.annotations.JDK15AnnotationFinder.m_transformer(JDK15AnnotationFinder.java:51): Binding to org.testng.IAnnotationTransformer not found. No bindings to that type were found. 4 error[s]; nested exception is com.google.inject.CreationException: Guice configuration errors: 1) Error at org.testng.internal.Configuration.m_configurable(Configuration.java:54): Binding to org.testng.IConfigurable not found. No bindings to that type were found. 2) Error at org.testng.internal.Configuration.m_hookable(Configuration.java:44): Binding to org.testng.IHookable not found. No bindings to that type were found. 3) Error at org.testng.internal.Configuration.m_objectFactory(Configuration.java:10): Binding to org.testng.IObjectFactory not found. No bindings to that type were found. 4) Error at org.testng.internal.annotations.JDK15AnnotationFinder.m_transformer(JDK15AnnotationFinder.java:51): Binding to org.testng.IAnnotationTransformer not found. No bindings to that type were found. 4 error[s] com.google.inject.CreationException: Guice configuration errors: 1) Error at org.testng.internal.Configuration.m_configurable(Configuration.java:54): Binding to org.testng.IConfigurable not found. No bindings to that type were found. 2) Error at org.testng.internal.Configuration.m_hookable(Configuration.java:44): Binding to org.testng.IHookable not found. No bindings to that type were found. 3) Error at org.testng.internal.Configuration.m_objectFactory(Configuration.java:10): Binding to org.testng.IObjectFactory not found. No bindings to that type were found. 4) Error at org.testng.internal.annotations.JDK15AnnotationFinder.m_transformer(JDK15AnnotationFinder.java:51): Binding to org.testng.IAnnotationTransformer not found. No bindings to that type were found. 4 error[s] at com.google.inject.BinderImpl.createInjector(BinderImpl.java:277) at com.google.inject.Guice.createInjector(Guice.java:79) at com.google.inject.Guice.createInjector(Guice.java:53) at com.google.inject.Guice.createInjector(Guice.java:43) at org.testng.TestNG.initializeInjector(TestNG.java:787) at org.testng.TestNG.initializeCommandLineSuites(TestNG.java:720) at org.testng.TestNG.run(TestNG.java:796) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. ... |
Forgot to add Eclipse commands. The procedure was:
Then later on, Cmd-Shift-F11 I have built up the Eclipse environment by using Maven: |
Environment
Issue
Even the simplest project cannot be run because of the Guice configuration error. The same is true no matter are tests run from Eclipse or from command line using Maven. The test class contains a single static method is tested with a single test method (i.e. the simplest possible test configuration).
The latest working version of TestNG on my env is 5.11.
pom.xml
4.0.0 com.hapiware.test testng-tester 1.0-SNAPSHOTThe text was updated successfully, but these errors were encountered: