Skip to content

Commit 05f1bf4

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-resource-container-selector-resolver
2 parents 8da0a4a + 35d3dd7 commit 05f1bf4

File tree

72 files changed

+1573
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1573
-333
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
2-
name: Bug report
2+
name: Report a bug or regression
33
about: Create a report to help us improve
4-
4+
type: Bug
5+
labels: ["type: bug"]
56
---
67

7-
<!-- Please provide us the version of JUnit 5 you are using and, if possible, a failing unit test with your bug report. Don't forget to describe the rationale for this issue (e.g. expected vs. actual behavior). -->
8+
<!-- Please provide us the version of JUnit 5 you are using and, if possible, a failing unit test with your bug report. Don't forget to describe the rationale for this issue (e.g. expected vs. actual behavior). Please also mention where it's a regression compared to a previous version. -->
89

910
## Steps to reproduce
1011

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/junit-team/junit5/discussions/categories/q-a
5+
about: Please ask and answer questions here
6+
- name: Ask a question (Stack Overflow)
7+
url: https://stackoverflow.com/questions/tagged/junit5
8+
about: Alternatively, ask questions here

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
name: Feature request
2+
name: Request a feature or enhancement
33
about: Suggest an idea for this project
4-
4+
type: Feature
5+
labels: ["type: new feature"]
56
---
67

78
<!-- Start by telling us what problem you’re trying to solve. Often a solution already exists! Please, don’t send pull requests to implement new features without first getting our support. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/task.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Create a task
3+
about: Create a task for a specific piece of work
4+
type: Task
5+
labels: ["type: task"]
6+
---
7+
8+
<!-- Please describe what needs to be done to consider this task completed. -->
9+
10+
## Deliverables
11+
12+
- [ ] ...

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Check out repository
3333
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3
35+
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3
3636
with:
3737
languages: ${{ matrix.language }}
3838
tools: linked
@@ -44,4 +44,4 @@ jobs:
4444
-Dscan.tag.CodeQL \
4545
allMainClasses
4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3
47+
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
fetch-depth: 1
2323
- name: Install GraalVM
24-
uses: graalvm/setup-graalvm@22cc13fe88ef133134b3798e128fb208df55e1f5 # v1
24+
uses: graalvm/setup-graalvm@6f327093bb6a42fe5eac053d21b168c46aa46f22 # v1
2525
with:
2626
distribution: graalvm-community
2727
version: 'latest'

documentation/src/docs/asciidoc/link-attributes.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ endif::[]
139139
:BeforeAllCallback: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/BeforeAllCallback.html[BeforeAllCallback]
140140
:BeforeEachCallback: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/BeforeEachCallback.html[BeforeEachCallback]
141141
:BeforeTestExecutionCallback: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.html[BeforeTestExecutionCallback]
142-
:EnableTestScopedConstructorContext: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/EnableTestScopedConstructorContext.html[@EnableTestScopedConstructorContext]
143142
:ExecutableInvoker: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/ExecutableInvoker.html[ExecutableInvoker]
144143
:ExecutionCondition: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/ExecutionCondition.html[ExecutionCondition]
145144
:ExtendWith: {javadoc-root}/org.junit.jupiter.api/org/junit/jupiter/api/extension/ExtendWith.html[@ExtendWith]

documentation/src/docs/asciidoc/release-notes/release-notes-5.11.3.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ on GitHub.
1616
[[release-notes-5.11.3-junit-platform-bug-fixes]]
1717
==== Bug Fixes
1818

19-
* ❓
19+
* Fixed a regression in method search algorithms introduced in 5.11.0 when classes reside
20+
in the default package and using a Java 8 runtime.
2021

2122
[[release-notes-5.11.3-junit-platform-deprecations-and-breaking-changes]]
2223
==== Deprecations and Breaking Changes

documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,44 @@ support the discovery of class path resource based tests, analogous to the
4747
[[release-notes-5.12.0-M1-junit-jupiter-deprecations-and-breaking-changes]]
4848
==== Deprecations and Breaking Changes
4949

50-
* ❓
50+
* When injecting `TestInfo` into test class constructors it now contains data of the test
51+
method the test class instance is being created for unless the test instance lifecycle
52+
is set to `PER_CLASS` (in which case it continues to contain the data of the test
53+
class). If you require the `TestInfo` of the test class, you can implement a class-level
54+
lifecycle method (e.g., `@BeforeAll`) and inject `TestInfo` into that method.
55+
* When injecting `TestReporter` into test class constructors the published report entries
56+
are now associated with the test method rather than the test class unless the test
57+
instance lifecycle is set to `PER_CLASS` (in which case they will continue to be
58+
associated with the test class). If you want to publish report entries for the test
59+
class, you can implement a class-level lifecycle method (e.g., `@BeforeAll`) and inject
60+
`TestReporter` into that method.
5161

5262
[[release-notes-5.12.0-M1-junit-jupiter-new-features-and-improvements]]
5363
==== New Features and Improvements
5464

65+
* New `--exclude-methodname` and `--include-methodname` options added to the
66+
`ConsoleLauncher` to include or exclude methods based on fully qualified method names
67+
without parameters. For example, `--exclude-methodname=^org\.example\..+#methodname`
68+
will exclude all methods called `methodName` under package `org.example`.
5569
* In a `@ParameterizedTest` method, a `null` value can now be supplied for Java Date/Time
5670
types such as `LocalDate` if the new `nullable` attribute in
5771
`@JavaTimeConversionPattern` is set to `true`.
5872
* `ArgumentsProvider` (declared via `@ArgumentsSource`), `ArgumentConverter` (declared via
5973
`@ConvertWith`), and `ArgumentsAggregator` (declared via `@AggregateWith`)
6074
implementations can now use constructor injection from registered `ParameterResolver`
6175
extensions.
76+
* Extensions based on `TestTemplateInvocationContextProvider` can now allow returning zero
77+
invocation contexts by overriding the new `mayReturnZeroTestTemplateInvocationContexts`
78+
method.
79+
* The new `@ParameterizedTest(requireArguments = false)` attribute allows to specify that
80+
the absence of arguments is expected in some cases and should not cause a test failure.
6281
* Allow determining "shared resources" at runtime via the new `@ResourceLock#providers`
6382
attribute that accepts implementations of `ResourceLocksProvider`.
64-
* `@EnableTestScopedConstructorContext` has been added to enable the use of a test-scoped
65-
`ExtensionContext` while instantiating the test instance.
66-
The behavior enabled by the annotation is expected to eventually become the default in
67-
future versions of JUnit Jupiter.
83+
* Extensions that implement `TestInstancePreConstructCallback`, `TestInstanceFactory`,
84+
`TestInstancePostProcessor`, `ParameterResolver`, or `InvocationInterceptor` may
85+
override the `getTestInstantiationExtensionContextScope()` method to enable receiving
86+
a test-scoped `ExtensionContext` in `Extension` methods called during test class
87+
instantiation. This behavior will become the default in future versions of JUnit.
6888
* `@TempDir` is now supported on test class constructors.
6989

7090

0 commit comments

Comments
 (0)