java 努力在 Netbeans IDE 8.0.2 中安装/添加 JUnit 插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32161059/
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
Struggling to install/add JUnit plugin in Netbeans IDE 8.0.2
提问by Joe
I am new to Netbeans and I am trying to install JUnit in the IDE. I have searched multiple places and can not find a clear answer. I am running Windows8 with the latest updates and Netbeans 8.0.2. I have downloaded the jar file for JUnit opened Tools => Plugins then Downloaded tab. I select the jar file but nothing happens. I have also tried to run the jar file from commandline and double clicked it and nothing happens. I am looking to expand my skills sets by practicing using JUnit so any help would be appreciated.
我是 Netbeans 的新手,我正在尝试在 IDE 中安装 JUnit。我搜索了多个地方,找不到明确的答案。我正在运行带有最新更新和 Netbeans 8.0.2 的 Windows8。我已经下载了 JUnit 的 jar 文件,打开了 Tools => Plugins 然后 Downloaded 选项卡。我选择了 jar 文件,但没有任何反应。我还尝试从命令行运行 jar 文件并双击它,但没有任何反应。我希望通过练习使用 JUnit 来扩展我的技能集,因此将不胜感激。
thank you.
谢谢。
回答by WillShackleford
It is installed by default. To see that it is installed goto Tools -> Plugins -> Installed and search for JUnit. If it is not there, check Tools -> Plugins -> Available Plugins before trying your own download.
它是默认安装的。要查看它是否已安装,请转到 Tools -> Plugins -> Installed 并搜索 JUnit。如果它不存在,请在尝试自己的下载之前检查工具 -> 插件 -> 可用插件。
To use select any java file in the projects directory, right-click Tools -> Create/Update Tests. This will create a stub test file under Test Packages under your Project in the projects tab. Select the project and right-click for Test to run all the tests or select any file and right-click for the Test File option.
要使用选择项目目录中的任何 java 文件,请右键单击工具 -> 创建/更新测试。这将在项目选项卡中的项目下的测试包下创建一个存根测试文件。选择项目并右键单击“测试”以运行所有测试或选择任何文件并右键单击“测试文件”选项。
回答by Sandeep Chatterjee
I have not used Netbeans for many years now. However, a quick search shows that during the installation process, there is an option of installing JUnit
along with Netbeans. The default option(checked) is Install JUnit
.
我已经很多年没有使用 Netbeans 了。但是,快速搜索显示,在安装过程中,有一个JUnit
与 Netbeans 一起安装的选项。默认选项(选中)是Install JUnit
。
If by any chance, the second option(Do not install JUnit
) got checked, you may want to re-install Netbeans again.
如果有任何机会,第二个选项 ( Do not install JUnit
) 被选中,您可能需要再次重新安装 Netbeans。