eclipse 安装TestNg

通过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,即安装成功。

 

转载于:https://www.cnblogs.com/Tracy-test/p/11349257.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值