初识JUnit
2016-05-17 21:52
274 查看
1、在待测工程里,引入JUnit4库
步骤:选中被测工程>点击Buid Path>点击Add Libraries>选中JUnit,点击Next>选择JUnit4>点击Finish2、选中待测类,新建一个JUnit Test Case
勾选setUpBeforeClass()、tearDownAfterClass()、setUp()、tearDown()
选择待测类中,需要测试的方法
3、运行JUnit
4、查看测试结果
总共运行7个case,1个忽略,1是报错,5个成功
相关文章推荐
- 杭电3791-二叉搜索树
- Genymotion,高性能的 Android 模拟器
- eclipse build path功能总 结
- 创建本地RPM源之更新系统旧版软件mysql
- oracle11g 开启归档模式。
- config libigl in qt through cmake under ubuntu
- hiho1148 编程之美
- PayPal 开发详解(五):创建第一个应用,获取clientId和clientSecret
- Java中只有值传递,没有引用传递
- Python scrapy 实现网页爬虫
- leetcode笔记—Substring with Concatenation of All Words加最小的窗户子串
- linux内核mmc读写分析
- git reset 与 git revert
- hihoCoder #1038 : 01背包
- git操作
- apache开启虚拟主机localhost无法访问
- ViewPager-Shape
- faster rcnn修改demo.py保存网络中间结果
- Quartz.NET c# 教程 - 课程三:Jobs 和 JobDetails
- 那些被漏掉的JQuery总结(二)——如何给下拉框取值赋值?