如何在 Eclipse Kepler 中安装 TestNG
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22328610/
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
How to install TestNG in eclipse Kepler
提问by user1139500
I am trying to install TestNG (which I have never used before) in eclipse Kepler (4.3). I've tried to follow the directions provided on the TestNG site (http://testng.org/doc/download.html), but they do not work. The link (http://beust.com/eclipse/) just takes me to a page with a jar file. My experience is that when you use the installer within eclipse, it expects to be provided with a "p2" repository site. If I try to set up a site with the address provided, it fails.
我正在尝试在 eclipse Kepler (4.3) 中安装 TestNG(我以前从未使用过)。我尝试按照 TestNG 站点 ( http://testng.org/doc/download.html)上提供的说明进行操作,但它们不起作用。链接 ( http://beust.com/eclipse/) 只是将我带到一个包含 jar 文件的页面。我的经验是,当您在 eclipse 中使用安装程序时,它希望提供一个“p2”存储库站点。如果我尝试使用提供的地址设置站点,则会失败。
On a related note, do I need to install TestNG as something additional (outside eclipse), or is the eclipse plug-in sufficient?
在相关说明中,我是否需要安装 TestNG 作为附加功能(在 eclipse 之外),或者 eclipse 插件是否足够?
回答by Chandrayya G K
It is working fine on my machine. I just installed TestNG on my eclipse by following the steps below:
它在我的机器上运行良好。我刚刚按照以下步骤在我的 Eclipse 上安装了 TestNG:
- Click on Help > Install New software
Add the link http://beust.com/eclipsein Work with text box as shown below.
TestNG feature will be shown, expand the tree node then verify the version.
- Tick the check box of TestNG
- Click on Next button then Finish button.
- 单击“帮助”>“安装新软件”
在 Work with 文本框中添加链接http://beust.com/eclipse,如下所示。
将显示 TestNG 功能,展开树节点然后验证版本。
- 勾选TestNG的复选框
- 单击下一步按钮,然后单击完成按钮。
I guess you enter wrong software update site. Remove the /and extra spaces around the link "http://beust.com/eclipse/" then try.
我猜你输入了错误的软件更新站点。删除链接“ http://beust.com/eclipse/”周围的/和额外空格,然后尝试。
Nothing to install outside eclipse.
无需在 eclipse 之外安装。
回答by Ripon Al Wasim
TestNG can also be installed in Eclipse by using "Eclipse Marketplace..." Below are the steps:
TestNG 也可以使用“ Eclipse Marketplace...”安装在 Eclipse中,步骤如下:
- Open eclipse
- Go to Help -> Eclipse Marketplace...
- Do search for TestNG (Type the text TestNG in Find text box > Click Go button)
- After searching: Click Install button at TestNG for Eclipse area
- Follow the further instructions by eclipse
- 打开日食
- 转至帮助 -> Eclipse Marketplace...
- 搜索 TestNG(在查找文本框中输入文本 TestNG > 单击 Go 按钮)
- 搜索后:在TestNG for Eclipse区域点击Install按钮
- 按照 eclipse 的进一步说明进行操作
After successful installation: Go to Window -> Preferences. TestNG is enlisted at the left panel in pop-up.
安装成功后:转到Window -> Preferences。TestNG 在弹出窗口的左侧面板中登记。
回答by Akshay Ashtavadhani
Download Testng.jar and add testng jar as external-lib in eclipse. Eclipse will identify the testng.
下载Testng.jar 并在eclipse 中添加testng jar 作为external-lib。Eclipse 将识别 testng。