使用针对AWS API Gateway / Kinesis的Spring Cloud Contract执行合同测试

问题描述 投票:0回答:1

我想在REST API(使用AWS API Gateway)上执行合同测试,该API将事件提供给Kinesis。我一直在考虑Spring Cloud Contract来执行这种类型的合同测试。但是,我找不到任何在线使用Spring Cloud Contract来执行这种类型的测试(作为这种Kinesis的Spring Cloud Contract服务器/生产者)。这甚至可能和/或使用Spring Cloud Contract这是否有意义?我是否应该使用其他工具对AWS API Gateway / Kinesis执行合同测试?

aws-api-gateway amazon-kinesis spring-cloud-contract
1个回答
0
投票

这是一个非常好的问题。是的,您可以通过与WireMock集成来执行它。由于您不拥有该应用程序的API,因此您无法强制它们创建合同定义和存根等。但是,您可以执行的操作是设置将调用aws网关的真实api的测试。以线索存根的形式记录这对请求/回复。在这里你可以找到这样一个例子来剔除名为Stripe https://github.com/spring-cloud-samples/the-legacy-app/tree/master/stubs_with_proxy的公司的api

© www.soinside.com 2019 - 2024. All rights reserved.