Exploring More Features
JUnit has grown over its past 20-something years into a fairly large and sophisticated tool. It’s likely that the features you’ve learned in this chapter will be enough for your needs for years to come. However, it’s also possible that one of JUnit’s other features[25] might be useful for your special circumstances. Here’s a quick summary:
assumptions | Abort execution of a test if an assumption is not met (but don’t count it as failed). |
conditional test execution | Enable or disable tests conditionally. Conditions can reference the OS, architecture, Java version, value of a system property/environment variable, or custom-coded predicates. |
display names | Rather than show the (typically) camel-cased test name during a test run, show ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access