Skip to content

test: support multiple responses per AT fixture - #242

Open
FUjr wants to merge 3 commits into
mainfrom
feat/fixture-multiple-responses
Open

test: support multiple responses per AT fixture#242
FUjr wants to merge 3 commits into
mainfrom
feat/fixture-multiple-responses

Conversation

@FUjr

@FUjr FUjr commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • store independent modem-state/device responses in responses[] instead of overwriting one response per command
  • append and deduplicate captures by response bytes and return code
  • sanitize, pack, import, and validate every response while normalizing legacy feedback archives
  • replay every raw response independently, with no call-order semantics
  • use the baseline response for golden snapshots, then inject each additional response into methods that consumed that command and require valid parsed JSON
  • migrate all 28 existing Air724UG, recognition, and Quectel fixtures

Validation

  • vendor command boundary and core command tests
  • fixture byte collection, including two distinct responses plus duplicate suppression
  • recognition collection and fixture validation
  • profile isolation with two independent AT+CGSN responses
  • legacy single-response import compatibility
  • plaintext feedback packing and sanitization
  • vendor fixture replay and golden snapshots
  • all testcase JSON and git diff --check

The full encrypted feedback path remains covered by the existing GitHub Actions job, which builds qmodem-seal with libsodium.

FUjr added 3 commits August 8, 2026 13:42
Represent each command as a stable fixture with an independent responses array so captures from different devices and modem states no longer overwrite one another.

Append and deduplicate response bytes during collection, sanitize every response while packing, validate the array during import, and normalize legacy single-response feedback archives.

Replay every raw response independently. Golden methods still use the baseline response, then rerun with each additional response for commands they actually consumed to verify parser compatibility without imposing call-order semantics.
Wrap all existing Air724UG, recognition, and Quectel command responses in the multi-response schema while preserving their original bytes, return codes, timestamps, profile metadata, and golden snapshots.
Group repeated AT responses by an explicit scenario and consume each command queue in capture order. Fail fixture replay when a command is missing or exhausted so tests cannot silently combine responses from incompatible modem states.

Store golden outputs below expected/<scenario>, compare read-only vendor methods exactly, and migrate the existing feedback and synthetic fixtures to the scenario-aware layout.

Serialize concurrent fixture collection, preserve identical repeated calls, and retain a stable capture sequence so archive imports remain idempotent while replay order can be normalized. Extend collection, import, profile, recognition, and CI coverage for the new behavior.
@FUjr
FUjr force-pushed the feat/fixture-multiple-responses branch from 5166995 to cc7028b Compare August 8, 2026 13:42
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