csharpfritz / csharpfritz/Aspire-Minecraft
[Sprint 5] BlueMap integration testing infrastructure
- Dominant language
- C#
- Stars
- 31
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Build integration test infrastructure using hybrid RCON + BlueMap approach to verify Minecraft structures are built correctly after the sample app starts.
## Design Reference
See `docs/designs/bluemap-integration-tests.md` for the full architecture.
## Approach: Hybrid RCON + BlueMap
**Primary (RCON verification):** Use `execute if block X Y Z minecraft:cobblestone` commands to assert specific blocks exist at known `VillageLayout` coordinates. Uses existing `RconClient`. Zero render delay, deterministic.
**Secondary (BlueMap HTTP smoke test):** Verify BlueMap web UI loads and returns map metadata at port 8100. Full Playwright screenshot comparison deferred — fragile with non-deterministic 3D rendering.
## Infrastructure
- Separate test project: `tests/Aspire.Hosting.Minecraft.Integration.Tests/`
- Shared `MinecraftAppFixture` using `DistributedApplicationTestingBuilder` starts full AppHost once per test run
- Poll-based readiness: check a known block every 5s instead of fixed delays
- xUnit `IClassFixture` pattern
## First 5 Tests
1. **Fence perimeter corners** — verify `oak_fence` at calculated corner coordinates
2. **Cobblestone paths** — verify cobblestone at path coordinates between buildings
3. **Watchtower walls at origin** — verify `stone_bricks` at structure origin for first resource
4. **Health indicator wool color** — verify wool block placed for health indicator
5. **BlueMap web UI 200 OK** — HTTP GET to BlueMap port returns 200
## CI Considerations
- Linux-only CI (Docker required for Minecraft server)
- Gated job: runs after unit tests pass
- Timeout: 5 minutes (server startup + village build + assertions)
- Requires Docker-in-Docker or host Docker socket
## Acceptance Criteria
- [ ] Test project created with shared fixture
- [ ] At least 5 RCON-based block verification tests
- [ ] BlueMap HTTP smoke test
- [ ] Tests pass locally with Docker running
- [ ] CI pipeline configuration documented
Contributor guide
Research direction
Read docs/designs/bluemap-integration-tests.md first, then inspect the existing AppHost and RconClient entry points. Create tests/Aspire.Hosting.Minecraft.Integration.Tests/ with the shared MinecraftAppFixture and the five listed checks, and run them locally with Docker. Done means the tests pass and the CI job configuration is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker
- Domain
- ci-cd, devops, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100