I have installed my testNG from the marketplace. I am studying software testing using Selenium with Java. I expect a print out with this basic code, instead, it displays an error.
import org.testng.annotations.Test;
public class LoginTest {
@Test
public void loginTest()
{
System.out.println("hello");
}
}
Following is the error. I did not see error in my script or the library. Is there anything I am missing?
[RemoteTestNG] detected TestNG version 7.10.1
Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.testng.log4testng.Logger.lambda$getLogger$0(Logger.java:30)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.testng.log4testng.Logger.getLogger(Logger.java:30)
at org.testng.TestNG.(TestNG.java:111)
at org.testng.remote.support.RemoteTestNGFactory7_9.createRemoteTestNG(RemoteTestNGFactory7_9.java:16)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:67)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
… 6 more
hatim karkab is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.