兰州网站哪里做汕头seo排名收费
1.Java在Vs code 中使用单元测试失败或者如何使用单元测试
-
创建Java项目,或者将要测试的文件夹添加进工作区
要出现lib包,并有两个测试用的jar包
-
编写测试文件
public class TestUnit{ public static void main(String[] args) {String str = "AA";System.out.println(str);}@Testpublic void test1(){String str = "BB";System.out.println(str);}@Testpublic void test2(){System.out.println("hello world ");}
}
- 引入junit的包
import org.junit.Test;
- 测试
注:如果还是没有出现测试界面,那就重新打开试试