2

I am new to learning TestNG. I followed these steps:

  1. I have created testng class
  2. @Test(dataProvider="registerData")
  3. I wrote a method with four arguments and
  4. @DataProvider
  5. Call data provider

Then the error below pops up:

TestNG java.lang.NoClassDefFoundError: com/google/common/primitives/Ints

I am using Eclipse Luna Release 2 (4.4.2), Window 7

GreenGiant
  • 4,930
  • 1
  • 46
  • 76
prashanth
  • 23
  • 1
  • 4
  • please check this [answer](http://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java) for the general cause of this error – SamB Jul 20 '16 at 14:22

3 Answers3

4

It seems below jar is not available in your classpath. com.google.guava_1.6.0.jar

Download from the link below and add it to your classpath.

com.google.guava_1.6.0.jar

CARE
  • 618
  • 3
  • 11
0

The issue is known and already fixed (the fix will be available in the next version): https://github.com/cbeust/testng/pull/1086

As workarround, you can downgrade your testng version or add Guava in your classpath.

juherr
  • 5,640
  • 1
  • 21
  • 63
0
  1. Download com.google.guava_1.6.0.jar from here
    1. add .jar file to your project
Vtik
  • 3,073
  • 2
  • 23
  • 38
and_you
  • 1
  • 1