mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2024-10-23 08:34:16 +08:00
e6338f95c2
Removed the section about mutation testing as this dependency has never really been used and was already removed
21 lines
813 B
Plaintext
21 lines
813 B
Plaintext
= Testing
|
|
|
|
== Unit tests
|
|
|
|
Unit tests in the project are run with
|
|
|
|
----
|
|
./mvnw test
|
|
----
|
|
|
|
== Integration tests
|
|
|
|
Integration tests are executed when
|
|
----
|
|
./mvnw verify
|
|
----
|
|
is run. There must be _docker_ running, as the integration tests use docker to start an Elasticsearch server.
|
|
|
|
Integration tests are tests that have the Junit5 Tag `@Tag("integration-test")` on the test class. Normally this should not be set explicitly, but the annotation `@SpringIntegrationTest` should be used. This not only marks the test as integration test, but integrates an automatic setup of an Elasticsearch Testcontainer and integrate this with Spring, so
|
|
that the required Beans can be automatically injected. Check _src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestClientBasedTests.java_ as a reference setup
|