AWS Durable Execution Conformance Tests
Project description
aws-durable-execution-conformance-tests
Conformance test suite for the AWS Durable Execution SDK. Validates SDK test requirements against test cases by deploying Lambda functions, invoking them, and asserting execution history matches expected results.
This repository contains the test runner and language-neutral requirements.
Prerequisites
- Python 3.14+
- Hatch (build system and environment manager)
- SAM CLI configured with appropriate credentials
Setup
cd aws-durable-execution-conformance-tests
hatch env create
Test Requirements
Test requirements are language-agnostic YAML specifications that define the expected behavior of durable execution SDKs. They live in the test-requirements/ directory, organized into suites. A suite is a related group of requirements and is not limited to an SDK operation: suites may cover durable operations, cross-cutting capabilities such as serialization and deserialization, or integrations such as an OpenTelemetry plugin.
test-requirements/
├── step/ # 1-N: Step operation suite
├── wait/ # 2-N: Wait operation suite
├── child/ # 3-N: Child context suite
├── callback/ # 4-N: Callback suite
├── invoke/ # 5-N: Invoke (chained) suite
├── wait_for_condition/ # 6-N: Wait-for-condition suite
├── wait_for_callback/ # 7-N: Wait-for-callback suite
├── parallel/ # 8-N: Parallel operation suite
└── map/ # 9-N: Map operation suite
Each YAML file defines a single conformance test. The naming convention is {suite_prefix}-{number}.yaml (e.g., 1-1.yaml is the first step test, 4-7.yaml is the seventh callback test).
Placeholders and Wildcards
Test requirements use placeholders to handle values that vary between executions:
'*'(wildcard): Matches any value. Used for timestamps and other non-deterministic fields.${ID1},${ID2}, ...: Auto-bound ID placeholders. The validator binds these on first encounter and asserts consistency across subsequent references. For example, if${ID1}first matches"abc-123", all later${ID1}references must also equal"abc-123".${GEN_STR:N}: Generates a random alphanumeric string of length N. Used in theVariablessection to create unique test inputs.- Named variables (
${VAR_NAME}): Defined in theVariablessection, substituted intoInput,ExpectedResult,CallbackActions, andExpectedExecutionHistorybefore validation.
Async Test Requirements
Tests for operations that suspend execution (wait, callback, invoke) include additional fields:
AsyncInvoke: true
The validator handles the full lifecycle: invoke the function, wait for suspension, perform callback actions (if any), wait for completion, then assert the final execution history.
Running the Validator
The runner accepts a SAM template whose functions map to requirement IDs through
TestingMetadata.TestDescription. Configure AWS credentials for an account with
permission to deploy and invoke the test resources, then run:
hatch run validate \
--template path/to/template.yaml \
--language python \
--region us-west-2 \
--suite step \
--report console
The validator will:
- Parse
TestingMetadata.TestDescriptionfrom the supplied template - Load the corresponding requirement YAML for each ID
- Deploy and invoke the mapped Lambda functions
- Retrieve each durable execution's result and event history
- Validate the result and history against the requirement
- Report the status of every selected requirement
Test Reports
The validator can emit reports in three formats via --report (repeatable;
defaults to console). Machine formats are written next to --report-file
(default <history-dir>/report), with the extension appended per format:
| Format | --report value |
Audience | Output |
|---|---|---|---|
| Console | console |
Human | Grouped summary printed to stdout |
| JSON | json |
Machine | <report-file>.json (schema-versioned) |
| JUnit XML | junit |
Machine → CI viewers | <report-file>.xml |
hatch run validate --template path/to/template.yaml \
--language python --suite step \
--report console json junit --report-file build/report
Result statuses
Every requirement resolves to one status:
| Status | Meaning | Blocks the run? |
|---|---|---|
PASSED |
History + result matched | no |
FAILED |
Real mismatch or error | yes |
OPTIONAL_FAILED |
Failed, but requirement marked optional: true |
no |
NOT_IMPLEMENTED |
Declared intentional SDK gap (see below) | no |
UNCOVERED |
No mapped test case in the template, and not declared | no (see --fail-on) |
Exit code follows --fail-on: failed (default) exits non-zero only on
FAILED; failed+uncovered also treats UNCOVERED as blocking.
NOT_IMPLEMENTED and OPTIONAL_FAILED never block — intentional gaps stay
visible without failing the run.
Declaring an intentional gap (NOT_IMPLEMENTED)
When an SDK genuinely cannot satisfy a requirement, declare it in that SDK's
SAM template under a TestingMetadata.NotImplemented list instead of silently
omitting it. The runner reports it as NOT_IMPLEMENTED (non-blocking) with the
reason, so the gap is tracked rather than hidden:
TestingMetadata:
NotImplemented:
- id: "8-13"
reason: "toleratedFailurePercentage is rejected at build() in this SDK"
JUnit details (CI correlation)
Each <testcase> uses classname="{language}.{suite}" and name="{id}"
(the stable key). FAILED maps to <failure>; every other non-passing status
maps to <skipped> so CI viewers render gaps as skipped, not failed. A
<properties> block plus <system-out> carry the correlation metadata:
<testcase classname="python.step" name="1-6" time="0.000">
<properties>
<property name="requirement_id" value="1-6"/>
<property name="description" value="Custom serdes (per-step)"/>
<property name="language" value="python"/>
<property name="example" value="StepCustomSerdes"/>
</properties>
<failure message="Expected Result='HELLO WORLD', got 'hello world'"/>
<system-out>Custom serdes (per-step)</system-out>
</testcase>
Because name is the bare requirement id, JUnit files from all three SDKs can
be merged and lined up per requirement, with classname telling them apart.
Contributing
See CONTRIBUTING.md for development commands, pull-request guidance, and rules for adding language-neutral requirement suites.
Security
Report potential security issues through the AWS vulnerability reporting page. Do not create a public GitHub issue for a security vulnerability.
Code of Conduct
This project follows the Amazon Open Source Code of Conduct.
License
aws-durable-execution-conformance-tests is distributed under the terms of the
Apache-2.0 license. See
NOTICE for additional attribution information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_durable_execution_conformance_tests-0.0.1.tar.gz.
File metadata
- Download URL: aws_durable_execution_conformance_tests-0.0.1.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e4bd0d6aeb805c07b7cb136f870b86f4317ef659a10c9ff1181d8e41f0d82c7
|
|
| MD5 |
b6ade99bdadc87053ceaea5b404107e5
|
|
| BLAKE2b-256 |
d65726bf654396d6e3d1ed7e81749408080ce784548e0cc39a64f8710fb130b3
|
Provenance
The following attestation bundles were made for aws_durable_execution_conformance_tests-0.0.1.tar.gz:
Publisher:
pypi-publish.yml on aws/aws-durable-execution-conformance-tests
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_durable_execution_conformance_tests-0.0.1.tar.gz -
Subject digest:
9e4bd0d6aeb805c07b7cb136f870b86f4317ef659a10c9ff1181d8e41f0d82c7 - Sigstore transparency entry: 2191787934
- Sigstore integration time:
-
Permalink:
aws/aws-durable-execution-conformance-tests@e29894482820edd8549fc18ce3c2ac48d2b131c1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e29894482820edd8549fc18ce3c2ac48d2b131c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aws_durable_execution_conformance_tests-0.0.1-py3-none-any.whl.
File metadata
- Download URL: aws_durable_execution_conformance_tests-0.0.1-py3-none-any.whl
- Upload date:
- Size: 188.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27721e7af7a88d84413ccbef3990361b21610cb6d125581507e62059bad855c0
|
|
| MD5 |
f2ce43fa85c6997250db3bf7d64f3e0f
|
|
| BLAKE2b-256 |
f869ce799a7e575a274fbbe344760bc635cc4e5d17d174970c2a3fa77d0ceade
|
Provenance
The following attestation bundles were made for aws_durable_execution_conformance_tests-0.0.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on aws/aws-durable-execution-conformance-tests
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_durable_execution_conformance_tests-0.0.1-py3-none-any.whl -
Subject digest:
27721e7af7a88d84413ccbef3990361b21610cb6d125581507e62059bad855c0 - Sigstore transparency entry: 2191787966
- Sigstore integration time:
-
Permalink:
aws/aws-durable-execution-conformance-tests@e29894482820edd8549fc18ce3c2ac48d2b131c1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e29894482820edd8549fc18ce3c2ac48d2b131c1 -
Trigger Event:
release
-
Statement type: