- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://labs.carrotsearch.com/randomizedtesting.html
软件介绍
RandomizedTesting 是一个 JUnit 测试的扩展,封装了内置重复随机的测试和超时控制、参数工厂、线程执行组等等。
示例代码:
@ThreadLeakScope(Scope.TEST)
@ThreadLeakAction({Action.WARN, Action.INTERRUPT})
@ThreadLeakLingering(linger =1000)
publicstaticclassTheGoodBadAndUglyextendsRandomizedTest {
@Test
publicvoidgood() {
// I do nothing and I'm good.
}
@Test
@Repeat(iterations =10)
publicvoidbad() {
// I fail randomly, about 20% of the time.
assertFalse(randomIntBetween(1,100) <=20);
}
@Test
publicvoidugly() {
// I start and abandon a thread which falls
// outside the test's scope. The test will fail.
newThread() {
publicvoidrun() {
RandomizedTest.sleep(5000);
}
}.start();
}
}
The Science of Programming
David Gries / Springer / 1989-4-21 / USD 99.00
Describes basic programming principles and their step-by- step applications.Numerous examples are included.一起来看看 《The Science of Programming》 这本书的介绍吧!
JS 压缩/解压工具
在线压缩/解压 JS 代码
MD5 加密
MD5 加密工具
