- 最新
- 最多得票
- 最多評論
Hi,
I believe you can specify the endpoints as follows
import boto3
client = boto3.client('stepfunctions', endpoint_url='http://localhost:8083')
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
I don't think there is a way and I must say that I do not understand why you need it. We are talking about testing the state machine. So all you need to do is create the input JSON and invoke it locally. You are not running integration tests locally which require some other service to invoke the state machine.
The thought around using Python is that we already use it for our automated testing framework and it would be nice to not have to introduce another paradigm. With boto3 support we could start Step Functions Local and then ,in Python, provide the input to the local state machine and then inspect the output to ensure it conforms to our expectations. If anything goes wrong we could use the standard errors and patterns our team is already familiar with to signify a failed test. This can certainly occur by calling out to the AWS CLI from Python but that is less than ideal.
If this still doesn't fit a pattern that makes sense to you could you outline how you would go about structuring automated testing of Step Functions?
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
That did it. Thank you!