Skip to content

Increment 1 - Step 6: Unit & Integration Testing - #6

Merged
angelobarbu merged 1 commit into
increment-1from
increment-1-step-6
Aug 22, 2026
Merged

Increment 1 - Step 6: Unit & Integration Testing#6
angelobarbu merged 1 commit into
increment-1from
increment-1-step-6

Conversation

@angelobarbu

@angelobarbu angelobarbu commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Step 6: Unit & Integration Testing

First test suite for every layer of the stack, built entirely on Qt Test — and with it, the project's last source-level dependency removed.

What's new

  • Unit tests (Qt Test, one QObject class per binary): modulo_core_tests (project version), modulo_api_health_dto_tests / modulo_api_error_dto_tests (DTO round-trips, rejection of missing/mistyped fields), modulo_api_json_tests (api::json::require* never falls back to QJson's silent defaults), modulo_server_config_tests (defaults, every variable, empty-means-unset, port 0, malformed ports → config.invalid_port). Data-driven cases use _data() slots.
  • Integration test modulo_integration_tests: a real QHttpServer on an OS-assigned loopback port with a real QNetworkAccessManager client — /api/v1/health body and version, and the 404 JSON error envelope. Opt-in via MODULO_TEST_DB_URL; otherwise it QSKIPs and CTest reports Skipped, so ctest --preset all never needs Docker to pass.
  • QML smoke test modulo_client_qml_tests via QUICK_TEST_MAIN, run offscreen automatically.
  • tests/support/include/modulo/testing/integration.h — shared fixtures (MODULO_REQUIRE_TEST_DATABASE(), blocking httpGet() with timeout).
  • Removed Catch2 dependency

@angelobarbu
angelobarbu merged commit 3564bd9 into increment-1 Aug 22, 2026
1 check passed
@angelobarbu
angelobarbu deleted the increment-1-step-6 branch August 22, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant