工具篇:如何使用junit.jar进行测试
一、网上下载:junit.jar包
下载地址:https://sourceforge.net/projects/junit/?source=typ_redirect
二、导入指定项目中
三、在指定方法前使用@Test
1 package com.xfwl.reflection; 2 3 import org.junit.Test; 4 /** 5 * 测试类 6 * @function 7 * @author 小风微凉 8 * @time 2018-6-3 下午12:28:38 9 */ 10 public class TestAction { 11 12 @Test 13 public void testGetClass() throws ClassNotFoundException { 14 System.out.println("123"); 15 } 16 }
四、运行方式使用:直接在带有@Test注解的方法上上点击右键 --> run as --> JUnit Test
研究技术需要静下心来,一点一点地深究.......