AWS MARKETPLACE PUBLISHER

Testing design

Running AWS Marketplace Integration Tests in CI

Published:

Key takeaways

Use synthetic fixtures without connecting to AWS to repeatedly check license isolation and time boundaries.

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. The sample, design examples, and proposed tests are Deshima’s own recommendations, not AWS guidance. Confirm AWS behavior 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).

When sales planning and R&D buy separate agreements through a shared procurement AWS account, does ending sales planning's agreement also disable R&D? Application checks like this can run in CI without real purchases. The small sample below checks time boundaries and license isolation.

The sample uses only Node.js built-ins. It needs no AWS SDK, AWS credentials, or external npm packages. It checks the decisions of a teaching model, a small stand-in for your application's access and state logic, when given synthetic data. It does not implement AWS responses.

Run it locally

Save the teaching model and test file in the same directory, then run:

node --version
node --test lifecycle.test.mjs

In Deshima’s run, all eight cases passed with Node.js v24.18.1, and changing the model to incorrectly allow access exactly at the end time made the boundary test fail. The execution record lists the environment and what that run covered.

Why the sample uses two tenants

Each test creates fresh initial data mapping sales planning's license A to tenant Alpha and R&D's license B to tenant Beta. When stopping A, the test checks not only that Alpha loses access, but also that Beta retains access and B's stored data remains unchanged. With only one license, the test could miss an implementation that stops every license belonging to the buyer.

Initial data is recreated for each test. If one case inherits state modified by another, outcomes can depend on execution order and failures become harder to reproduce. Current time is also passed as an argument to avoid dependence on the actual clock or waiting.

BehaviorTest inputAssertion
Time boundariesBefore/at start and before/at endMatches the application policy [start, end)
Tenant isolationRequest A's access from BetaAccess denied
License isolationStop only AB and Beta remain unchanged
Duplicate processingSubmit the same event ID againOne effective write
Stale stateOlder teaching-model revision after a newer oneCurrent state is not rolled back
Same state under another IDSubmit the same revision with another IDWrite count does not increase
Invalid assignmentAttempt to reassign A to BetaReject and preserve original state
Invalid timestampsInvalid values or reversed intervalError before saving

revision is a number introduced by this teaching model to distinguish older and newer state. It does not mean that AWS events carry a monotonically increasing sequence number. In a real application, decide how to retrieve current state and prevent concurrent updates to the same license, then replace these tests with cases for that mechanism.

Run in CI and retain results

The GitHub Actions example specifies the Node version and emits the same tests in JUnit format. The downloadable workflow assumes both .mjs files are at the repository root; if you place them elsewhere, change the test file path in the workflow. It is a reference file, not a workflow that runs automatically. Run it once on GitHub Actions in your own repository and check the JUnit output before relying on it; Deshima has run the Node command and checked the XML output only locally.

The example uses actions/checkout and actions/setup-node. When adopting it, apply your organization's policy, including pinning to reviewed commit SHAs where required. The example prints XML in the logs, so configure artifact retention if you need persistent comparisons.

Additional cases when connecting the real application

The model does not include a database, multiple workers, or external notifications. It cannot detect a worker stopping immediately after a database update or a replay sending a notification twice. Use the event-processing article to add cases with the actual persistence and notification components connected.

When adding code that connects to AWS, inspect both the endpoint and credential resolution. An SDK may find credentials in the execution environment even when no access key is passed explicitly. Separate local and live AWS endpoints and verify that requests go to the intended environment.

When testing real purchases, authorization, or usage acceptance, assign an owner and target product and follow the AWS integration guide for your pricing model, such as AWS’s integration guide for SaaS contract products. Manage the cases that run on every change in the regression matrix, with results kept separate from live verification.

  • Testing designUpdated

    A Regression Test Matrix for AWS Marketplace SaaS

    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.

  • 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.