通过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. css实现单行、多行文本超出显示省略号

    前言:项目中我们经常遇到这种需求,需要对单行.多行文本超出显示为省略号.这篇文章主要总结了小编解决此问题的方法,有不足之处欢迎大家指正. 单行文本省略 .ellipsis-line { border: ...

  2. SpringBoot项目 设置全局跨域

    package com.nf147.policy_project; import org.springframework.stereotype.Component; import javax.serv ...

  3. Vim常用插件命令手册

    此文章记录了,笔者使用的插件中的主要命令. junegunn/vim-plug :PlugInstall 安装插件 :PlugClean 清理插件 :PlugUpgrade 升级插件管理器 :Plug ...

  4. Vue3.0+TypeScript

    序言 资料 https://www.cnblogs.com/chanwahfung/p/11968205.html

  5. Codevs 1851 越狱 2008年湖南省队选拔赛

    1851 越狱 2008年湖南省队选拔赛 时间限制: 10 s 空间限制: 128000 KB 题目等级 : 大师 Master 题目描述 Description 监狱有连续编号为1-N的N个房间,每 ...

  6. 马尾图案之canvas的translate、scale、rotate的方法详解

    1.translate(x,y):平移 将画布的坐标原点向左右方向移动x,向上下方向移动y.canvas的默认位置是在(0,0).  例子:画布原点假如落在(1,1),那么translate(10,1 ...

  7. Dell PowerEdge服务器RAID卡驱动下载

    Dell PowerEdge服务器RAID卡驱动下载 DELL新阵列卡驱动下载 型号 支持系统驱动 H310/710 /710P/810 Win2008 x32 Windows 2008 x64 Wi ...

  8. AtCoder AGC031D A Sequence of Permutations (群论、置换快速幂)

    题目链接 https://atcoder.jp/contests/agc031/tasks/agc031_d 题解 这居然真的是个找规律神题... 首先要明白置换的一些基本定义,置换\(p\)和\(q ...

  9. 7.1 Spring原理

    7.1 Spring原理 一.spring是什么?(IOC.AOP.MVC) Spring是一个基于IOC和AOP的结构J2EE系统的框架 , 1.1 IOC 控制反转 是Spring的基础,Inve ...

  10. [心得]暑假DAY 5

    好久没更新博客了 最近事情太多太多 tarjan进阶,点双边双 T2压力 最大坑点:点双缩点 它不是直接把割点连成树(割点会有环) 而是用割点作”中介“,联接点双构成一颗树(所谓圆方树) 接着在上面进 ...