IDEA下junit的使用

1:创建一个JunitDemo Java项目




2:安装Junit,JunitGenerator2.0插件



3:创建测试文件夹


4:标记测试文件夹为"Test Sources Root"


5:创建一个被测试类(Hello),并编写一个要测试的方法(say())


6:添加junit库







7:创建测试类


8:运行结果


猜你喜欢

转载自blog.csdn.net/long_yi_1994/article/details/80289999