Reference

Verification & test results

Last verified locally against the Dockware container shopware-ucp and the

UCP Test Results

Last verified locally against the Dockware container shopware-ucp and the local UCP Simulator on localhost:4100.

Summary

Test areaScopeResult
PHPUnit unit testsUCP core + AP2 plugin parser testsPassed: 104 tests, 165 assertions
Direct REST smokeCatalog product, cart, checkout, order placementPassed
Direct MCP smokeget_product, cart, checkout, order placementPassed
Simulator matrixAll scenarios once via REST and once via MCPPassed: 34/34
Official UCP conformanceUpstream Universal-Commerce-Protocol/conformance Python suitePassed: TOTAL=13 FAILURES=0

A. Unit And Integration-Level Tests

Command executed in the Dockware container:

bash
docker exec shopware-ucp /tmp/phpunit-runner/vendor/bin/phpunit \
  --bootstrap /tmp/phpunit-runner/bootstrap.php \
  --colors=never \
  /var/www/html/tests/unit/Core/Framework/Ucp \
  /var/www/html/custom/plugins/SwagUcpAp2Mandates/tests

Result:

text
PHPUnit 11.5.55, PHP 8.3.25
OK (104 tests, 165 assertions)
Test fileWhat it verifiesResult
tests/unit/Core/Framework/Ucp/Capability/Attribution/AttributionExtractorTest.phpUCP attribution input normalization and response echo behavior.Passed
tests/unit/Core/Framework/Ucp/Capability/CapabilityNegotiatorTest.phpCapability intersection, version matching, and extension pruning.Passed
tests/unit/Core/Framework/Ucp/Capability/CapabilityRegistryTest.phpCapability registration and lookup behavior.Passed
tests/unit/Core/Framework/Ucp/Capability/Catalog/CursorCodecTest.phpOpaque cursor HMAC signing, TTL, query binding, and tamper rejection.Passed
tests/unit/Core/Framework/Ucp/Capability/Checkout/CheckoutStatusResolverTest.phpCheckout status and message mapping from Shopware cart state.Passed
tests/unit/Core/Framework/Ucp/Capability/IdentityLinking/Auth/ClientAuthenticatorSecurityTest.phpOAuth client auth security, especially private_key_jwt replay handling.Passed
tests/unit/Core/Framework/Ucp/Capability/Signals/SignalsExtractorTest.phpRejection of untrusted platform signals on unsigned/unverified requests.Passed
tests/unit/Core/Framework/Ucp/DependencyInjection/UcpCapabilityCompilerPassTest.phpDI compiler-pass wiring for UCP capabilities.Passed
tests/unit/Core/Framework/Ucp/Discovery/SupportedVersionsRegistryTest.phpHistorical version support map generation.Passed
tests/unit/Core/Framework/Ucp/Idempotency/IdempotencyStoreTest.phpIdempotency key fingerprinting, replay, conflict, and stale claim behavior.Passed
tests/unit/Core/Framework/Ucp/Jwt/EcKeyGeneratorTest.phpEC JWK generation and signature conversion helpers.Passed
tests/unit/Core/Framework/Ucp/Jwt/JsonCanonicalizationTest.phpJCS/RFC 8785 deterministic JSON canonicalization for signatures.Passed
tests/unit/Core/Framework/Ucp/Profile/PlatformProfileValidatorTest.phpPlatform profile schema and structural validation.Passed
tests/unit/Core/Framework/Ucp/Security/KeyMaterialGuardTest.phpRedaction of key material from logs/debug contexts.Passed
tests/unit/Core/Framework/Ucp/Security/PrivateKeyEncryptorTest.phpPrivate key encryption/decryption behavior.Passed
tests/unit/Core/Framework/Ucp/Transport/A2A/A2AMessageTranslatorTest.phpA2A structured data actions to UCP tool intents.Passed
tests/unit/Core/Framework/Ucp/Transport/Embedded/EmbeddedControllerSecurityTest.phpEmbedded origin handling and no wildcard postMessage fallback.Passed
tests/unit/Core/Framework/Ucp/Transport/Rest/UcpAgentHeaderTest.phpUCP-Agent structured header parsing.Passed
tests/unit/Core/Framework/Ucp/Transport/Signature/ContentDigestCalculatorTest.phpRFC 9530 content digest calculation and verification.Passed
tests/unit/Core/Framework/Ucp/Transport/Signature/Rfc9421RoundtripTest.phpHTTP Message Signature signing and verification round-trip.Passed
tests/unit/Core/Framework/Ucp/Transport/Signature/Rfc9421SecurityTest.phpRFC 9421 negative/security cases such as duplicate key IDs and replay guard.Passed
tests/unit/Core/Framework/Ucp/Transport/Signature/SignatureInputParserTest.phpSignature-Input parsing behavior.Passed
tests/unit/Core/Framework/Ucp/UcpExceptionTest.phpUCP exception factories, error codes, and response mapping.Passed
tests/unit/Core/Framework/Ucp/UcpVersionTest.phpUCP version string validation and current/historical version handling.Passed
custom/plugins/SwagUcpAp2Mandates/tests/Unit/Service/SdJwtParserTest.phpAP2 SD-JWT envelope parsing and malformed input rejection.Passed

B. Direct End-To-End Tests

These tests were run directly against http://localhost:8080 with Shopware in Docker, independent of the browser UI.

TestWhat was exercisedResult
Direct REST catalog product lookupPOST /ucp/v1/catalog/search, POST /ucp/v1/catalog/product, SKU/ProductNumber resolution.Passed
Direct REST checkoutPOST /carts, POST /checkout-sessions, POST /checkout-sessions/{id}/complete; produced a real Shopware order.Passed
Direct MCP tool listingPOST /ucp/mcp tools/list; verified spec tool names lookup_catalog and get_product.Passed
Direct MCP checkoutMCP get_product, create_cart, create_checkout, complete_checkout; produced a real Shopware order.Passed
Direct conformance fixture smokebouquet_roses lookup and checkout creation using request-signature: test; verified USD, item ID, and 3500 minor-unit total.Passed

C. Simulator Scenario Tests

Command pattern used:

bash
curl -s -X POST http://localhost:4100/api/run \
  -H 'Content-Type: application/json' \
  -d '{"businessUrl":"http://localhost:8080","transport":"rest","scenarioId":"checkout.happy-path"}'

Each scenario was run once with transport=rest and once with transport=mcp.

Result:

text
34 passed / 34 total
CategoryScenarioWhat it verifiesRESTMCP
Discoverydiscovery.basic/.well-known/ucp, profile parsing, capability negotiation.PassedPassed
Discoverydiscovery.version-pinsupported_versions lookup and version-pinned profile behavior.PassedPassed
Catalogcatalog.search.basicText search through catalog search.PassedPassed
Catalogcatalog.search.browseFilter-only browse with price filters.PassedPassed
Catalogcatalog.cursor-paginationCursor pagination, no duplicate pages, tamper rejection, cross-query rejection.PassedPassed
Catalogcatalog.lookupBatch product lookup by IDs using REST lookup and MCP lookup_catalog.PassedPassed
Cartcart.full-lifecycleCart create, update quantity, cancel.PassedPassed
Cartcart.multi-itemMulti-item cart totals and line-item handling.PassedPassed
Checkoutcheckout.happy-pathCart to checkout to complete order.PassedPassed
Checkoutcheckout.cart-conversion-idempotentSame cart_id produces the same checkout session.PassedPassed
Extensionsextension.discountSpec discounts.codes flow and applied-discount response.PassedPassed
Extensionsextension.ap2-mandateAP2 compact-JWS mandate, merchant authorization verification, complete checkout.PassedPassed
Extensionsextension.ap2-sd-jwtAP2 SD-JWT VC + Key-Binding mandates with sd_hash binding.PassedPassed
Identityidentity.oauth-discoverOAuth authorization-server metadata and PKCE/issuer fields.PassedPassed
Identityidentity.oauth-initiateAuthorization URL generation for identity linking.PassedPassed
Webhookswebhook.listener-onlySimulator webhook listener discovery and URL publication.PassedPassed
Compliancecompliance.full-suiteRuns every applicable simulator scenario in sequence.PassedPassed

D. Official UCP Repository Tests

Source: upstream Universal-Commerce-Protocol/conformance, cloned temporarily under /tmp/ucp-conformance. The suite was installed with uv and run against the local Dockware shop.

Command pattern:

bash
uv run <test_file> \
  --server_url=http://localhost:8080 \
  --simulation_secret=local-sim-secret \
  --conformance_input=test_data/flower_shop/conformance_input.json

The Shopware conformance run used:

  • UCP_CONFORMANCE_MODE=1 to enable the non-production test bridge.
  • UCP_SIMULATION_SECRET=local-sim-secret for simulation endpoints.
  • bin/console ucp:conformance:seed for the upstream flower_shop fixture.

Result:

text
TOTAL=13 FAILURES=0
Official test fileWhat it verifiesResult
ap2_test.pyAP2 mandate completion flow.Passed
binding_test.pyToken binding completion flow.Passed
business_logic_test.pyTotals, quantity recalculation, discount codes, buyer info and buyer consent persistence.Passed
card_credential_test.pyCard credential payment flow.Passed
checkout_lifecycle_test.pyCheckout create/read/update/cancel/complete lifecycle and terminal-state rejection.Passed
fulfillment_test.pyFulfillment destinations, option generation, address selection, free shipping and address persistence.Passed
idempotency_test.pyIdempotent create/update/complete/cancel and conflict detection.Passed
invalid_input_test.pyInvalid order adjustment payloads and unknown discount code behavior.Passed
order_test.pyOrder retrieval, checkout ID reconciliation, fulfillment expectations, events and adjustments.Passed
protocol_test.pyDiscovery profile shape and protocol version negotiation.Passed, with test_discovery_urls skipped upstream because schemas are not published remotely.
simulation_url_security_test.pySimulation endpoint secret requirements.Passed
validation_test.pyOut-of-stock, unknown product, payment failure, missing fulfillment and structured errors.Passed
webhook_test.pyorder_placed and order_shipped webhooks and fulfillment address payloads.Passed

Final Verification Commands

Additional final checks:

bash
docker exec shopware-ucp /tmp/phpunit-runner/vendor/bin/phpunit \
  --bootstrap /tmp/phpunit-runner/bootstrap.php \
  --colors=never \
  /var/www/html/tests/unit/Core/Framework/Ucp \
  /var/www/html/custom/plugins/SwagUcpAp2Mandates/tests
bash
cd simulator
npm run typecheck

Both commands passed, and IDE lints reported no errors in the edited UCP, AP2, simulator, or documentation paths.