![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
testing
kong-kong
记录流水账
展开
-
jacoco单元测试覆盖率
https://www.eclemma.org/jacoco/https://www.jacoco.org/https://www.jacoco.org/jacoco/trunk/doc/单模块maven配置<plugin> <groupId>org.jacoco</groupId> ...原创 2019-12-19 16:34:54 · 410 阅读 · 0 评论 -
jacoco多模块配置
test是一个projectjunit-test-a 是test下面的一个modulejunit-test-b是test下面的一个modulejunit-test-common是test下面的一个module,用于测试其他module,这里主要是测试junit-test-a,junit-test-btest module的pom ...原创 2019-12-19 15:33:51 · 3835 阅读 · 2 评论 -
maven 忽略错误,忽略单元测试
单元测试报错,不影响打包 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> ...原创 2019-12-20 15:53:48 · 2099 阅读 · 0 评论 -
mock
springboot使用是org.mockito,这里也使用这个HttpServletRequest request = mock(HttpServletRequest.class);when(request.getHeader("userInfo")).thenReturn("{}");when(request.getHeaderNames()).thenReturn(new Hashtable().elements());ServletRequestAttributes attribute原创 2020-12-03 13:54:37 · 296 阅读 · 0 评论 -
hamcrest test
import static org.hamcrest.MatcherAssert.*;import static org.hamcrest.Matchers.*;number test@Test public void mytest(){ int num = 50; /**数值匹配**/ //测试变量是否大于指定值 ...原创 2019-12-27 18:07:50 · 230 阅读 · 0 评论 -
spring StopWatch
import org.junit.Test;import org.springframework.util.StopWatch;import static org.junit.Assert.*;import java.util.concurrent.TimeUnit;/** * StopWatchTest * * @author kq */public cla...原创 2019-08-15 18:36:59 · 290 阅读 · 0 评论 -
spring test
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> <version>4.10</version&g原创 2018-12-18 23:52:29 · 237 阅读 · 0 评论 -
Emma+Junit+Ant test android coverage
android update -p path -n projectname -m testprojct -p The project's directory. [required]-n The project's directory. [required]原创 2014-10-24 14:09:48 · 648 阅读 · 0 评论 -
maven mock
junit junit 4.8.1 test org.easymock easymock 3.2 test翻译 2014-10-29 14:14:09 · 405 阅读 · 0 评论 -
junit学习笔记
@Before 相当与v3的setUp()@After 相当与翻译 2014-10-22 16:37:37 · 457 阅读 · 0 评论 -
junit ant emma coverage shell script
#Linux JDKexport JAVA_HOME=/usr/local/jdk/jdk1.7.0_67 #Linuxexport ANT_HOME=/usr/local/apache-ant-1.9.4export PATH=${PATH}:${ANT_HOME}/bin; # Android SDK INSTALL PATHexport ANDROID_HOM翻译 2014-10-24 16:42:02 · 727 阅读 · 0 评论