How can i run an appium testcase in console?

i can run testcases in eclipse, and i want to run it through console, i use this command
java -cp .:simpletest.jar:junit.jar org.junit.runner.JUnitCore com.imail.autotest.simpletest.SimpleTest

but only get an Exception Exception in thread “main” java.lang.NoClassDefFoundError: org/openqa/selenium/Capabilities
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.junit.runner.JUnitCore.runMain(
at org.junit.runner.JUnitCore.runMainAndExit(
at org.junit.runner.JUnitCore.main(
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.Capabilities
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(

is there anyone can tell me how to make it? thanks a lot

go to command line cd …\yourjavaProject
try java -cp Lib*;bin com.imail.autotest.simpletest.SimpleTest
where bin , is your project bin
Lib\* - in , my case is a folder Lib where keep my external
jar file

1 Like