Project License: Eclipse Public License v1.0
- You will only Submit Contributions where You have authored 100% of the content.
- You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions.
- Whatever content You Contribute will be provided under the Project License(s).
Please add the following lines to your pull request description:
---
I hereby agree to the terms of the JUnit Contributor License Agreement.
Code formatting is enforced using the Spotless Gradle plugin. You can use gradle spotlessApply
to format new code and add missing license headers to source files. Formatter settings for Eclipse are available in the repository. For IntelliJ IDEA there's a plugin you can use.
- Prefer putting
<p>
on same line as text with preceding blank line. - Blank line before at-clauses/tags.
- Prefer to use
{@code foo}
over<code>foo</code>
(better escaping). - Use
@since 5.0
instead of@since 5.0.0
. - Do not use
@author
tags. Instead, we will list contributors on the website and in release notes.
- All test classes must end with a
Tests
suffix. - Example test classes that should not be picked up by the build must end with a
TestCase
suffix.
- Use
org.junit.gen5.api.Assertions
wherever possible. - Use AssertJ when richer assertions are needed.
- Do not use
org.junit.Assert
orjunit.framework.Assert
.
- Use either Mockito or hand-written test doubles.
- Use sparingly
- Do not log in utility classes (junit-commons)
- Levels
SEVERE
(Log4J:ERROR
): extra information (in addition to an Exception) about errors that will halt executionWARNING
(Log4J:WARN
): potential usage errors that should not halt executionINFO
: stuff the users might want to know but not by default (Example:ServiceLoaderTestEngineRegistry
logs IDs of discovered engines)FINE
(Log4J:DEBUG
)FINER
(Log4J:TRACE
)