AWS MARKETPLACE PUBLISHER

Testing design

A Regression Test Matrix for AWS Marketplace SaaS

Published: Updated:

Key takeaways

As reusable tests for every change, this article sets out 16 cases with preconditions, inputs, expected results, verification venues, evidence, and procedures, and separates what still has to be confirmed on live AWS.

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 15, 2026.

Scope: Teams implementing and maintaining AWS Marketplace SaaS integrations. The article distinguishes SaaS Contract, SaaS Subscription, and SaaS Contract with Consumption where applicable. This article is published by Anti-Pattern Inc., the provider of Deshima; the matrix, design examples, and proposed tests are our own recommendations, not AWS guidance. Confirm behavior on AWS with a test purchase of your own product in Limited visibility, a setting in which the AWS accounts that you put on the allowlist can view the product in a limited state (AWS’s SaaS product settings page).

A note saying “cancellation tested” is insufficient to repeat the same test after the next change. It does not identify which agreement ended, which tenant lost access, or whether another agreement remained active.

When you build a regression matrix, record each case’s preconditions, inputs, and expected results along with its name. From the initial 16 cases for AWS Marketplace SaaS integrations below, select the rows that fit your pricing model and design policy, and link them to the tests you run.

Reading the model and evidence columns

C means SaaS Contract, S means SaaS Subscription, and CC means SaaS Contract with Consumption. For example, entitlement pagination applies to C and CC, while usage retries apply to S and CC.

In the Basis column, “Documented + proposed” marks a row where an AWS page (an API reference or an integration guide) supports the expected result and we have built a concrete test from it. “Proposed” marks a row whose expected result AWS’s pages alone cannot decide; we propose it on the premise that you settle it as your own application policy. For either kind of row, confirm the behavior on live AWS with a product in Limited visibility before you finalize the expected result. Cases that the distributed sample can run, which uses synthetic data and does not connect to AWS (see the CI article), are marked “the distributed sample can run it” in the verification venue column.

The verification venue column says where to confirm the expected result: application only, SDK mock, a local reproduction environment (a tool that imitates AWS APIs locally), or live AWS. For what each of the four venues can establish and what remains to be confirmed, see the comparison table in the testing strategy. A local reproduction environment can be used only for the APIs and features that the tool and version you use support. For that reason, the verification venue column lists only venues that do not depend on tool support, and the conditions under which you can add a local reproduction environment are in the selection table of the testing strategy.

A and B in cases such as R06 are separate licenses purchased by sales planning and R&D through a shared procurement AWS account. Each department also uses a separate SaaS tenant. The test checks that ending one does not affect the other.

Sixteen regression cases

Preconditions, inputs, and expected results

IDModelPreconditionInput / operationExpected resultBasis
R01C/S/CCImmediately after purchase; the license is not yet registered in the SaaSRun the registration process repeatedly with the same registration informationDo not create duplicate assignments for the same license; the second and later runs leave the same stateProposed
R02C/S/CCLicense A is already assigned to tenant Alpha, and the user performing the operation is an ordinary member of another tenant (Beta)Send an assignment request that the user is not authorized to makeReject the assignment and leave the existing assignment and access rights unchangedProposed
R03C/CCThe entitlement result is split across several pages, and the first page has no entitlements, only a NextTokenReturn an empty page with a NextToken, then return entitlements on the next pageRead the following pages as well before making the final decisionDocumented + proposed
R04C/CCThe application holds the most recently retrieved current entitlementsThe entitlement retrieval API times outDistinguish this from empty entitlements, and apply the failure policy your business has defined (continue, grace period, or suspend)Proposed
R05SThe registration token has been resolved and the customer information saved, but the success notification has not arrivedRun the access-start decision and resource creationDo not treat token resolution alone as grounds to start access; do not start until the notification is receivedDocumented + proposed
R06C/S/CCThe same buyer (the same AWS account) has licenses A and B, assigned to separate tenantsApply the termination of AUpdate only the tenant that corresponds to A, and keep B and its tenantProposed
R07C/S/CCA valid state update has already been appliedResend the same eventDo not duplicate the state or the side effectsProposed
R08C/S/CCThe newer state has already been appliedProcess a delayed, older updateRecheck the current state and do not revert to the older stateProposed
R09C/CCThe application policy is [start,end) (includes the start, excludes the end)Judge at the times immediately before and exactly at the start, and immediately before and exactly at the endMatch the defined boundaries (under [start,end): immediately before the start is denied, exactly at the start is allowed, immediately before the end is allowed, and exactly at the end is denied)Proposed
R10C/CCThe job stopped before the expiryResume the job after the expiryCatch up to the current time and do not run the post-expiry processing twiceProposed
R11S/CCThe quantity was finalized and submitted, but the result is unknownResend the same recordResend without changing the quantity and reconcile the result against the ledgerDocumented + proposed
R12S/CCA batch in which some records were left unprocessedReturn UnprocessedRecordsResend only the unprocessed records, with the same valuesDocumented + proposed
R13S/CCA record with the same license, customer, dimension, and timestamp was sent with a quantity different from the one accepted earlierReturn DuplicateRecordDo not record it as accepted; investigate the quantity mismatchDocumented + proposed
R14S/CCMonth-end usage could not be sent within the monthRun a plan for resending across the month-end cutoffThe plan finishes resending with a safety margin before the earliest applicable deadline (24 hours from the record; for the previous month, 06:00 UTC on the 1st of the following month)Documented + proposed
R15C/S/CCAfter the DB update, before the side effect runsStop and restart the workerDetect omissions and duplicates, then recoverProposed
R16C/S/CCUnprocessed events remain in the DLQFix the cause and reprocessState, side effects, and the unprocessed count are as expectedProposed

Verification venues and evidence

The Evidence column separates what AWS’s pages say from what we recommend.

IDVerification venueEvidence
R01Application only (up to integration tests that include the registration process and the DB)This is our recommendation. AWS explains that the same registration token returns the same values until it expires (AWS Marketplace onboarding page).
R02Application only (up to integration tests that include the authentication infrastructure)This is our recommendation. Authorization for assignments is decided by the SaaS’s permission model (Deshima’s article on tenant mapping).
R03SDK mock (injecting a sequence of pages)AWS states that a result with no entitlements can still contain NextToken, and that the token should be used in that case (GetEntitlements API reference). Not deciding until all pages are read is our recommendation.
R04SDK mock (injecting a timeout) and application only (judging the failure policy)This is our recommendation. A result with no entitlements and a failed retrieval are different outcomes, and the API specification does not determine how much grace to allow (GetEntitlements API reference).
R05Application only and SDK mock (the ResolveCustomer response)AWS strongly recommends waiting for the success notification before creating resources for the customer (SaaS Subscription integration guide). For receipt through Amazon EventBridge, AWS advises not activating until License Updated - Manufacturer is received (AWS Marketplace onboarding page, Managing SaaS events with Amazon EventBridge). A seller who registered the seller account after July 15, 2026 uses Amazon EventBridge to receive events, and a seller who registered on or before that date can continue to use Amazon SNS (SaaS Subscription integration guide).
R06Application only and SDK mock. The distributed sample can run only up to confirming that B and Beta are unchanged when A ends (it does not include CustomerAWSAccountId or usage allocation)This is our recommendation. AWS explains that, under Concurrent Agreements, the termination notification and the one-hour window for final usage are handled per agreement (AWS’s SaaS usage metering guide, Deshima’s article on Concurrent Agreements).
R07Application only (the distributed sample can run it). To include side effects, an integration test that includes the DB and the sending processThis is our recommendation. Verify receiving a notification separately from processing the business logic (Deshima’s article on event-processing tests).
R08Application only and SDK mock (the GetEntitlements response for SaaS Contract and SaaS Contract with Consumption). The distributed sample can verify only the part that discards an old update by an instructional revisionThis is our recommendation. AWS states that SaaS Subscription does not use GetEntitlements and decides from the latest state saved from received notifications (SaaS Subscription integration guide). For how to design rechecking when an old notification arrives, see Deshima’s article on event-processing tests.
R09Application only (pass the current time as an argument; the distributed sample can run it)This is our recommendation. This boundary is application policy, not a date-and-time rule common to all AWS APIs (Deshima’s article on deadline tests).
R10Application only (control the clock and the job execution separately)This is our recommendation. Even after you advance the clock, verify job execution and cache refresh separately (Deshima’s article on deadline tests).
R11SDK mock (injecting a situation in which no response is received) and application only (the ledger)AWS states that identical requests are idempotent and can be retried with the same record (BatchMeterUsage API reference). If you resend with a different quantity, the first quantity is still billed (AWS’s SaaS usage metering guide). Reconciliation against the ledger is our recommendation.
R12SDK mock (injecting UnprocessedRecords)AWS describes UnprocessedRecords as a service-side error, and as records that should be retried with the same content (BatchMeterUsage API reference).
R13SDK mock (injecting DuplicateRecord) and application only (the ledger)AWS’s API reference describes a record with the same customer, dimension, and time but a different quantity as DuplicateRecord (UsageRecordResult API reference). AWS’s seller guide says that, for products that support Concurrent Agreements, deduplication uses the combination of license, customer, hour, and dimension (AWS’s SaaS usage metering guide). These two pages do not determine whether a record that differs only in license becomes a DuplicateRecord, so the precondition uses a record that also has the same license. If you resend with a different quantity, the first quantity is still billed (AWS’s SaaS usage metering guide).
R14Application only (pass the current time as an argument) and SDK mock (TimestampOutOfBoundsException)AWS states that it accepts usage for the previous month until 06:00 UTC on the 1st of the following month, and rejects it after that even if it is within 24 hours. A batch that contains even one out-of-range record is not processed as a whole (BatchMeterUsage API reference). The resend plan is our recommendation.
R15Application only (an integration test that includes the DB and the worker; it does not connect to AWS)This is our recommendation. Check whether recovery works from each stopping position (Deshima’s article on event-processing tests).
R16Live AWS (the Amazon EventBridge rule and DLQ in your own account) and application only (reprocessing)This is our recommendation. AWS advises configuring a DLQ to receive events, because events are discarded once their retries are used up. By default, AWS retries for up to 24 hours and 185 attempts (Amazon EventBridge retry policy). Errors such as missing permissions or a nonexistent target are not retried and are sent directly to the DLQ (Amazon EventBridge dead-letter queues).

Procedures, and what remains to confirm on live AWS

The numbers (1), (2), and so on in the Procedure column give the order in which to run the case after you replace the data with your own initial data. “Remaining checks on AWS” lists what you cannot establish even by running the procedure to the end, and what you confirm separately with a Limited product.

IDProcedureRemaining checks on AWS
R01(1) Prepare synthetic data for license A (CustomerAWSAccountId and LicenseArn) (2) Run the registration process twice with the same content (3) Confirm that there is still one assignment per LicenseArn and that no tenant was addedThat the POST from a real purchase to the registration page, and the values ResolveCustomer returns, have the same shape as the synthetic data
R02(1) Prepare an ordinary member X of tenant Beta, and license A, which is already assigned to tenant Alpha (2) X sends a request to assign A to Beta (3) Confirm that the request is rejected and that the assignment and access rights of A and Alpha do not changeThe LicenseArn issued by a real purchase, and the assignment authority under your actual authentication infrastructure and roles
R03(1) Make the GetEntitlements client a mock that returns empty Entitlements and a NextToken the first time and entitlements the second time (2) Run the access decision (3) Confirm that the second call received the NextToken and that the decision was to allow access based on the entitlements from the second callPagination with real entitlements (confirm with a small MaxResults), and the IAM permission to call GetEntitlements
R04(1) Put the application in a state where it has saved the previously retrieved entitlements (2) Configure the client to time out, and judge access (3) Confirm that the result differs from the empty-entitlements case and follows the continue and suspend conditions your business has definedBehavior under real timeouts and throttling (ThrottlingException), and the retry interval
R05(1) Create a state in which the ResolveCustomer response is saved and no success notification has been received (a seller who registered the seller account after July 15, 2026 receives License Updated - Manufacturer through Amazon EventBridge; a seller who registered on or before that date can also use subscribe-success through Amazon SNS) (2) Run the access-start decision and resource creation (3) Confirm that access does not start, and that it starts after you input the notificationThe order and the time gap in which the transition to the registration page and the notification arrive after a real purchase (confirm with a Limited product)
R06(1) Create initial data with the same CustomerAWSAccountId, in which A is assigned to tenant Alpha and B to tenant Beta (2) Apply an input that represents the termination of A (3) Confirm that only Alpha’s access rights change, and that the access rights, saved content, and usage allocation of B and Beta do not changeThe LicenseArn in the notification that arrives when you create two agreements on a product that supports Concurrent Agreements and end one of them (the termination procedure differs by pricing model, so follow AWS’s procedure)
R07(1) Process event E once, and save the state and the record of side effects (2) Input the same event E again (3) Confirm that the state is the same as after the first run, and that notifications, assignments, and entitlement increments have not increasedThat actual notifications reach the processing system through the permissions of your own Amazon EventBridge rule and target
R08(1) Put a newer state (for example, the termination of A) in the applied state (2) Input an older update that represents the state before it (3) Confirm that the current state is rechecked (the GetEntitlements result for SaaS Contract and SaaS Contract with Consumption; the latest saved notification state for SaaS Subscription) and that A does not become active againThe permission and the response of the API used for rechecking (GetEntitlements for SaaS Contract and SaaS Contract with Consumption). For SaaS Subscription, that the latest state can be saved from actual notifications
R09(1) Prepare a license with a defined start time and end time (2) Pass as the current time the times immediately before the start, exactly at the start, immediately before the end, and exactly at the end (3) Confirm that the judgments follow the policyThe precision of the ExpirationDate of the entitlement that AWS returns, and how it corresponds to the boundary in the application policy
R10(1) Run the job at a time before the expiry, then put it in a stopped state (2) Advance the current time past the expiry and resume the job (3) Confirm that the post-expiry processing runs exactly once and that the entitlement matches the current timeBecause the local clock cannot control the entitlement expiry on the AWS side, the actual expiry on AWS and the result of retrieving the entitlement again
R11(1) Finalize the quantity for a time slot and dimension, save it to the ledger, and create a state in which the submission response was not received (2) Resend with the same LicenseArn, CustomerAWSAccountId, dimension, Timestamp, and quantity (3) Confirm that the quantity and the target are unchanged, and that the response was reconciled against the ledger recordThat the resend is accepted on real AWS (Status is Success), and that the buyer’s billing screen does not show double counting
R12(1) Prepare a mock that returns some records as UnprocessedRecords for a BatchMeterUsage call with several records (2) Make the UnprocessedRecords in the response the targets of the resend (3) Confirm that only the unprocessed records are resent with their original values, and that records already accepted in Results are not resentWhether UnprocessedRecords is returned depends on conditions on the AWS side, so confirm that, even for a normal response, you read both the Status in Results and UnprocessedRecords
R13(1) Prepare a record whose license, customer, dimension, and time match a record accepted earlier but whose quantity differs (2) The mock returns DuplicateRecord for that record (3) Confirm that the record is not entered in the ledger as accepted, that it becomes a target for investigating the quantity sent first and its sender, and that you do not try to fix it by resendingThe actual DuplicateRecord response on AWS (note that when you send a different quantity on a test subscription, the earlier quantity is final). For how records that differ only in license are handled, ask AWS Marketplace Seller Operations or confirm with a Limited product
R14(1) Create a state in which the usage for 23:30 UTC on March 31 has not been sent (2) Run the resend plan with the current time set to 05:00 UTC on April 1 and to 06:00 UTC or later (3) Confirm that the plan finishes the resend before 06:00 UTC on April 1, the earliest deadline, and that after the deadline it does not resend and routes the record to investigation (4) Confirm that, when the mock returns TimestampOutOfBoundsException, the resend excludes the out-of-range recordsIf you confirm the rejection after the deadline on real AWS, note that you cannot correct the quantity afterward, and use a test time slot and dimension
R15(1) Finish the DB state update, and stop the worker before the side effect (such as a notification) runs (2) Restart the worker and have it reprocess the same event (3) Confirm that the state is reflected exactly once, and that the side effect runs exactly once without omissionConfirm actual delivery failures and retries with your own Amazon EventBridge rule (R16)
R16(1) With a test rule in your own account, configure delivery to a target without permission or to a nonexistent target, and confirm that the test event goes directly to the DLQ without retries (with the default retry settings, testing with a temporary failure takes up to 24 hours before the event reaches the DLQ) (2) Fix the cause and reprocess the events in the DLQ (3) Confirm that the business state, the side effects, and the unprocessed DLQ count are as expected, and that older events do not revert the state you fixed manuallyThe setup that receives actual AWS Marketplace events (the rule’s event pattern and the target’s permissions)

The full table is also available as a CSV. Its ten columns are ID, Model, Precondition, Input / operation, Expected result, Basis, Verification venue, Evidence, Procedure, and Remaining checks on AWS. The tables in this article and the CSV can be used without registration.

Two examples of choosing expected results

For duplicate usage, the API result semantics provide a basis for the expectation. AWS’s UsageRecordResult API reference defines DuplicateRecord as rejection of a different quantity for the same customer, dimension, and time. AWS’s seller guide says that, for products that support Concurrent Agreements, deduplication uses the combination of license, customer, hour, and dimension. These two AWS pages do not determine whether a record that differs only in license becomes a DuplicateRecord, so the precondition of R13 uses a record that also has the same license. Ask AWS Marketplace Seller Operations, or confirm with a Limited product. R13 passes when that response is not recorded as a successful retry and the quantity mismatch can be investigated.

R04, a retrieval timeout, instead requires your own operating policy. Learning that no entitlement exists differs from being unable to determine the entitlement, but the API specification alone does not decide how many minutes of grace to grant. Fill in the expected result of R04 with the service-continuation or suspension conditions your business has chosen.

For each AWS page that supports an expected result, record the date on which you checked the specification, and update the expected result when the conditions change.

Select cases from the change being made

For each kind of change, the table below lists the cases to run first, where to check them first, and what to confirm on live AWS afterward. The mapping is our recommendation.

ChangeCases to run firstWhere to check firstThen confirm on live AWS
Adding a pricing dimensionR03, R11, R12, R13, R14SDK mock and application onlyThat usage for the added dimension is accepted on a test subscription
Changing entitlement retrieval calls (SDK updates, retry settings, and so on)R03, R04SDK mockThe IAM permission for GetEntitlements, and pagination with real entitlements
Changing the registration processR01, R05Application only and SDK mockThe transition from a real purchase to the registration page, and the order in which notifications arrive
Changing tenant assignment or transfer featuresR01, R02, R06Application onlyThe LicenseArn values issued for two agreements, and the notification when one of them ends
Changing the deadline and grace policyR09, R10, R14Application only (pass the current time as an argument)The entitlement expiry that AWS returns, and acceptance results before and after the deadline
Changing how notifications are received and reprocessedR07, R08, R15, R16Application only and integration testsThat actual notifications arrive through the permissions of your own Amazon EventBridge rule and target

After you select the cases, proceed in this order.

  1. Replace each case’s preconditions and inputs with your own initial data.
  2. Decide from the verification venue column where to run the case first.
  3. Run the procedure, and record the result separately as the application’s decision, the connection to the SDK or a local reproduction environment, and live AWS.
  4. Decide who will run the “Remaining checks on AWS” with a Limited product, and by when.

When you use this matrix in your team, add the owner, the link to the test code, the target commit, the version of the input data, and the execution result. When you fix a defect, retain an input that fails before the fix, so that later changes can be checked for the same defect. Recording the relationship between changes and cases lets a reviewer assess the test scope.

Articles that explain the cases

When you are unsure about a case’s expected result or precondition, see the following Deshima articles. This matrix is for rerunning the same cases during maintenance; to prepare for launch review, use the last article in the table, on the pre-launch checklist.

CasesDeshima articleWhat you will learn
R06What are AWS Marketplace Concurrent Agreements?How one AWS account can hold several agreements for the same SaaS, the identifiers and notifications, and what to check in tests for several agreements
R01, R02, R06, R07How to map AWS Marketplace agreements to SaaS tenantsThe information received at the registration URL, how tenants map to licenses, updates when an agreement changes or ends, and the mapping scenarios to check before launch
R06, R10Handling cancellations and refunds on AWS MarketplaceCancellation and refund procedures, the unit at which the SaaS stops access, and the final usage report for metered products
R11, R12, R13, R14AWS Marketplace metering implementationThe values to pass to BatchMeterUsage, finalizing one hour of quantity, resending, and the final submission when an agreement ends
R11, R12, R13, R14AWS Marketplace Metering Not Accepted? Debug BatchMeterUsage ResultsWhere to look for each Status in Results and for UnprocessedRecords, and the conditions under which you may resend
R09, R10, R14Testing Time-Dependent AWS Marketplace IntegrationsProcessing that does not run when you advance the clock, period boundaries, and the deadlines that remain for usage submission
R07, R08, R15, R16Testing Duplicate, Delayed, and Out-of-Order Marketplace EventsRechecking against old notifications, stopping after a DB update, and reprocessing from the Amazon EventBridge DLQ
R06, R07, R09 (R08 only for the part that discards an old update)Running AWS Marketplace Integration Tests in CIA sample that verifies license isolation and deadline boundaries on every run, with synthetic data and no connection to AWS
How to choose a verification venueAWS Marketplace Testing: Live Tests, Mocks, and EmulatorsWhat application-only tests, SDK mocks, a local reproduction environment, and live AWS can each establish, and what remains to be confirmed
Pre-launch checksWhat the AWS Marketplace SaaS review checksThe checks for each scenario from a new purchase to usage submission, and which parts AWS’s own verification covers and which you supplement yourself