最新文章列表

RestFuse的研究(四) Junit的Statement的分析

               在RestFuse提供了多种单元测试的方式,这里只是关注常用的三种方式. 其中1.常见的请求一次        2.请求一次并回调.        3.多个请求. 在junit4中Statement可以用来执行调用.可以采用类似执行链的封装使用.在RestFuse中封装的Statement有多个,如BasicStatement:执行的普通请求相应.    H ...
longgangbai 评论(0) 有1609人浏览 2013-12-06 11:46

RestFuse的研究(三) Junit的Rule的使用和分析

          在junit中定义一些可以公用的规则(Rule),类似拦截器和拦截器链的概念.在Junit4版本中针对不同的版本Rule的接口不一样,在Junit4.11和Junit4.10 采用实现TestRule接口.在Junit4.8采用的MethodRule接口. 备注:          RestFuse使用1.2.0,           Junit采用4.10版本. 如在 ...
longgangbai 评论(0) 有2192人浏览 2013-12-06 11:01

RestFuse的研究(二) Junit的Runner的分类和模式

      在Junit4中的调用JunitCore可以采用两种方式命令行调用和编程式实现.无论那种方式最终都要调用 public Result run(Computer computer, Class<?>[] classes) { return run(Request.classes(computer, classes)); } public Result ...
longgangbai 评论(0) 有1560人浏览 2013-12-06 10:40

[转]An open-source JUnit extension to test HTTP/REST APIs

http://developer.eclipsesource.com/restfuse/   Everything you need to know to get started is displayed in the snippet below which is a fully functional HTTP Test.
longgangbai 评论(0) 有1055人浏览 2013-12-06 09:57

TestNG简单的学习(十二)TestNG运行

文档来自官方地址: http://testng.org/doc/documentation-main.html#testng-listeners    1. 介绍    TestNG是一个设计用来简化广泛的测试需求的测试框架,从单元测 ...
longgangbai 评论(0) 有51454人浏览 2013-12-03 09:08

TestNG简单的学习(十一)TestNG学习总结

       最近一直在学习关于TestNG方面的知识,根据最近的学习总结以下几点: 1.TestNG测试注解和Junit注解的不同以及生命周期: TestNG测试的一个方法的生命周期:                 @BeforeClass(执行一次)                 @BeforeMethod(N个Test 方法执行N次)                 @Tes ...
longgangbai 评论(0) 有13999人浏览 2013-12-03 09:08

TestNG简单的学习(十)TestNG @Listeners 的使用

TestNG官方网站: http://testng.org/doc/documentation-main.html   官方文档: /** * */ package com.easyway.testng.junit; import java.util.ArrayList; import java.util.HashSet; import java.util.List ...
longgangbai 评论(0) 有8630人浏览 2013-12-03 09:07

TestNG简单的学习(九)TestNG Method Interceptors 的使用

  TestNG官方网站: http://testng.org/doc/documentation-main.html   官方文档: 5.16 - Method Interceptors Once TestNG has calculated in what order the test methods will be invoked, these methods are split ...
longgangbai 评论(0) 有2661人浏览 2013-12-03 09:07

TestNG简单的学习(八)TestNG Annotation Transformers 的使用

TestNG官方网站: http://testng.org/doc/documentation-main.html     5.15 - Annotation Transformers TestNG allows you to modify the content of all the annotations at runtime. This is especially useful i ...
longgangbai 评论(0) 有2761人浏览 2013-12-03 09:07

TestNG简单的学习(七)TestNG编程方式运行

TestNG官方网站: http://testng.org/doc/documentation-main.html 官方文档: 5.12 - JUnit tests TestNG can run JUnit 3 and JUnit 4 tests. All you need to do is put the JUnit jar file on the classpath, speci ...
longgangbai 评论(0) 有2400人浏览 2013-12-02 09:22

TestNG简单的学习(六)测试工厂注释的使用

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 wi ...
longgangbai 评论(0) 有2718人浏览 2013-12-02 09:22

TestNG简单的学习(五)参数化测试数据的定制

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 s ...
longgangbai 评论(0) 有2647人浏览 2013-12-02 09:22

TestNG简单的学习(四)测试方法通过名称名称依赖实现

TestNG官方网站: http://testng.org/doc/documentation-main.html 测试实例 package com.easyway.testng; import org.testng.annotations.Test; /** * * 测试方法直接通过方法依赖的实现 * * @author longgangbai * 2 ...
longgangbai 评论(0) 有2035人浏览 2013-12-02 09:21

TestNG简单的学习(三)测试方法通过测试分组依赖实现

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: T ...
longgangbai 评论(0) 有2768人浏览 2013-12-02 09:21

TestNG简单的学习(二)参数化测试并发且多方法测试方法判定

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 pa ...
longgangbai 评论(0) 有3637人浏览 2013-11-29 15:35

TestNG简单的学习(一)类和方法级别@Test的区别

 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 ...
longgangbai 评论(0) 有9383人浏览 2013-11-29 15:31

Feed4Junit的简单使用(七)Feed4TestNg

       在Feed4Junit主要针对junit实现的测试工具 ,在Feed4Junit在官方提供针对TestNg实现的测试框架Feed4TestNG。     Feed4Junit事例如下: 示例代码: @RunWith(Feeder.class) public class LoginTest { @Test @InvocationCount(10) ...
longgangbai 评论(0) 有6083人浏览 2013-11-29 13:35

Feed4Junit的简单使用(六)数据来特定格式文件

  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 ...
longgangbai 评论(0) 有2690人浏览 2013-11-29 12:29

Feed4Junit的简单使用(五)数据来自动态约束数据

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 ra ...
longgangbai 评论(0) 有2565人浏览 2013-11-29 12:29

Feed4Junit的简单使用(四)数据来自定义数据源

Feed4Junit官方地址: http://databene.org/feed4junit.html   Feed4Junit自动生成测试数据: Feed4JUnit 1.1.1 发布了,该版本支持从 CSV 文件中导入完整的 JavaBean 图表。 利用Feed4JUnit能够很方便用随机但校验过的数据执行冒烟测试来提高代码 代码覆盖率和发现由非常特殊的数据结构产生的Bug。此外还 ...
longgangbai 评论(0) 有3043人浏览 2013-11-28 14:09

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics