Moritz Halbritter 6ae31bc56d Merge pull request #190 from michael-simons
* pr/190:
  Polish "Add smoketests for relevant Neo4j features"
  Add smoketests for relevant Neo4j features

Closes gh-190
2023-10-11 11:42:08 +02:00
2023-05-26 11:07:04 +01:00
2023-10-04 11:51:20 +02:00
2023-08-10 09:21:19 +02:00
2023-05-26 11:07:04 +01:00
2023-05-26 11:07:04 +01:00
2023-05-26 11:07:04 +01:00
2023-10-09 14:52:43 +01:00
2022-11-24 11:47:04 +01:00
2023-01-09 11:02:53 +01:00
2023-01-09 11:02:53 +01:00
2022-07-04 17:01:00 +01:00

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
= Spring AOT Smoke Tests

A suite of tests for applications using AOT on the JVM and in GraalVM native images.
There are two types of tests: unit tests and application tests.

Unit tests are processed ahead of time and are then either run on the JVM or as a native executable.
Unit tests can be run on the JVM using the `test` task and as a native executable using the `nativeTest` task.

Application tests are always executed on the JVM against an application that's running on the JVM or as a native executable.
The `appTest` task tests the application running on the JVM.The `nativeAppTest` task tests the application running as a native executable.

== Contributing

Please read and follow the link:CONTRIBUTING.adoc[contributing guide].

== How to

=== Run all of a project's smoke tests

[source,]
----
./gradlew :<name of the group>:<name of the smoke test>:build
----

for example

[source,]
----
./gradlew :boot:actuator-webmvc:build
----

=== Run a specific type of tests for a project

[source,]
----
./gradlew :<name of the group>:<name of the smoke test>:<test task name>
----

Valid test task names are:

1. `appTest`  tests the application running on the JVM
2. `nativeAppTest`  tests the application running as a native executable
3. `test`  executes the AOT-processed unit tests on the JVM
4. `nativeTest`  executes the AOT-processed unit tests in a native executable

for example

[source,]
----
./gradlew :boot:actuator-webmvc:appTest
----

=== Add a new smoke test

1. Create a new directory for your smoke test in the appropriate group
2. Include the directory in `settings.gradle` (new groups only)
3. Run `./gradlew updateInfrastructure` to add the smoke test to the status page and CI pipeline

=== Test against local changes

==== Your project uses Gradle

[source,]
----
./gradlew :<name of the group>:<name of the smoke test>:build --include-build /path/to/your/project
----

Gradle https://docs.gradle.org/current/userguide/composite_builds.html#command_line_composite[will then substitute the dependency] with your provided version.

_Hint: You can use `--include-build` multiple times._

==== Your project uses Maven or --include-build does not work

First, install the snapshots into your local Maven cache.
You can now consume those snapshots using `-PfromMavenLocal` which takes a comma-separated list of group IDs:

[source,]
----
./gradlew :rest-template:build -PfromMavenLocal=org.springframework,org.springframework.data
----

The preceding example will run the `rest-template` smoke test, resolving Spring Framework and Spring Data modules from your local Maven cache.

=== Override a dependency version

As the test doesn't use the Spring Dependency Management Plugin, you can't use the `ext['...'] = '...'` method.

Instead, use https://docs.gradle.org/current/userguide/dependency_constraints.html[Gradle dependency constraints].
Say, for example, you want to update the version of Spring Session JDBC to `3.0.0-SNAPSHOT`:

[source,]
----
dependencies {
    // ...
    constraints {
        implementation('org.springframework.session:spring-session-jdbc:3.0.0-SNAPSHOT')
    }
}
----

This works for direct and transitive dependencies.
Description
No description provided
Readme 3.2 MiB
Languages
Java 97.1%
Kotlin 2.6%
HTML 0.2%