Comments (4)
Could you include your test file as well, so I can reproduce exactly what you are seeing?
Thanks.
from testng.
One more thing: the stack trace is showing RemoteTestNG, which is only used by the Eclipse plug-in. How are you invoking TestNG exactly?
from testng.
Here is the main class:
package com.hapiware.test;
public class tester
{
public static void main(String[] args)
{
System.out.println(add(1, 3));
}
public static int add(int a, int b)
{
return a + b;
}
}
And here is the test class:
package com.hapiware.test;
import org.testng.annotations.Test;
public class TesterTest
{
@Test
public void test()
{
tester.add(1, 2);
}
}
Notice
Exactly the same result can be achieved by using maven: mvn clean test
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. ...
from testng.
Forgot to add Eclipse commands. The procedure was:
- Cmd-Shift-F11 (Run Last Launched)
- Select TestNG, if asked
Then later on, Cmd-Shift-F11
I have built up the Eclipse environment by using Maven: mvn eclipse:clean eclipse:eclipse
and then using Import... command from Eclipse.
from testng.
Related Issues (20)
- Support the ability to inject custom listener factory
- TestResult lost if failure creating RetryAnalyzer HOT 3
- How to dynamically adjust the number of TestNG threads after IExecutorFactory is deprecated? HOT 1
- Public variables that are initialized in @BeforeSuite are being deallocated during the test run HOT 4
- How to enable generateTestResultAttributes programatically using Java ? HOT 1
- Should not we use the lock everywhere suiteResult is used? HOT 1
- Associate a unique id with every test class object instantiated by TestNG
- Discrepancy with combination of (Shared Thread pool and Method Interceptor) HOT 1
- IInvokedMethodListener Iinvoked method does not return correct instance during @BeforeMethod, @AfterMethod and @AfterClass
- Please document project's PGP artifact signing keys HOT 2
- Why is my test case not retried but ignored after execution failure? HOT 5
- Possible to merge PR 3067 in 7.9.0 HOT 2
- Super class annotated with ITestNGListenerFactory makes derived test class throw TestNGException on execution HOT 1
- Test cases are being skipped when running in parallel a factory class containing dependent methods HOT 11
- Update from testng 7.9.0 to 7.10.0 break maven build with junit5 HOT 11
- Replacement API for `IClass.getInstanceHashCodes()` and `IClass.getInstances(boolean)` HOT 19
- How come TestNG listeners are global? HOT 3
- Failing while building testng version 7.7.1 using ./gradlew build HOT 3
- ListenerComparator doesn't work HOT 4
- ITestNGListenerFactory is broken and never invoked HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testng.