测试两个 Rails 应用程序之间的集成 [英] Test integration between two rails apps
问题描述
我正在开发一个由两个不同的 Rails 应用程序(服务器和客户端)组成的系统,这些应用程序通过其余的 Web 服务进行通信.
I am developing a system composed of two different rails applications (server and client) which communicate via rest web services.
我对每个应用程序分别进行了测试,但我想为两个平台之间的集成添加一些测试,以断言一个平台创建的请求与另一个平台的期望兼容.
I have tests for each app individually, but I would like to add some test for the integration between the two platforms, to assert that one creates a request compatible with what the other is expecting.
任何提示将不胜感激.
推荐答案
我有一个类似的架构,我们使用 VCR 来记录所有服务器端响应并避免总是发出请求.它可能会变得烦人,现在我正在寻找一种方法来在每次请求后清除服务器中的数据
I have a similar architecture and we are using VCR in order to record all server side responses and avoid make requests always. It could turn annoying and right now I'm looking for a way to clean data from server after every request
我认为 VCR 可能是测试应用之间集成的一个很好的起点.
I think VCR could be a good start point in order to test integration between your apps.
您可以在此处找到文档 -> Relish 文档
You can find documentation here -> Relish Docs
这篇关于测试两个 Rails 应用程序之间的集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!