-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Home CN
Marc Philipp edited this page Jun 24, 2020
·
4 revisions
欢迎来到 JUnit wiki!
- 下载和安装
- 开始
- 版本记录
- Maintainer Documentation
- Deprecation Policy
- I want to help!
- Latest JUnit Questions on StackOverflow
- Latest JUnit API JavaDocs
- Assertions CN - 单元测试的必要语句
- Test Runners - how tests should be executed
- Aggregating tests in Suites - how to combine multiple related tests into a test suite
- Test Execution Order - specifying what order to run unit tests
- Exception Testing - how to specify expected exceptions in unit tests
- Matchers and assertThat - how to use Hamcrest matchers and more descriptive assertions
- Ignoring Tests - how to disable test methods or classes
- Timeout for Tests - how to specify maximum execution times for tests
- Parameterized Tests - writing tests that can be executed multiple times with different parameter values
- Assumptions with Assume - similar to assertions, but without making tests fail
- Rules - stop extending abstract test classes and start writing test rules
- Theories - write tests that are more like scientific experiments using randomly generated data
- Test Fixtures - specify set up and clean up methods on a per-method and per-class basis
- Categories - group your tests together for easier test filtering
- Use with Maven - how to use JUnit with your Maven build
- Use with Gradle - how to use JUnit with your Gradle build
- Multithreaded code and Concurrency - basic ideas behind testing concurrent code
- Java contract test helpers
- Continuous Testing
- Custom Runners
- net.trajano.commons:commons-testing for UtilityClassTestUtil per #646
- System Rules – A collection of JUnit rules for testing code that uses java.lang.System.
-
JUnit Toolbox – Provides runners for parallel testing, a
PoolingWait
class to ease asynchronous testing, and aWildcardPatternSuite
which allow you to specify wildcard patterns instead of explicitly listing all classes when you create a suite class. - junit-dataprovider – A TestNG like dataprovider (see here) runner for JUnit.
- junit-quickcheck – QuickCheck-style parameter suppliers for JUnit theories. Uses junit.contrib's version of the theories machinery, which respects generics on theory parameters.
- JGiven - Behavior-Driven Development (BDD) for JUnit