diff --git a/itf-documentation/src/main/asciidoc/concept/concept.adoc b/itf-documentation/src/main/asciidoc/concept/concept.adoc index f8535b851a..2a0b4e8fcb 100644 --- a/itf-documentation/src/main/asciidoc/concept/concept.adoc +++ b/itf-documentation/src/main/asciidoc/concept/concept.adoc @@ -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 diff --git a/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.14.0.adoc b/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.14.0.adoc index b74adf010f..8d96c40181 100644 --- a/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.14.0.adoc +++ b/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.14.0.adoc @@ -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] @@ -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* diff --git a/pom.xml b/pom.xml index 835d56345e..799c782914 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ org.junit junit-bom - 5.11.0 + 5.11.2 import pom