通过eclipse安装TestNg,过程如下:

1.点击help-->Install New Software

2.打开如下窗口,点击add,name自定义输入,Location中输入http://beust.com/eclipse,点击add

3.下面的窗口中等待加载后,会出现TestNG,全部勾选,点击下一步,后面一路点击下一步,最后一步选择我同意,点击finish,等待安装即可。

遇到的问题

在安装的过程中报错,报错内容如下:

An error occurred while collecting items to be installed
session context was:(profile=_Users_macbook_Applications_eclipse_Eclipse.app_Contents_Eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,com.beust.jcommander,1.72.0
No repository found containing: osgi.bundle,com.beust.jcommander.source,1.72.0
No repository found containing: osgi.bundle,org.apache-extras.beanshell.bsh,2.0.0.b6
No repository found containing: osgi.bundle,org.apache-extras.beanshell.bsh.source,2.0.0.b6
No repository found containing: osgi.bundle,org.testng,6.14.3.r201802240500
No repository found containing: osgi.bundle,org.testng.eclipse,6.14.3.201902250526
No repository found containing: org.eclipse.update.feature,org.testng.eclipse,6.14.3.201902250526
No repository found containing: osgi.bundle,org.testng.eclipse.maven,6.14.3.201902250526
No repository found containing: org.eclipse.update.feature,org.testng.eclipse.maven.feature,6.14.3.201902250526
No repository found containing: org.eclipse.update.feature,org.testng.p2.feature,6.14.3.r201802240500
No repository found containing: osgi.bundle,org.testng.source,6.14.3.r201802240500
No repository found containing: osgi.bundle,org.yaml.snakeyaml,1.17.0
No repository found containing: osgi.bundle,org.yaml.snakeyaml.source,1.17.0

上网搜了一圈,原因是因为缺少依赖的jar包引起的。

解决方法:

上网搜索jcommander的1.72版本jar包,下载完成后,在eclipse中导入外部依赖jar包

1.选择一个工程,点击右键,选择BuildPath-->Configure Build Path

2.点击Add External JARs...,选择下载的jar,添加完成后,点击右下角的Apply即可。

3.添加完依赖jar包后,重新按照上面的步骤安装一遍即可。

4.安装完成后,重启eclipse,安装成功验证:点击Window-->Show View-->Other;java中出现TestNG,即安装成功。

eclipse 安装TestNg的更多相关文章

  1. Eclipse安装TestNG插件

    TestNG按照其文档的定义是: TestNG是一个测试框架,其灵感来自JUnit和NUnit的,但引入了一些新的功能,使其功能更强大,使用更方便. TestNG是一个开源自动化测试框架;TestNG ...

  2. Eclipse安装TestNG

    1.在Eclipse中点击Help菜单,选择Install New Software选项,在弹出页面中输入安装地址即可安装. http://beust.com/eclipse 2. 3. 4. 等待T ...

  3. (转)关于eclipse的TestNG的插件安装方法

    背景:最近在学习spring 4.x时候,用到了testNG的测试方法,发现需要在eclipse安装testNG插件才能够正常进行单元测试. 1 插件安装 今天在配置eclipse+selenium+ ...

  4. 1--Selenium环境准备--Eclipse 添加Testng插件

    Eclipse安装TestNG TestNG官网地址:http://testng.org/ 1.离线安装TestNG插件: 受网络等因素影响,在线安装方式速度比较慢,可以通过如下方式离线安装TestN ...

  5. Eclipse中安装TestNG插件

    在Eclipse中安装TestNG也像安装其他插件一样非常方便,如下: 选择菜单:Help->Install New Software,然后在弹出窗口中的“Work with”中输入地址: ht ...

  6. 安装TestNG在eclipse中的插件

    两种方法可以安装TestNG Eclipse插件: 第一种,离线安装 TestNG Eclipse插件下载地址http://testng.org/doc/download.html. 下载下来以后,放 ...

  7. 在eclipse中安装TestNG

    https://www.cnblogs.com/baixiaozheng/p/4989856.html 1.可借助Eclipse的Marketplace来安装TestNG Eclipse插件 a.打开 ...

  8. 1、在Eclipse中安装TestNG(离线方式)

    1.TestNG安装包:链接: https://pan.baidu.com/s/1UXZlJfrp8LM-6XmDLzVXKg 密码: 46y2 2.安装教程: (1).下载testNG 离线安装包[ ...

  9. eclipse中testNG的两种安装方式

    今天给大家带来两种关于testNG中的安装方式:1.在线安装(本人亲测有效!!!)2.离线安装 一.在线安装testNG插件的步骤: 1.给大家提供一个testNG在线的安装的地址:http://dl ...

随机推荐

  1. (五) 结构化查询语言SQL——3

    4. 数据更新 1)增 对应INSERT语句.格式为INSERT INTO T[(A1,…,Ak)]  VALUES (C1,…,Ck),其中A代表表T的属性,C代表常量,A可以缺省,此时C必须严格按 ...

  2. TensorFlow - 深度学习破解验证码 实验

    TensorFlow - 深度学习破解验证码 简介:验证码主要用于防刷,传统的验证码识别算法一般需要把验证码分割为单个字符,然后逐个识别,如果字符之间相互重叠,传统的算法就然并卵了,本文采用cnn对验 ...

  3. hdu 6046 hash

    题: OwO http://acm.hdu.edu.cn/showproblem.php?pid=6046 (2017 Multi-University Training Contest - Team ...

  4. 设置Portainer管理Docker并且开启https(简单方法)

    1. 序言 Portainer是一个十分好用的docker图形化管理界面,可以很方便的查看容器状态,错误log等等. 2. 安装 安装portainer是十分简单的,只需要执行docker pull ...

  5. C/C++字符串转换函数;

    字符串转数字: char 转 int 函数: atoi   wchar  转 int 函数: _wtoi 数字转字符串: std::to_string(): std::to_wsting();

  6. CTS添加新测试用例步骤

    一.CTS添加新测试用例: 前言: google源代码中的cts测试用例集目录为:source_android4.2/cts/tests/tests/ (source_android4.2表示andr ...

  7. docker stack /swarm 替代 docker-compose 进行部署

    之前一直用docker-compose开发了几个单例的service, 今天开始压力测试, 结果发现postgres的CPU负载很重, 就想设置cpus 结果发现docker-compose V3之后 ...

  8. URAL 2092 Bolero 贪心

    C - Bolero Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit S ...

  9. 编译报错:File ended while scanning use of xxx

    出现这个问题的原因是使用某些命令时,给出的参数不完整或者漏了半个大括号: 比如, Runaway argument? {adaptivity, dynamically changing environ ...

  10. PHP依赖管理工具Composer入门

    作者: JeremyWei | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明 网址: http://weizhifeng.net/manage-php-dependency-wi ...