- 浏览: 7257713 次
- 性别:
- 来自: 上海
最新评论
-
lgh1992314:
[u][i][b][flash=200,200][url][i ...
看看mybatis 源代码 -
尼古拉斯.fwp:
图片根本就不出来好吧。。。。。。
Android文件图片上传的详细讲解(一)HTTP multipart/form-data 上传报文格式实现手机端上传 -
ln94223:
第一个应该用排它网关吧 怎么是并行网关, 并行网关是所有exe ...
工作流Activiti的学习总结(八)Activiti自动执行的应用 -
ZY199266:
获取不到任何消息信息,请问这是什么原因呢?
ActiveMQ 通过JMX监控Connection,Queue,Topic的信息 -
xiaoyao霄:
DestinationSourceMonitor 报错 应该导 ...
ActiveMQ 通过JMX监控Connection,Queue,Topic的信息
文章列表
TestNG官方网站:
http://testng.org/doc/documentation-main.html
官方文档:
5.8 - Factories
Factories allow you to create tests dynamically. For example, imagine you want to create a test method that will access a page on a Web site several times, and you want to invoke it with different values:
Test ...
TestNG官方网站:
http://testng.org/doc/documentation-main.html
5.10 - Parallelism and time-outs
You can instruct TestNG to run your tests in separate threads in various ways.
5.10.1 - Parallel suites
This is useful if you are running several suite files (e.g. "java org.testng.TestNG tes ...
TestNG官方网站:
http://testng.org/doc/documentation-main.html
测试实例
package com.easyway.testng;
import org.testng.annotations.Test;
/**
*
* 测试方法直接通过方法依赖的实现
*
* @author longgangbai
* 2013-11-19 下午2:54:17
*
*/
public class MethodDependenciesDataTest {
@Test(groups = { ...
TestNG官方网站:
http://testng.org/doc/documentation-main.html
依赖测试的 文档:
5.7 - Dependencies
Sometimes, you need your test methods to be invoked in a certain order. Here are a few examples:
To make sure a certain number of test methods have completed and succeeded before running more test m ...
TestNG官方网站:
http://testng.org/doc/documentation-main.html
官方文档:
5.6.2 - Parameters with DataProviders
Specifying parameters in testng.xml might not be sufficient if you need to pass complex parameters, or parameters that need to be created from Java (complex objects, objects read from a prop ...
TestNG官方文档的地址:
http://testng.org/doc/documentation-main.html
5.9 - Class level annotations
The @Test annotation can be put on a class instead of a test method:
Test1.java
view source
print?
@Test
public class Test1 {
public void test1() {
在Feed4Junit主要针对junit实现的测试工具 ,在Feed4Junit在官方提供针对TestNg实现的测试框架Feed4TestNG。
Feed4Junit事例如下:
示例代码:
@RunWith(Feeder.class)
public class LoginTest {
@Test
@InvocationCount(10)
public void testLogin(String name, String password) {
System.out.println("name: ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
官方文档:
Special CSV and Excel(TM) Sheet Features
Feed4JUnit supports the import of CSV files and Excel(TM) Sheets, formulas in Excel Sheets are resolved. In the following chapters, the term data file represents CSV files as well as Excel f ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
官方文档:
Generating constrained data dynamically
Feed4JUnit supports annotations defined in JSR 303, Java 7 and Benerator 0.7 for generating random data that matches constraints.
As an example see the @Pattern annotation as an example (javax. ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
Feed4Junit自动生成测试数据:
Feed4JUnit 1.1.1 发布了,该版本支持从 CSV 文件中导入完整的 JavaBean 图表。
利用Feed4JUnit能够很方便用随机但校验过的数据执行冒烟测试来提高代码 代码覆盖率和发现由非常特殊的数据结构产生的Bug。此外还可以利用Feed4JUnit轻松定义等价类测试。
官方文档
Defining custom data sources
If you wish to retrieve data from o ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
Feed4Junit测试数据来自数据库:
Feed4JUnit 1.1.2 发布了,该版本支持数据来自数据库
利用Feed4JUnit能够很方便用随机但校验过的数据执行冒烟测试来提高代码 代码覆盖率和发现由非常特殊的数据结构产生的Bug。此外还可以利用Feed4JUnit轻松定义等价类测试。
官方文档:
Retrieving test data from a database
Databases can be declared and confi ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
Feed4Junit数据源来自文件
Feed4JUnit能够让编写JUnit的 参数化测试变得简便,并为这些测试提供预定义或随机测试数据。它能够从业务分析人员定义好的CVS或 Excel文件读取测试用例数据并在构建/单元测试框架中报告测试成功。
官方文档:
Reading test data from a file
Data sources are easily configured using the @Source annotation (org.da ...
Feed4Junit官方地址:
http://databene.org/feed4junit.html
Feed4Junit自动生成测试数据:
Feed4JUnit 1.1.1 发布了,该版本支持从 CSV 文件中导入完整的 JavaBean 图表。
利用Feed4JUnit能够很方便用随机但校验过的数据执行冒烟测试来提高代码 代码覆盖率和发现由非常特殊的数据结构产生的Bug。此外还可以利用Feed4JUnit轻松定义等价类测试。
package com.easyway.feed4junit;
import org.databene.benerator.anno.C ...
转载自:
http://www.ibm.com/developerworks/cn/java/j-lo-feed4junit/index.html
JUnit 是被广泛应用的 Java 单元测试框架,但是它没有很好的提供参数化测试的支持,很多测试人员不得不把测试数据写在程序里或者通过其它方法实现数据与代码的分离,在后续的修改和维护上有诸多限制和不便。Feed4JUnit 是开源的基于 JUnit 的扩展,通过使用 Feed4JUnit 提供的注释,用户可以很方便的把测试数据存放在文件或其它数据源。本文通过介绍及简单示例,使读者了解并能够使用 Feed4JUnit, 方便的实现数据与代码 ...
FEST-Swing是一个用于Swing GUI应用程序功能测试的java开源类库。支持模拟用户交互(鼠标操作和键盘输入)。支持JDK中的所有Swing组件。提供简洁、强大的API来创建和维护GUI功能测试。支持在HTML测试报告中嵌入GUI测试失败的截屏。能够与JUnit或TestNG一起使用。关于FEST-Swing的官方网站:
http://fest.easytesting.org/
Google的位置:
http://code.google.com/p/fest/
在Java中最常用的单元测试工具要算JUnit了。FEST-Swing是一个能够与JUnit集成 ...