1.因为你@Test时import的是@org.testng.annotations.Test所以会报错 解决方法:改为import org.junit.Test;就可以了 转载于:https://www.cnblogs.com/nizuimeiabc1/p/6349503.html