-
Notifications
You must be signed in to change notification settings - Fork 54
0012 unit test elasticsearch content with integration tests
Bruno Thomas edited this page Nov 23, 2021
·
1 revision
Date: 2018-03-14
Accepted
When doing TDD with datashare front, we can
- mock elasticsearch and assert actual queries are equals to expected ones
- use a real elasticsearch server and provision small datasets for each test context
We will create a DSL to ingest data into elasticsearch in order to avoid coupling with Elasticseach JSON API. The small library will provide a simple API to create small and testable datasets (Documnents, NamedEntities, Tags...). It will also allow the developers to create index, reset the state for tests tear down.
For datashare tests involving elasticsearch, developers will use this small DSL (if ES API change tests will fail).