chengxilo opened a new issue, #3609:
URL: https://github.com/apache/iggy/issues/3609
# BDD Test Coverage Roadmap
Cross-SDK BDD test implementation progress. Shared `.feature` files live in
`bdd/scenarios/`; each SDK implements step definitions in its own directory.
Related: #2148.
Rust already has extensive integration test coverage for most of these
features under `core/integration/tests/server/scenarios/`. These serve as the
reference implementation. The goal is to promote them into shared Gherkin
`.feature` files and implement step definitions across all SDKs.
The BDD tests should expand coverage beyond what the Rust integration tests
already verify. The integration tests check internal server state (on-disk
files, in-memory structures). The BDD tests verify end-to-end client-visible
behavior through the full stack (SDK → wire protocol → server) and should
systematically add scenarios the integration tests don't cover:
- Cross-resource isolation (does purging stream A break stream B?)
- Error cases (non-existing IDs, invalid inputs)
- Multi-resource operations (purge stream vs purge topic)
- Repeated operations after mutation (send → purge → send → poll)
## Master Progress Table
Each SDK checkbox means: `.feature` file exists in `bdd/scenarios/` AND that
SDK's step definitions pass in CI.
| Feature | Rust ref | Feature file | Rust | Go | C# | Python | PHP | Java |
Node |
|---------|:--------:|:------------:|:----:|:--:|:--:|:-----:|:--:|:--:|:---:|
| [`basic_messaging`](#basic_messaging) | — | [x] | [x] | [x] | [x] | [x] |
[x] | [x] | [x] |
| [`leader_redirection`](#leader_redirection) | — | [x] | [x] | [x] | [x] |
[ ] | [ ] | [ ] | [ ] |
| [`stream_crud`](#stream_crud) | [ref][s-ref-3] | [ ] | [ ] | [ ] | [ ] | [
] | [ ] | [ ] | [ ] |
| [`topic_crud`](#topic_crud) | [ref][s-ref-4] | [ ] | [ ] | [ ] | [ ] | [ ]
| [ ] | [ ] | [ ] |
| [`consumer_group`](#consumer_group) | [ref][s-ref-5] | [ ] | [ ] | [ ] | [
] | [ ] | [ ] | [ ] | [ ] |
| [`consumer_offset`](#consumer_offset) | [ref][s-ref-6] | [ ] | [ ] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] |
| [`user_management`](#user_management) | [ref][s-ref-7] | [ ] | [ ] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] |
| [`personal_access_token`](#personal_access_token) | [ref][s-ref-8] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| [`message_operations`](#message_operations) | [ref][s-ref-9] | [ ] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| [`partition_management`](#partition_management) | [ref][s-ref-10] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| [`system_operations`](#system_operations) | [ref][s-ref-11] | [ ] | [ ] |
[ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| [`stream_topic_purge`](#stream_topic_purge) | [ref][s-ref-12] | [x] | [x]
| [x] | [ ] | [ ] | [ ] | [ ] | [ ] |
| [`snapshot`](#snapshot) | [ref][s-ref-13] | [ ] | [ ] | [ ] | [ ] | [ ] |
[ ] | [ ] | [ ] |
> **Rust ref** links to an existing Rust integration test that can serve as
the reference when writing the `.feature` file. Take advantage of it — but also
expand coverage to catch bugs the integration test may have missed.
[s-ref-3]: #stream_crud
[s-ref-4]: #topic_crud
[s-ref-5]: #consumer_group
[s-ref-6]: #consumer_offset
[s-ref-7]: #user_management
[s-ref-8]: #personal_access_token
[s-ref-9]: #message_operations
[s-ref-10]: #partition_management
[s-ref-11]: #system_operations
[s-ref-12]: #stream_topic_purge
[s-ref-13]: #snapshot
---
## basic_messaging
Create a stream, topic, send 10 messages, poll them back, verify offsets and
payloads.
**1 scenario** in `bdd/scenarios/basic_messaging.feature`
| SDK | File |
|-----|------|
| Rust | `bdd/rust/tests/basic_messaging.rs` |
| Go | `bdd/go/tests/basic_messaging.go` |
| C# |
`foreign/csharp/Iggy_SDK.Tests.BDD/StepDefinitions/BasicMessagingOperationsSteps.cs`
|
| Python | `bdd/python/tests/test_basic_messaging.py` |
| PHP | `bdd/php/tests/BasicMessagingFeatureTest.php` |
| Java |
`bdd/java/src/test/java/org/apache/iggy/bdd/BasicMessagingSteps.java` |
| Node.js | `foreign/node/src/bdd/` |
## leader_redirection
Client redirects from follower to leader; direct leader connect;
single-server fallback; multiple clients converge to same leader.
**4 scenarios** in `bdd/scenarios/leader_redirection.feature`. **Requires
cluster compose.**
| SDK | File |
|-----|------|
| Rust | `bdd/rust/tests/leader_redirection.rs` |
| Go | `bdd/go/tests/leader_redirection.go` |
| C# |
`foreign/csharp/Iggy_SDK.Tests.BDD/StepDefinitions/LeaderRedirectionSteps.cs` |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
---
## stream_crud
Create, get-by-id, list-all, update, delete streams.
- **Rust reference:**
`core/integration/tests/cli/stream/test_stream_{create,delete,get,list,update}_command.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## topic_crud
Create, get-by-id, list-all, update, delete topics within a stream.
- **Rust reference:**
`core/integration/tests/cli/topic/test_topic_{create,delete,get,list,update}_command.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## consumer_group
Create, get-by-id, list-all, delete consumer groups. Join and leave consumer
groups.
- **Rust reference:**
`core/integration/tests/server/scenarios/consumer_group_join_scenario.rs`,
`consumer_group_duplicate_name_create_scenario.rs`,
`consumer_group_with_single_client_polling_messages_scenario.rs`,
`consumer_group_with_multiple_clients_polling_messages_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## consumer_offset
Store/retrieve consumer offsets. Verify auto-commit and offset correctness.
- **Rust reference:**
`core/integration/tests/server/scenarios/offset_scenario.rs`,
`invalid_consumer_offset_scenario.rs`,
`consumer_group_auto_commit_reconnection_scenario.rs`,
`consumer_group_offset_cleanup_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## user_management
Create, update, delete users. Change password. Assign and verify permissions.
- **Rust reference:**
`core/integration/tests/server/scenarios/user_scenario.rs`,
`permissions_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## personal_access_token
Create with expiry, list, revoke PATs. Authenticate with a token. Verify
expiry and scoping.
- **Rust reference:**
`core/integration/tests/server/scenarios/cross_protocol_pat_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## message_operations
Send messages with custom headers. Poll with offset/consumer-group
semantics. Verify header round-trip. Verify header size limit (≤ 64 KB).
- **Rust reference:**
`core/integration/tests/server/scenarios/message_headers_scenario.rs`,
`message_size_scenario.rs`, `create_message_payload.rs`,
`single_message_per_batch_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## partition_management
Create and delete partitions on an existing topic. Verify partition count
updates.
- **Rust reference:**
`core/integration/tests/cli/partition/test_partition_{create,delete}_command.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## system_operations
Fetch server stats (PID, memory, CPU, counts). Ping. Fetch client info.
- **Rust reference:**
`core/integration/tests/server/scenarios/system_scenario.rs`,
`core/integration/tests/cli/system/test_{ping,stats,snapshot}_*.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## stream_topic_purge
Purge stream (all topics); purge single topic; verify isolation between
streams; verify isolation between topics; error on non-existing stream; error
on non-existing topic.
**6 scenarios** in `bdd/scenarios/stream_topic_purge.feature`
- **Rust reference:**
`core/integration/tests/server/scenarios/purge_delete_scenario.rs`
(run_purge_topic)
| SDK | File |
|-----|------|
| Rust | `bdd/rust/tests/stream_topic_purge.rs` |
| Go | `bdd/go/tests/stream_topic_purge.go` |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
## snapshot
Create and restore file-based snapshots. Verify data integrity after restore.
- **Rust reference:**
`core/integration/tests/server/scenarios/snapshot_scenario.rs`
| SDK | File |
|-----|------|
| Rust | — |
| Go | — |
| C# | — |
| Python | — |
| PHP | — |
| Java | — |
| Node.js | — |
---
## How to Implement a Feature
For each feature in the table above:
1. **Write the `.feature` file** in `bdd/scenarios/`. Study the linked Rust
reference test, then add scenarios it doesn't cover (isolation, error cases,
repeated operations).
2. **Implement Rust step definitions** in `bdd/rust/tests/steps/`, add a
test entrypoint in `bdd/rust/tests/<feature>.rs`, and a context in
`bdd/rust/tests/common/`.
3. **Wire the runner** — add the feature name to the `case` switch in
`scripts/run-bdd-tests.sh` and gate per-SDK support in `run_suite()`.
4. **Update `docker-compose.yml`** to mount the new `.feature` file and add
filter logic in each service command.
5. **Implement step definitions in each foreign SDK**, then tick the SDK's
checkbox above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]