"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "documentation/src/docs/asciidoc/user-guide/overview.adoc" between
junit5-r5.3.2.tar.gz and junit5-r5.4.0.tar.gz

About: JUnit 5 is a unit testing framework for the Java programming language.

overview.adoc  (junit5-r5.3.2):overview.adoc  (junit5-r5.4.0)
[[overview]] [[overview]]
== Overview == Overview
The goal of this document is to provide comprehensive reference documentation fo r The goal of this document is to provide comprehensive reference documentation fo r
programmers writing tests, extension authors, and engine authors as well as buil d tool programmers writing tests, extension authors, and engine authors as well as buil d tool
and IDE vendors. and IDE vendors.
ifdef::backend-html5[This document is also available as a link:index.pdf[PDF dow ifdef::linkToPdf[]
nload].] ifdef::backend-html5[]
This document is also available as a link:index.pdf[PDF download].
endif::backend-html5[]
endif::linkToPdf[]
[TIP] [TIP]
.Translations .Translations
==== ====
This document is also available in http://sjyuan.cc/junit5/user-guide-cn[Simplif ied Chinese] This document is also available in http://sjyuan.cc/junit5/user-guide-cn[Simplif ied Chinese]
and https://udzuki.jp/public/junit5-user-guide-ja[Japanese]. and https://udzuki.jp/public/junit5-user-guide-ja[Japanese].
==== ====
[[overview-what-is-junit-5]] [[overview-what-is-junit-5]]
=== What is JUnit 5? === What is JUnit 5?
Unlike previous versions of JUnit, JUnit 5 is composed of several different modu les from Unlike previous versions of JUnit, JUnit 5 is composed of several different modu les from
three different sub-projects. three different sub-projects.
**JUnit 5 = _JUnit Platform_ + _JUnit Jupiter_ + _JUnit Vintage_** **JUnit 5 = _JUnit Platform_ + _JUnit Jupiter_ + _JUnit Vintage_**
The **JUnit Platform** serves as a foundation for <<launcher-api,launching testi ng The **JUnit Platform** serves as a foundation for <<launcher-api,launching testi ng
frameworks>> on the JVM. It also defines the `{TestEngine}` API for developing a testing frameworks>> on the JVM. It also defines the `{TestEngine}` API for developing a testing
framework that runs on the platform. Furthermore, the platform provides a framework that runs on the platform. Furthermore, the platform provides a
<<running-tests-console-launcher,Console Launcher>> to launch the platform from the <<running-tests-console-launcher,Console Launcher>> to launch the platform from the
command line and build plugins for <<running-tests-build-gradle,Gradle>> and command line and a <<running-tests-junit-platform-runner,JUnit 4 based Runner>>
<<running-tests-build-maven,Maven>> as well as a for
<<running-tests-junit-platform-runner,JUnit 4 based Runner>> for running any `Te running any `TestEngine` on the platform in a JUnit 4 based environment. First-c
stEngine` lass
on the platform. support for the JUnit Platform also exists in popular IDEs (see
<<running-tests-ide-intellij-idea>>, <<running-tests-ide-eclipse>>,
<<running-tests-ide-netbeans>>, and <<running-tests-ide-vscode>>) and build tool
s (see
<<running-tests-build-gradle>>, <<running-tests-build-maven>>, and
<<running-tests-build-ant>>).
**JUnit Jupiter** is the combination of the new <<writing-tests,programming mode l>> and **JUnit Jupiter** is the combination of the new <<writing-tests,programming mode l>> and
<<extensions,extension model>> for writing tests and extensions in JUnit 5. The Jupiter <<extensions,extension model>> for writing tests and extensions in JUnit 5. The Jupiter
sub-project provides a `TestEngine` for running Jupiter based tests on the platf orm. sub-project provides a `TestEngine` for running Jupiter based tests on the platf orm.
**JUnit Vintage** provides a `TestEngine` for running JUnit 3 and JUnit 4 based tests on **JUnit Vintage** provides a `TestEngine` for running JUnit 3 and JUnit 4 based tests on
the platform. the platform.
[[overview-java-versions]] [[overview-java-versions]]
=== Supported Java Versions === Supported Java Versions
JUnit 5 requires Java 8 (or higher) at runtime. However, you can still test code that JUnit 5 requires Java 8 (or higher) at runtime. However, you can still test code that
has been compiled with previous versions of the JDK. has been compiled with previous versions of the JDK.
[[overview-getting-help]] [[overview-getting-help]]
=== Getting Help === Getting Help
Ask JUnit 5 related questions on {StackOverflow} or chat with us on {Gitter}. Ask JUnit 5 related questions on {StackOverflow} or chat with us on {Gitter}.
[[installation]] [[overview-getting-started]]
== Installation === Getting Started
Artifacts for final releases and milestones are deployed to Maven Central. [[overview-getting-started-junit-artifacts]]
==== Downloading JUnit Artifacts
Snapshot artifacts are deployed to Sonatype's {snapshot-repo}[snapshots reposito To find out what artifacts are available for download and inclusion in your proj
ry] under ect, refer
{snapshot-repo}/org/junit/[/org/junit]. to <<dependency-metadata>>. To set up dependency management for your build, refe
r to
[[dependency-metadata]] <<running-tests-build>> and the <<overview-getting-started-example-projects>>.
=== Dependency Metadata
[[overview-getting-started-features]]
[[dependency-metadata-junit-platform]] ==== JUnit 5 Features
==== JUnit Platform
To find out what features are available in JUnit 5 and how to use them, read the
* *Group ID*: `org.junit.platform` corresponding sections of this User Guide, organized by topic.
* *Version*: `{platform-version}`
* *Artifact IDs*: * <<writing-tests, Writing Tests in JUnit Jupiter>>
`junit-platform-commons`:: * <<migrating-from-junit4, Migrating from JUnit 4 to JUnit Jupiter>>
Internal common library/utilities of JUnit. These utilities are intended sol * <<running-tests>>
ely for usage within * <<extensions, Extension Model for JUnit Jupiter>>
the JUnit framework itself. _Any usage by external parties is not supported. * Advanced Topics
_ Use at your own - <<launcher-api>>
risk! - <<testkit>>
`junit-platform-console`::
Support for discovering and executing tests on the JUnit Platform from the c [[overview-getting-started-example-projects]]
onsole. See ==== Example Projects
<<running-tests-console-launcher>> for details.
`junit-platform-console-standalone`:: To see complete, working examples of projects that you can copy and experiment w
An executable JAR with all dependencies included is provided at Maven Centra ith, the
l under the {junit5-samples-repo}[`junit5-samples`] repository is a good place to start. The
https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-sta `junit5-samples` repository hosts a collection of sample projects based on JUnit
ndalone[junit-platform-console-standalone] Jupiter,
directory. See <<running-tests-console-launcher>> for details. JUnit Vintage, and other testing frameworks. You'll find appropriate build scrip
`junit-platform-engine`:: ts (e.g.,
Public API for test engines. See <<launcher-api-engines-custom>> for details `build.gradle`, `pom.xml`, etc.) in the example projects. The links below highli
. ght some
`junit-platform-launcher`:: of the combinations you can choose from.
Public API for configuring and launching test plans -- typically used by IDE
s and build tools.
See <<launcher-api>> for details.
`junit-platform-runner`::
Runner for executing tests and test suites on the JUnit Platform in a JUnit
4
environment. See <<running-tests-junit-platform-runner>> for details.
`junit-platform-suite-api`::
Annotations for configuring test suites on the JUnit Platform. Supported by
the
<<running-tests-junit-platform-runner,JUnitPlatform runner>> and possibly by
third-party
`TestEngine` implementations.
`junit-platform-surefire-provider`::
Support for discovering and executing tests on the JUnit Platform using
<<running-tests-build-maven,Maven Surefire>>.
[[dependency-metadata-junit-jupiter]]
==== JUnit Jupiter
* *Group ID*: `org.junit.jupiter`
* *Version*: `{jupiter-version}`
* *Artifact IDs*:
`junit-jupiter-api`::
JUnit Jupiter API for <<writing-tests,writing tests>> and <<extensions,exten
sions>>.
`junit-jupiter-engine`::
JUnit Jupiter test engine implementation, only required at runtime.
`junit-jupiter-params`::
Support for <<writing-tests-parameterized-tests,parameterized tests>> in JUn
it Jupiter.
`junit-jupiter-migrationsupport`::
Migration support from JUnit 4 to JUnit Jupiter,
only required for running selected JUnit 4 rules.
[[dependency-metadata-junit-vintage]]
==== JUnit Vintage
* *Group ID*: `org.junit.vintage`
* *Version*: `{vintage-version}`
* *Artifact ID*:
`junit-vintage-engine`::
JUnit Vintage test engine implementation that allows to run vintage JUnit te
sts, i.e. tests
written in the JUnit 3 or JUnit 4 style, on the new JUnit Platform.
[[dependency-metadata-junit-bom]]
==== Bill of Materials (BOM)
The _Bill of Materials_ POM provided under the following Maven coordinates can b
e used to
ease dependency management when referencing multiple of the above artifacts usin
g
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanis
m.html#Importing_Dependencies[Maven]
or https://docs.gradle.org/current/userguide/managing_transitive_dependencies.ht
ml#sec:bom_import[Gradle].
* *Group ID*: `org.junit`
* *Artifact ID*: `junit-bom`
* *Version*: `{bom-version}`
[[dependency-metadata-dependencies]]
==== Dependencies
All of the above artifacts have a dependency in their published Maven POMs on
the following _@API Guardian_ JAR.
* *Group ID*: `org.apiguardian`
* *Artifact ID*: `apiguardian-api`
* *Version*: `{apiguardian-version}`
In addition, most of the above artifacts have a direct or transitive dependency
to the
following _OpenTest4J_ JAR.
* *Group ID*: `org.opentest4j`
* *Artifact ID*: `opentest4j`
* *Version*: `{ota4j-version}`
[[dependency-diagram]]
=== Dependency Diagram
[plantuml, component-diagram, svg]
skinparam {
defaultFontName Open Sans
}
package org.junit.jupiter {
[junit-jupiter-api] as jupiter_api
[junit-jupiter-engine] as jupiter_engine
[junit-jupiter-params] as jupiter_params
[junit-jupiter-migrationsupport] as jupiter_migration_support
}
package org.junit.vintage {
[junit-vintage-engine] as vintage_engine
[junit:junit] as junit4
}
package org.junit.platform {
[junit-platform-commons] as commons
[junit-platform-console] as console
[junit-platform-engine] as engine
[junit-platform-launcher] as launcher
[junit-platform-runner] as runner
[junit-platform-suite-api] as suite_api
[junit-platform-surefire-provider] as surefire
}
package org.opentest4j {
[opentest4j]
}
package org.apiguardian {
[apiguardian-api] as apiguardian
note bottom of apiguardian #white
All artifacts except
opentest4j and junit:junit
have a dependency on this
artifact. The edges have
been omitted from this
diagram for the sake of
readability.
endnote
}
jupiter_api ..> opentest4j
jupiter_api ..> commons
jupiter_engine ..> engine
jupiter_engine ..> jupiter_api
jupiter_params ..> jupiter_api
jupiter_migration_support ..> jupiter_api
jupiter_migration_support ..> junit4
console ..> launcher
launcher ..> engine
engine ..> opentest4j
engine ..> commons
runner ..> launcher
runner ..> suite_api
runner ..> junit4
suite_api ..> commons
surefire ..> launcher
vintage_engine ..> engine
vintage_engine ..> junit4
[[dependency-metadata-junit-jupiter-samples]]
=== JUnit Jupiter Sample Projects
The {junit5-samples-repo}[`junit5-samples`] repository hosts a collection of sam
ple
projects based on JUnit Jupiter and JUnit Vintage. You'll find the respective bu
ild
scripts (e.g., `build.gradle`, `pom.xml`, etc.) in the projects below.
* For Gradle and Java, check out the `{junit5-jupiter-starter-gradle}` project. * For Gradle and Java, check out the `{junit5-jupiter-starter-gradle}` project.
* For Gradle and Kotlin, check out the `{junit5-jupiter-starter-gradle-kotlin}` project. * For Gradle and Kotlin, check out the `{junit5-jupiter-starter-gradle-kotlin}` project.
* For Gradle and Groovy, check out the `{junit5-jupiter-starter-gradle-groovy}` project. * For Gradle and Groovy, check out the `{junit5-jupiter-starter-gradle-groovy}` project.
* For Maven, check out the `{junit5-jupiter-starter-maven}` project. * For Maven, check out the `{junit5-jupiter-starter-maven}` project.
* For Ant, check out the `{junit5-jupiter-starter-ant}` project. * For Ant, check out the `{junit5-jupiter-starter-ant}` project.
 End of changes. 5 change blocks. 
206 lines changed or deleted 52 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)