Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98538

How to fix "{"name":"error","attributes":{"message":"Exception happens in the Test Runner." in VS code

$
0
0

I have installed Java Language support extension and have imported TestNG jar but on running the Test in VS code the following error is printed in Java Test Runner console

 {"name":"error","attributes":{"message":"Exception happens in the Test Runner.","trace":"java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
    at com.microsoft.java.test.runner.testng.TestNGRunner.run(TestNGRunner.java:33)
    at com.microsoft.java.test.runner.testng.TestNGLauncher.execute(TestNGLauncher.java:32)
    at com.microsoft.java.test.runner.Launcher.main(Launcher.java:57)
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 3 more
"}}.

I have tried checking the launch.json and I have also tried reinstalling extension but nothing works.

public class Test_2 {
    @Test
    void setup()
    {
        System.out.println("Setup");
    }
}

Viewing all articles
Browse latest Browse all 98538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>