1.测试猿课堂-建立一个包xxx.test
假设要测试一个实现类AAAImpl,在test包新建一个类AAAImplTest:
MyEclipse中新建测试类图解
1)测试猿课堂-第一步
2)测试猿课堂-第二步
3)测试猿课堂-第三步
4)测试猿课堂-第四步
新建好的类会自动导入测试工具类
然后在测试中实例化需要测试的实现类,在测试方法中调用实现类相应的方法,写完之后,右击-run as - junit test。
测试猿课堂-单元测试的一些API:
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.