如何在一个包@ NetBeans中运行所有JUnit测试? [英] How can I run all JUnit tests in one package @ NetBeans?
问题描述
我有很多测试包,有很多测试,我想只运行一些软件包。现在我必须运行整个项目(一些测试需要很长时间才能完成)或者我需要手动运行每个文件。如何在NetBeans中运行一些包?我找不到这个选项......
I have like trillion test packages with bazillion tests and I want to run just some of packages. Now I must run whole project (some tests takes long to complete) or I need to run every single file manually. How is possible to run just some packages in NetBeans ? I can't find this option ...
推荐答案
这可能不是你想要的,而是NetBeans帮助主题,运行JUnit测试,说:
It's probably not what you want, but the NetBeans help topic, Running a JUnit Test, says:
如果你想运行
项目测试的子集或者以
特定顺序运行测试,您可以创建测试
套件,指定运行
的测试作为该套件的一部分。在创建
a测试套件之后,您以
运行套件,就像运行单个测试类一样。
If you want to run a subset of the project's tests or run the tests in a specific order, you can create test suites that specify the tests to run as part of that suite. After creating a test suite you run the suite in the same way you run a single test class.
创建测试套件的主题在创建JUnit测试主题中。
Creating a test suite is covered in the topic Creating a JUnit Test.
这篇关于如何在一个包@ NetBeans中运行所有JUnit测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!