Specification: Phase 4 — API Tests
This phase updates and extends the Bruno API tests in the api-test repository to validate all print endpoint changes from Phases 1-3. Tests run against a deployed environment (local or dev).
Requirements: Phase 4 Requirements Verification: Phase 4 Verification Analysis: Gap Analysis — Gap A-1 Depends on: Phases 1, 2, and 3 must be complete and deployed to the target environment.
Task 1: Update existing print tests for composite response
Section titled “Task 1: Update existing print tests for composite response”Files:
api-test/collections/item/bearer-auth/Printing/PrintLabels.bruapi-test/collections/item/bearer-auth/Printing/PrintBreadcrumb.bruapi-test/collections/kanban/Print-Cards/PrintOneCard.bruapi-test/collections/kanban/Print-Cards/PrintMultpleCards.bru
Change:
- Remove the
disabledtag from all four tests - Update response assertions to validate the new composite shape:
res.body.jobis a UUIDres.body.asOFcontainseffectiveandrecordedtimestampsres.body.resultsis a non-empty array- Each result has
templateId,description,itemCount, andurl(non-null for success)
- Update
live-print=falseto ensure test mode is used
Tests: T-P4-001 through T-P4-004.
Requirement: REQ-P4-001
Task 2: Add multi-template bulk print tests
Section titled “Task 2: Add multi-template bulk print tests”Files (new):
api-test/collections/item/bearer-auth/Printing/PrintLabelsMixedSizes.bruapi-test/collections/item/bearer-auth/Printing/PrintBreadcrumbsMixedSizes.bruapi-test/collections/kanban/Print-Cards/PrintCardsMixedSizes.bru
Change: Create tests that send item/card IDs with different configured sizes. Assert:
- Response contains multiple entries in
resultsarray (one per template group) - Each entry has the correct
templateIdanditemCount - At least one entry has a non-null
url
Although labels and breadcrumbs share the ItemPrintingService code path, testing both endpoint routes validates that the protocol adaptor and route configuration are correct for each.
Prerequisite: Test data setup must include items with different labelSize/cardSize/breadcrumbSize values. This may require a setup script or pre-existing test data.
Tests: T-P4-005, T-P4-006, T-P4-006b.
Requirement: REQ-P4-002
Task 3: Add batch limiting tests
Section titled “Task 3: Add batch limiting tests”Files (new):
api-test/collections/item/bearer-auth/Printing/PrintLabelsOverLimit.bruapi-test/collections/item/bearer-auth/Printing/PrintLabelsBatchSplit.bru
Change:
- Over-limit test: Send more IDs than
maxItemsPerRequest. Assert 400/422 error with descriptive message. - Batch split test: Send more items than
maxItemsPerDocumintRequestbut fewer thanmaxItemsPerRequest. Assert multiple result entries for the same template.
Tests: T-P4-007, T-P4-008.
Requirement: REQ-P4-003
Task 4: Add unmark-as-printed test
Section titled “Task 4: Add unmark-as-printed test”Files (new):
api-test/collections/kanban/Print-Cards/UnmarkPrinted.bru
Change: Create a test sequence:
- Print a card (confirm status changes to PRINTED)
- Call
POST /v1/kanban/kanban-card/{eId}/event/unmark - Assert card’s
printStatusisNOT_PRINTED
Tests: T-P4-009.
Requirement: REQ-P4-004
Task 5: Add diagnostic parameter tests
Section titled “Task 5: Add diagnostic parameter tests”Files (new):
api-test/collections/item/bearer-auth/Printing/PrintLabelsDebug.bruapi-test/collections/item/bearer-auth/Printing/PrintLabelsDryRun.bruapi-test/collections/item/bearer-auth/Printing/PrintLabelsTestMode.bru
Change:
- Debug test:
POST /v1/item/item/print-label?debug=true&live-print=false. Assert response includes bothurl(non-null) anddebugPayload(non-null JSON) in each result. - Dry-run test:
POST /v1/item/item/print-label?dry-run=true. Assert response includesdebugPayloadbuturlis null. Verify no side effects by re-reading items. - Test mode:
POST /v1/item/item/print-label?live-print=false. Assert 200 OK (watermark not verifiable via API).
Tests: T-P4-010, T-P4-011, T-P4-012.
Requirement: REQ-P4-005
Task 6: Add notes mapping validation tests
Section titled “Task 6: Add notes mapping validation tests”Files (new):
api-test/collections/kanban/Print-Cards/PrintCardNotesMapping.bruapi-test/collections/item/bearer-auth/Printing/PrintLabelNotesMapping.bruapi-test/collections/item/bearer-auth/Printing/PrintBreadcrumbNotesMapping.bru
Change: Use debug=true (or dry-run=true) to inspect the Documint payload:
- Card notes test: Print a card whose
KanbanCard.notesis null butItem.noteshas content. AssertdebugPayloadcontains"notes": ""(not the item’s order history). - Label notes test: Print a label for an item with
notes = "Test note". AssertdebugPayloadcontains"notes": "Test note". - Breadcrumb notes test: Print a breadcrumb for an item with
notes = "Test note". AssertdebugPayloadcontains"notes": "Test note". Validates the breadcrumb endpoint route and protocol adaptor independently from labels.
Tests: T-P4-013, T-P4-014, T-P4-015.
Requirement: REQ-P4-006
Open Questions and Decisions
Section titled “Open Questions and Decisions”| # | Question | Options | Recommendation | Decision |
|---|---|---|---|---|
| 1 | Should api-test tests run against local (K8s) or dev environment? | A) Local B) Dev C) Both | A for development, B for CI — but this is operational, not a design question | A for development iteration, B for final validation. Dev deployment gated on explicit user prompt. |
STOP: Review Gate
Section titled “STOP: Review Gate”Before proceeding to implementation, confirm:
- Phases 1, 2, 3 deployed to target environment
- Test data available (items with different sizes, cards with various print statuses)
- Requirements approved
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved