//////////////////////////////////////////

  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.

//////////////////////////////////////////

== JUnit 5

Much of the approach and helper classes described under JUnit4 apply when using JUnit5 however JUnit5
uses some slightly different class annotations when writing your tests. See the http://junit.org[JUnit5] documentation
for more details.

Create your test classes as per normal JUnit5 guidelines as shown in this example:

[source,groovy]
----
include::{rootprojectdir}/subprojects/groovy-test-junit5/src/spec/test/MyTestViaRun.groovy[tags=junit5_test_part1,indent=0]
include::{rootprojectdir}/subprojects/groovy-test-junit5/src/spec/test/MyTestViaRun.groovy[tags=junit5_test_part2,indent=0]
----
<1> This test requires the additional `org.junit.jupiter:junit-jupiter-params` dependency if not already in your project.

You can run the tests in your IDE or build tool if it supports and is configured for JUnit5.
If you run the above test in the GroovyConsole or via the `groovy` command, you will see a short text summary of the
result of running the test:

----
include::{rootprojectdir}/subprojects/groovy-test-junit5/src/spec/test/MyTestViaRun.groovy[tags=junit5_test_output,indent=0]
----

More detailed information is available at the `FINE` logging level. You can configure your logging to display such
information or do it programmatically as follows:

[source,groovy]
----
include::{rootprojectdir}/subprojects/groovy-test-junit5/src/spec/test/MyTestViaRun.groovy[tags=junit5_test_part3,indent=0]
----
