Junit in eclipse

xiaoxiao2021-02-28  59

摘自http://www.imooc.com/video/6844

api

fail表示测试未达到预期,如期望为3,输出为2

error表示系统异常,如除数为0

项目右键-buildpath-add libraries-junit4

新建test文件夹

右键被测试类-

测试整个类:在测试类上右键,测试一个方法:在测试方法上右键

转载请注明原文地址: https://www.6miu.com/read-57189.html

最新回复(0)