
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 · 439 阅读 · 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 · 3933 阅读 · 2 评论 -
maven 忽略错误,忽略单元测试
单元测试报错,不影响打包 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> ...原创 2019-12-20 15:53:48 · 2161 阅读 · 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 · 312 阅读 · 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 · 247 阅读 · 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 · 312 阅读 · 0 评论 -
spring test
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> <version>4.10</version&g原创 2018-12-18 23:52:29 · 251 阅读 · 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 · 662 阅读 · 0 评论 -
maven mock
junit junit 4.8.1 test org.easymock easymock 3.2 test翻译 2014-10-29 14:14:09 · 418 阅读 · 0 评论 -
junit学习笔记
@Before 相当与v3的setUp()@After 相当与翻译 2014-10-22 16:37:37 · 480 阅读 · 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 · 747 阅读 · 0 评论