TestNg Eclipse插件
来源:互联网 发布:瑞士银行开户条件知乎 编辑:程序博客网 时间:2024/06/07 06:00
由于用selenium remote control需要用到TestNg,所以去找了相关资料了解了下;
TestNg有很多优点,在网上都可以搜到;
执行TestNg有几种方式:命令行、Eclipse、ant等;
因为我用eclipse工具,所以就想办法在eclipse下执行TestNg了。
那么就必须要下载TestNg的eclipse插件了;
下载地址是: http://beust.com/eclipse.
对于不同版本的eclipse要用对应不同版本的TestNg,官网上是这样描述的:
- For Eclipse 3.4 and above, enter http://beust.com/eclipse.
- For Eclipse 3.3 and below, enter http://beust.com/eclipse1.
这两个链接是对应的是不同版本的TestNg eclipse插件;
下载下来以后,放在eclipse的plugins文件夹下,然后启动eclipse,Help-software update-Installed Software,查找到TestNg Eclipse插件,点击Install(安装),安装完成后,重启eclipse,然后去Windows-show view-other,java文件夹下,有TestNg,双击 图标, 在eclipse界面下面便会出现TestNg的窗体,此时新建一个class如:
package
example1;
import
org.testng.annotations.*;
public
class
SimpleTest {
@BeforeClass
public
void
setUp() {
// code that will be invoked when this test is instantiated
}
@Test
(groups = {
"fast"
})
public
void
aFastTest() {
System.out.println(
"Fast test"
);
}
@Test
(groups = {
"slow"
})
public
void
aSlowTest() {
System.out.println(
"Slow test"
);
}
}
右键,run as,便可选择TestNg了,在Run Configrations中可配置,要运行的 class、method、suit等等;
- TestNg Eclipse插件
- Eclipse安装TestNG插件
- TestNG Eclipse插件
- Eclipse安装testng插件
- TestNG Eclipse插件
- Eclipse TestNg插件
- TestNG eclipse 插件安装
- eclipse安装TestNg插件
- Eclipse安装TestNG插件
- Eclipse安装TestNG插件
- Eclipse安装TestNG插件
- Eclipse中安装TestNG插件
- TestNG Eclipse插件的安装
- TestNG的Eclipse插件概述
- testNG eclipse 插件离线安装
- Eclipse离线安装TestNG插件
- Eclipse中安装 TestNG插件
- TestNG插件离线安装-eclipse
- pku 3009 外星人的冰球游戏~~~回溯法
- jsp(数据库连接初步和javabean)
- gdb tui
- Java从入门到精通 - Swing高级JFileChooser
- 通向 UNIX 天堂的 10 个阶梯(ZZ)
- TestNg Eclipse插件
- 管道编程
- 银行一米线 隔离带 警戒线 郑氏 雨伞架
- Linux 系统内核的调试[转]
- 我想要积分
- hibernate--:Oracle unable to create INITIAL extent for segment in tablespace xx
- 脱离数据控件做新闻发布
- 我的Javascript之旅——对象的原型链之由来
- 将timestamp 日期类型转为String 类型的小技巧