Trendyol / stove

Stove: The easiest way of writing e2e/component tests for your JVM back-end API with Kotlin
https://trendyol.github.io/stove/
Apache License 2.0
174 stars 13 forks source link

Improve Serialization to work with different serializers, such as jackson, gson, kotlinx.serialization #560

Closed osoykan closed 3 minutes ago

osoykan commented 3 months ago

Stove supports Jackson by default, for String Ser/De. This decision limits for the use cases where Kafka needs Avro, Protobuf, or other serialization systems; or HttpSystem needs Kotlinx serialization...

This issue and PRs regarding this issue will address the improvement.

### Tasks
- [x] Create Abstraction
- [x] HttpSystem accepts ContentConverter instead of ObjectMapper, also users can configure `createClient` function.
- [x] Wiremock uses StoveSerde instead of ObjectMapper
- [x] ElasticSearch uses JsonpMapper instead of ObjectMapper
- [x] MongoDb uses StoveSerde instead of ObjectMapper
- [x] Couchbase uses Encoder and Transcoder interfaces instead of ObjectMapper
- [x] spring-kafka: ser/de can be customized, during publish and assertion
- [x] standalone-kafka: ser/de can be customized, during publish and assertion
- [x] standalone-kafka: Use ShouldBeConsumed/Published with a custom deserializer. This would prevent the need of messageAsBase64.
osoykan commented 3 minutes ago

Implemented in different PRs.