最新文章列表

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

文档来自官方地址: http://testng.org/doc/documentation-main.html#testng-listeners    1. 介绍    TestNG是一个设计用来简化广泛的测试需求的测试框架,从单元测 ...
longgangbai 评论(0) 有51456人浏览 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) 有2662人浏览 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) 有2762人浏览 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) 有2402人浏览 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) 有2721人浏览 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) 有2037人浏览 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) 有2773人浏览 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) 有3639人浏览 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

TestNG参数化测试之支持数据对象

             Junit4与TestNG对比   可以参考的文献有: In pursuit of code quality: JUnit 4 vs. TestNG http://www.ibm.com/developerworks/java/library/j-cq08296/  JUnit 4 Vs TestNG – Comparison http://www.m ...
longgangbai 评论(0) 有1702人浏览 2013-11-19 12:55

TestNG参数化测试之支持数据对象

  本文描述如何从Excel中读取数据然后传递给TestNG的测试方法,此次增加了数据对象的支持。 当需要向TestNG的测试方法传递如下多列数据的时候: 我们当然不希望在测试方法为每列数据增加一个参数,我们会希望使用testObject(String caseName, String salesId, User u)这样的形式去运行测试方法,User类是一个普通的JAVABean: ...
lijingshou 评论(0) 有4297人浏览 2013-10-16 11:20

Junit与TestNG参数化测试比较

在TestNG中,直接使用@DataProvider进行参数化测试: import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static org.testng.Assert.*; public class Addition { public int add(int ...
lijingshou 评论(0) 有4620人浏览 2013-10-16 10:23

TestNG参数化测试在selenium web automation中的应用

在用selenium做web automation的时候,我们经常需要读取外部的测试数据。对于同一个场景,同一个类操作,去遍历我们的测试数据。这个时候参数化测试就可以派上用场了。 本文阐述如何结合Selenium和TestNG,利用Excel文件存储测试数据写参数化的测试 首先看下TestNG官方网站的一段代码: //This method will provide data to any ...
lijingshou 评论(0) 有2808人浏览 2013-07-31 12:45

警惕 assertEquals 和 assertNotEquals,谨慎使用 assertNotEquals

在使用  org.testng.Assert  中的        assertEquals(long actual, long expected)   和  assertNotEquals(**,**) 的时候 注意 比较两端数据类型,                 在 Assert 类中提供的              assertEquals  支持:boolean double ...
younglibin 评论(0) 有13885人浏览 2013-04-26 10:53

在eclipse上安装testng(二)

1、选择Help--->install new software (见下图:   3、点击“Add”按钮   3、填写Name (自定义)Location:http://beust.com/eclipse   4、勾选下面TestNG —>next---->agree--->ok    
oceanloong 评论(0) 有735人浏览 2013-04-10 21:16

TestNG之annotation(三)

以下是testNG在测试用例中使用的10种注解方法。 @BeforeSuite: 被此注解的方法将在所有测试运行之前运行该方法。 @AfterSuite:  被此注解的方法将在所 ...
oceanloong 评论(0) 有2656人浏览 2013-04-09 22:09

测试工具---testng 之介绍(一)

  TestNG官网地址:http://oceanloong.iteye.com/admin/blogs/new   1、介绍:       TestNG是一个设计用来简化广泛的测试需求的测试框架,从单元测试(隔离测试一个类)到集成测试(测试由有多个类多个包甚至多个外部框架组成的整个系统,例如运用服务器)。     2、编写一个测试的过程有三个典型步骤:     a、编写测试的 业 ...
oceanloong 评论(0) 有1186人浏览 2013-04-09 21:28

怎样选择Java测试框架

自动测试 成为你Java 项目 中的一部分了吗?你最爱的测试框架 是什么哪?使用的又是哪一种标准?本文的4名开发 者将和你一起分享他们在自动测 ...
yimeng528 评论(0) 有1228人浏览 2013-03-14 09:46

最近博客热门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