Skip to content

scanpratik/step-function-local-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Step Functions Local Testing using JUnit and Spock

Step Functions Local testing with mock configuration provides the capability to mock AWS service integrations that are present in a state machine. This helps in testing the state machine in isolation.

This is sample project which showcases how to run Step Functions local tests with mocks using JUnit and Spock framework instead of running ad-hoc CLI commands. Both type of tests use Testcontainers to run Step Functions Local Docker image.

This is not a replacement of the strategy shown in above blog but another way to test Step Functions state machine with better assertion capabilities. Teams currently using Java for Serverless development can leverage this strategy in their current applications.

Prerequisites

Running Tests

Make sure docker engine is running before running the tests.

In order to run the tests, just run below gradlew task from project directory:

./gradlew test

Tests can also be run individually via IntelliJ's native integrations or your choice of an IDE.

Explanation

Checkout these test classes for details:.

About

SAM based step-function-local-testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors