← ClaudeAtlas

sqs-testslisted

Use whenever code that sends or receives AWS SQS messages needs tests: Standard vs FIFO semantics, visibility timeouts, dead-letter queues for poison messages and retention, using LocalStack, aws-sdk-client-mock for TypeScript or moto for Python.
testland/qa · ★ 13 · Testing & QA · score 80
Install: claude install-skill testland/qa
# sqs-tests ## Overview [sqs-dg]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html Two queue types, per [the SQS developer guide][sqs-dg]: | Type | Delivery semantics | |---|---| | **Standard** | "at-least-once message delivery" | | **FIFO** | "exactly-once message processing" + "high-throughput" mode | The semantic difference cascades through every test pattern: a Standard-queue test must assume duplicates can occur; a FIFO test must assume strict ordering. ## When to use - The repo has SQS-publishing or SQS-consuming code (AWS SDK). - The user writes unit tests against mocked SQS clients. - The user writes integration tests against LocalStack / real SQS (in a sandbox account). - A test verifies visibility-timeout, DLQ-routing, or long-polling behavior. ## Step 1 - Test approach: mock vs LocalStack vs real Three approaches, ordered by isolation: | Approach | Pros | Cons | |---|---|---| | `aws-sdk-client-mock` (TS) / `moto` (Python) | Pure unit, no network | Doesn't catch AWS-side behavior (visibility timeouts, DLQ routing) | | LocalStack (Docker SQS emulator) | Full SQS semantics locally | Slower; not 100% behavior parity with AWS SQS | | Real SQS in sandbox AWS account | Highest fidelity | Costs money; per-PR queue cleanup needed | For pure logic tests (does the code call SendMessage with the right body?), use mocks. For semantic tests (does retry-on-failure work end-to-end?), use LocalStack. For pre-prod smoke, use real