[GH-ISSUE #5] Build a local OsmAnd test receiver and synthetic fixtures #6

Open
opened 2026-10-23 18:09:14 +02:00 by jayanezj · 0 comments
Owner

Originally created by @jayanezj on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/jayanezj/traccar-client-macos/issues/5

Goal

Provide reproducible transport tests without contacting a demo or personal Traccar server.

Scope

  • Add a test-only loopback receiver capable of inspecting OsmAnd form POSTs and returning controlled statuses, delayed responses and connection failures.
  • Provide an HTTPS fixture with isolated test certificate material to distinguish trusted connections, untrusted certificates and hostname mismatches. Never disable certificate validation in production code to make a test pass.
  • Use synthetic locations, timestamps, battery values and device identifiers for normal positions and alarm=sos.
  • Select available local ports and document start/stop instructions. Keep the receiver out of the distributed app.

Acceptance criteria

  • HTTP and HTTPS scenarios can be reproduced locally without public-network access or real location data.
  • Fixtures cover 2xx, non-2xx, timeout, disconnect and certificate failure.
  • Captured requests expose method and decoded fields for assertions without requiring production secrets.
  • Tests clean up listeners and any temporary trust configuration; no broad system trust modification is required.
  • Running tests never silently falls back to a demo or user-configured receiver.

Validation

Demonstrate a synthetic request and each failure mode. This verifies the fixture, not end-to-end acceptance by a real Traccar installation. Authentication, firewall or proxy changes on external servers are outside scope.

Add or extend this feature's meaningful deterministic tests in the CI workflow from PROTO-002 as part of the same implementation, without waiting for the final milestone. Keep physical-Mac checks explicitly manual.

Dependencies

Originally created by @jayanezj on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/jayanezj/traccar-client-macos/issues/5 ## Goal Provide reproducible transport tests without contacting a demo or personal Traccar server. ## Scope - Add a test-only loopback receiver capable of inspecting OsmAnd form POSTs and returning controlled statuses, delayed responses and connection failures. - Provide an HTTPS fixture with isolated test certificate material to distinguish trusted connections, untrusted certificates and hostname mismatches. Never disable certificate validation in production code to make a test pass. - Use synthetic locations, timestamps, battery values and device identifiers for normal positions and `alarm=sos`. - Select available local ports and document start/stop instructions. Keep the receiver out of the distributed app. ## Acceptance criteria - [ ] HTTP and HTTPS scenarios can be reproduced locally without public-network access or real location data. - [ ] Fixtures cover 2xx, non-2xx, timeout, disconnect and certificate failure. - [ ] Captured requests expose method and decoded fields for assertions without requiring production secrets. - [ ] Tests clean up listeners and any temporary trust configuration; no broad system trust modification is required. - [ ] Running tests never silently falls back to a demo or user-configured receiver. ## Validation Demonstrate a synthetic request and each failure mode. This verifies the fixture, not end-to-end acceptance by a real Traccar installation. Authentication, firewall or proxy changes on external servers are outside scope. Add or extend this feature's meaningful deterministic tests in the CI workflow from [PROTO-002](https://github.com/jayanezj/traccar-client-macos/issues/2) as part of the same implementation, without waiting for the final milestone. Keep physical-Mac checks explicitly manual. ## Dependencies - [PROTO-001](https://github.com/jayanezj/traccar-client-macos/issues/1) - [PROTO-002](https://github.com/jayanezj/traccar-client-macos/issues/2) <!-- planning-id: PROTO-005 -->
jayanezj added this to the M3 - Transport and SOS milestone 2026-10-23 18:09:14 +02:00
jayanezj added the area:transporttype:taskpriority:high labels 2026-10-23 18:09:14 +02:00
jayanezj added type:taskarea:transport and removed type:taskarea:transport labels 2026-10-30 18:01:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jayanezj/traccar-client-macos#6