如何为 Eclipse 安装 TestNG 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5230702/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:01:00  来源:igfitidea点击:

How to install TestNG plug-in for Eclipse

eclipseeclipse-plugintestng

提问by Laloo

I tried installing the testng plug-in for long time but eclipse is showing an error as below:

我尝试安装 testng 插件很长时间,但 eclipse 显示如下错误:

"No repository found as the location". 

I have also tried to download and install the plug-in but the same error pops up.

我也尝试下载并安装插件,但弹出相同的错误。

回答by Ripon Al Wasim

Way 1:For the Eclipse plug-in, we suggest using the update site:

方式一:对于Eclipse插件,我们建议使用更新站点:

  1. Open Eclipse
  2. Go to Help -> Install New Software...
  3. Click Add button to go to Add Repository prompt
  4. Enter Name as TestNG. In Location text box, enter the following URLs based on your need -> Click Add button
  1. 打开日食
  2. 转到帮助 -> 安装新软件...
  3. 单击添加按钮转到添加存储库提示
  4. 输入名称作为 TestNG。在位置文本框中,根据需要输入以下 URL -> 单击添加按钮

For Eclipse 3.4 and above, enter http://beust.com/eclipse.
For Eclipse 3.3 and below, enter http://beust.com/eclipse1.

对于 Eclipse 3.4 及更高版本,输入http://beust.com/eclipse
对于 Eclipse 3.3 及更低版本,输入http://beust.com/eclipse1

  1. Make sure the check box in the list is checked and click Next.
    Eclipse will then guide you through the process.
  1. 确保选中列表中的复选框,然后单击下一步。
    然后 Eclipse 将引导您完成整个过程。

After installation follow the steps below:
1. Restart eclipse
2. Go to Window-> Preferences and observe the left panel
3. TestNG is enlisted

安装后,请按照以下步骤操作:
1. 重新启动 eclipse
2. 转到 Window-> Preferences 并观察左侧面板
3. TestNG 已登记

For Installation details visit the following site:

有关安装详细信息,请访问以下站点:

http://testng.org/doc/download.html

http://testng.org/doc/download.html

Way 2:TestNG can also be installed in Eclipse by using Marketplace. Below are the steps:

方式二:TestNG也可以通过Marketplace安装在Eclipse中。以下是步骤:

  1. Open eclipse
  2. Go to Help -> Eclipse Marketplace...
  3. Do search for TestNG (Type the text TestNG in Find text box > Click Go button)
  4. After searching: Click Install button at TestNG for Eclipse area
  5. Follow the further instructions by eclipse
  1. 打开日食
  2. 转至帮助 -> Eclipse Marketplace...
  3. 搜索 TestNG(在查找文本框中输入文本 TestNG > 单击 Go 按钮)
  4. 搜索后:在TestNG for Eclipse区域点击Install按钮
  5. 按照 eclipse 的进一步说明进行操作

回答by Cedric Beust

Maybe you misspelled the URL of the update site?

也许您拼错了更新站点的 URL?

It's http://beust.com/eclipse

这是http://beust.com/eclipse

回答by Gangnus

If you are trying to install from http://beust.com/eclipseand it won't work, delete spaces in the string :-)

如果您尝试从http://beust.com/eclipse安装并且它不起作用,请删除字符串中的空格:-)

回答by Cinra

To install TestNG in Eclipse, follow the steps below :

要在 Eclipse 中安装 TestNG,请按照以下步骤操作:

  1. Go to 'Help'
  2. Click on 'Install New software'
  3. Click on 'Add'
  4. Enter Location - https://dl.bintray.com/testng-team/testng-eclipse-release/
  1. 转到“帮助”
  2. 点击“安装新软件”
  3. 点击“添加”
  4. 输入位置 - https://dl.bintray.com/testng-team/testng-eclipse-release/

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

  1. Click Next and Finish
  2. Restart Eclipse.
  1. 单击下一步并完成
  2. 重新启动 Eclipse。

回答by Giri

Copy the link http://beust.com/eclipseto notepad and copy from notepad to eclipse IDE. It worked :) Looks like using it as a hyperlink has issue.

将链接http://beust.com/eclipse复制到记事本,然后从记事本复制到 Eclipse IDE。它有效:) 看起来像使用它作为超链接有问题。