https://github.com/kenfdev/step-functions-testing
PoC to see if integration testing with Jest is doable with Step Functions Local
https://github.com/kenfdev/step-functions-testing
Last synced: 12 months ago
JSON representation
PoC to see if integration testing with Jest is doable with Step Functions Local
- Host: GitHub
- URL: https://github.com/kenfdev/step-functions-testing
- Owner: kenfdev
- License: mit
- Created: 2022-02-02T13:01:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T17:32:40.000Z (over 2 years ago)
- Last Synced: 2025-02-22T22:07:32.012Z (about 1 year ago)
- Language: TypeScript
- Size: 242 KB
- Stars: 13
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PoC Step Functions integration testing with Step Functions Local
Credits on extracting the ASL from CDK go to the following repository:
https://github.com/nathanagez/aws-cdk-state-machine-asl
There is also an excellent blog post and recommended to read:
https://nathanagez.com/blog/mocking-service-integration-step-functions-local-cdk/
This repository takes a step further and creates the CDK within Jest and sends the ASL to Step Functions Local via the AWS SDK.
## How to run the test
```
# install the dependencies
npm install # whatsoever
# run the test(make sure you have docker installed)
npm test
```
## Reference
- [Using Mocked Service Integrations - AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/sfn-local-test-sm-exec.html)
- [Mocking service integrations with AWS Step Functions Local | AWS Compute Blog](https://aws.amazon.com/jp/blogs/compute/mocking-service-integrations-with-aws-step-functions-local/)
- [aws-stepfunctions-examples/sam/app-local-testing-mock-config at main · aws-samples/aws-stepfunctions-examples](https://github.com/aws-samples/aws-stepfunctions-examples/tree/main/sam/app-local-testing-mock-config/)