当试图在ubuntu中通过命令行运行testNg时,它会抛出
java –cp "bin:/home/john/selenium-lib/*" org.testng.TestNG src/testing.xml
Error: Could not find or load main class –cp
src / TestCase * /
包测试;
import org.testng.annotations.Test;
public class TestCase {
String message = "Hello World";
@Test
public void testPrintMessage() {
System.out.println("Invoked testString " + message);
}
}
的src / testing.xml
答案 0 :(得分:1)
我猜你可能会复制粘贴,因为-
(连字符)被读作特殊字符–
。请输入-cp
(连字符cp
)