AWS MARKETPLACE PUBLISHER

Testing design

Testing Time-Dependent AWS Marketplace Integrations

Published: Updated:

Key takeaways

Test immediately before, at, and after a deadline while distinguishing your application clock from external-service clocks.

Editorial information. This article was translated into English by AI from Deshima’s Japanese article; it has not been reviewed or certified by AWS. The linked AWS documentation is current as of November 10, 2026.

Scope: Teams implementing and maintaining AWS Marketplace SaaS integrations. The article distinguishes Contract, Subscription, and Contract with Consumption where applicable. Design examples, boundary tables, and proposed tests are Deshima’s own recommendations, not AWS guidance. Confirm AWS deadlines and acceptance with a test purchase of your own product in Limited visibility, the listing state in which only your seller account and allowlisted AWS accounts can view the product (see AWS’s SaaS product settings page).

Consider a test that submits usage recorded at 23:30 UTC on March 31 on the following evening. An application checking only “within 24 hours of the record” might consider it eligible. However, AWS’s current BatchMeterUsage API reference includes a previous-month cutoff: after 06:00 UTC on April 1, March usage is no longer accepted even within the normal 24-hour window.

Testing this difference requires more than shortening a wait. Decide which timestamp each decision uses. Usage time, submission time, agreement end time, and notification receipt time represent different conditions.

Processing that does not run when a clock advances

Moving the application's clock past a deadline does not update stored entitlements unless the scheduled job runs. Even if the job runs, another process may retain an old cache and use the previous entitlements when evaluating a request. The same symptom—continued access after expiry—can require different checks.

Describe “advance the clock,” “run the job,” “retrieve entitlements,” and “send a request” as separate test operations. Knowing which operations ran helps distinguish a faulty time comparison from a failed update.

SubjectWhat the test controlsWhat to inspect
Access decisionCurrent time supplied as an argumentComparisons, time zones, and precision
Scheduled jobCurrent time and execution triggerMissed runs, repeated runs, and recovery
CacheExpiry and refresh resultPropagation across processes
Notification handlingOccurrence, receipt, and processing timesState during delay and reconciliation afterward
AWS entitlement / usage acceptanceNot controlled by a local clockSeparate live AWS verification

Define the interval boundaries

For this example, choose the application policy [start, end): include the start and exclude the end. Access is allowed exactly at the start and denied exactly at the end. The table tests that policy; it is not a universal timestamp rule for every AWS API.

Input time or conditionExpected application resultWhat to check
One millisecond before startAccess deniedPurchase or acceptance alone does not start access
Exactly at startAccess allowedErrors introduced by rounding to seconds
One millisecond before endAccess allowedPremature suspension
Exactly at endAccess deniedConfusion between < and <=
After end, notification not receivedFollow the chosen expiry/grace policyExpiry checks independent of notification
Clock moves forward or backwardPrevent duplicate processing or invalid reactivationWall-clock versus elapsed-time measurement

The CI sample runs the first four boundaries. When applying it to your application, check timestamp precision in API responses and any grace period communicated to customers. Use your chosen operating policy as the expected result.

Deadlines that still apply to usage submission

In the month-end example, the monthly cutoff occurs before the normal 24-hour limit. Plan submission and retries to meet the earliest applicable deadline. Waiting until just before it leaves no room for a failed attempt, so reserve time for retries.

Agreement termination adds final-reporting conditions. You have one hour after the notification that the agreement has ended. If you receive notifications through Amazon EventBridge, AWS pages describe the start of that hour differently. AWS: Managing SaaS subscription events with Amazon EventBridge starts the window when you receive License Deprovisioned - Manufacturer. AWS: SaaS subscription pricing starts the one hour when you receive Purchase Agreement Ended and says License Deprovisioned - Manufacturer arrives after the hour. AWS: SaaS contract pricing starts the one hour, when a contract expires, at the entitlement-updated notification that signals an entitlement change. The AWS Marketplace blog's Concurrent Agreements migration guide describes a one-hour window for both Purchase Agreement Ended and License Deprovisioned. If you receive notifications through Amazon SNS, you must send all unreported usage within one hour of the unsubscribe-pending notification, and usage sent after the final unsubscribe-success notification is not accepted. (AWS: Configuring metering for usage with SaaS subscriptions) As for which method you use, AWS directs sellers who registered their seller account after July 15, 2026 to use Amazon EventBridge, while sellers who registered on or before that date can continue to use Amazon SNS. (AWS: Integrating your SaaS subscription product) We recommend finishing the final submission within one hour of the earliest notification you receive that tells you the agreement is ending. Before you implement the submission process, confirm the official starting point with AWS Marketplace Seller Operations, AWS’s support team for sellers, including whether to count from the notification that the entitlement has expired. For how the starting points compare, see our article on handling cancellations and refunds. When you write local tests, supply the notification you treat as the starting point as an input and verify your submission behavior under that condition.

Time progression in an external service

Stripe's Test Clocks test subscription and billing time progression within Stripe's sandbox. Using that feature as a design reference does not let you advance AWS's clock.

Advancing the application clock does not necessarily advance the clock that scheduled jobs, caches, or other connected services read. When introducing time controls, check which of those components read the clock you change, list the clocks being changed, and list the operations that must run separately. See Deshima’s cancellation article for termination versus refunds, and the testing strategy for the division between local and live testing.

  • Testing designUpdated

    AWS Marketplace Testing: Live Tests, Mocks, and Emulators

    Compare what the application alone, an SDK mock, a local reproduction environment, and live AWS can each establish and what remains to be confirmed, and choose a test venue from the failure you need to investigate.

  • Testing and integrationUpdated

    Handling Cancellations and Refunds on AWS Marketplace: Seller Procedures and SaaS Access Control

    When a cancellation or refund request arrives on AWS Marketplace, this article covers the cancellation and refund requests a seller submits, the events your SaaS receives, the unit in which access stops, and final usage reporting for usage-based pricing, based on the self-service feature announced in March 2026. It also gives test items that record the events and times from a cancellation request through the final submission, and check behavior just before, exactly at, and just after each deadline.