Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 492 junit bom 5.11.2 #493

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions itf-documentation/src/main/asciidoc/concept/concept.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,96 @@ void testCase( MavenTarget mavenTarget ) {
This means that within the `beforeEach` method you could access the state of the IT before the
execution of Maven can be access or done something special.

== Project Setup

The basic idea is to have setup which itself is a Maven project. That could be used to
install a pom file or other artifacts in your local cache for the integration test.

There are currently two ideas at the moment:

The first idea is to use the `@BeforeEach` annotated method `@MavenBeforeEach`. That will execute
a Maven project (as the `@MavenTest` will do), except before a method like `basic_one` ( or `basic_two`).
That would make it possible to ran a project before each test and do whatever required as a preparation
installing artifacts, or pom file (parent pom's for example or alike).

// @MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:compare-dependencies")

[source,java]
.Using `@MavenBeforeEach`
----
@MavenJupiterExtension
class IntegerIT {

@BeforeEach
@MavenBeforeEach
@MavenGoal("install")
void beforeEach(MavenExecutionResult result) {
//
}

@MavenTest
void basic_one(MavenExecutionResult result)
throws IOException {

}
@MavenTest
void basic_two(MavenExecutionResult result)
throws IOException {

}
}
----

[CAUTION]
====
* [ ] Check if we require supplemental `@MavenBeforeEach` (could we somehow infer from `@BeforeEach`?)
* [ ] is the injection into `beforeEach(MavenExecutionResult result)` possible?
* [ ] Do the annotations like `@MavenGoal` work on `beforeEach` method?
====

In the case of using `@BeforeAll` which will be executed exactly once for all test cases `basic_one`
and `basic_two`.
The question which arises here is: If this setup is required for the `basic_one` and `basic_two` how could we
combine them together?

[source,java]
.Using `@MavenBeforeEach`
----
@MavenJupiterExtension
class IntegerIT {

@BeforeAll
@MavenGoal("install")
@MavenBeforeAll
static void beforeAll(MavenExecutionResult result) {
//
}

@MavenTest
void basic_one(MavenExecutionResult result)
throws IOException {

}
@MavenTest
void basic_two(MavenExecutionResult result)
throws IOException {

}
}
----

[CAUTION]
====
* [ ] Check if we require supplemental `@MavenBeforeAll` (could we somehow infer from `@BeforeAll`?)
* [ ] Can we somehow find out the paths to the different test methods (`basic_one`, `basic_two`)?
This is required to install artifacts into the appropriate integration tests caches? (The location of that directory?)
* [ ] Do the annotations like `@MavenGoal` work on `beforeAll` method?
====

Is there a way to execute a number of Maven projects (what ever goals) in one go...(deploy pom/jar's etc.) into
temporary cache.. and reuse that for all executions?


== Open Things

.Things which currently not working or net yet tested/thought about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
:issue-479: https://github.com/khmarbaise/maven-it-extension/issues/479[Fixed #479]
:issue-481: https://github.com/khmarbaise/maven-it-extension/issues/481[Fixed #481]
:issue-483: https://github.com/khmarbaise/maven-it-extension/issues/483[Fixed #483]
:issue-488: https://github.com/khmarbaise/maven-it-extension/issues/488[Fixed #488]
:issue-492: https://github.com/khmarbaise/maven-it-extension/issues/492[Fixed #492]
:pr-460: https://github.com/khmarbaise/maven-it-extension/pull/460[Pull request #460]
:pr-462: https://github.com/khmarbaise/maven-it-extension/pull/462[Pull request #462]

Expand Down Expand Up @@ -83,6 +83,7 @@
* {issue-481} - Upgrade smpp to 7.0.0
* {issue-466} - Upgrade JUnit-BOM 5.11.0
* {issue-477} - Upgrade assertj-bom 3.26.3
* {issue-492} - Upgrade JUnit-BOM 5.11.2
* {issue-???} - ?

*Build Improvements*
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.0</version>
<version>5.11.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Loading