v3.1.0
typed-everythingTyped value assertions for JSON & Avro, plus topic files with schema validation.
Highlights
- 01
Typed value assertions
containsRecordWithValue(V), containsRecordWithValue(Class<V>, V), and containsRecordWithValueMatching(Class<V>, Matcher<? super V>) for JSON DTOs, Avro GenericRecord, and SpecificRecord.
Read the guide → - 02
Native header overloads
KafkaTestPublisher.send(...) takes UTF-8 Map<String, String> headers or Kafka Header instances directly — no builder ceremony.
Read the guide → - 03
Topic files
spring.kafka.test.topics-file accepts YAML or JSON, validated at startup with a bundled JSON Schema.
Read the guide →
Full notes
Added
- Typed topic value assertions for JSON DTOs, Avro GenericRecord, and Avro SpecificRecord payloads.
- Native KafkaTestPublisher.send(...) header overloads for strings, JSON DTOs, Avro GenericRecord, and SpecificRecord values.
- spring.kafka.test.topics-file — YAML or JSON topic definitions with per-topic partition counts.
- Bundled JSON Schema for topic files with startup validation including invalid field path and reason.
- Dedicated integration tests covering string, JSON DTO, Avro, typed matcher, header publishing, YAML topic-file, JSON topic-file, annotation topic, and topic-file precedence scenarios.
Changed
- Bumped version to 3.1.0-SNAPSHOT.
- Updated dependency examples to io.gitlab.guisseppe:spring-kafka-test-utils:3.1.0.
- Enabled Nextra copy buttons for documentation code blocks.
- Maven Surefire excludes *IT classes so integration tests run once through Failsafe against the shared broker.
Fixed
- Updated docs dependency lockfile to resolve fixable Trivy findings in transitive @xmldom/xmldom and uuid packages.