Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 682 Bytes

TESTING.adoc

File metadata and controls

32 lines (24 loc) · 682 Bytes

Testing

Run the tests

./mvnw test

Create integration test

To create an integration test, you need to add the following annotation to your test class:

@MeilisearchTest
@ContextConfiguration(classes = {MeilisearchTestConfiguration.class})
class MeilisearchTest {

    @Autowired
    Client client;

    @Test
    void test() {
        // ...
    }
}

The MeilisearchTest annotation means that the test is run in integration with Meilisearch. This code makes it easy to run the container. MeilisearchTestConfiguration is a configuration class for providing a Client associated with a container run by MeilisearchTest.