TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Testing REST Web Services with Rails

1 点作者 jingweno将近 14 年前

1 comment

jingweno将近 14 年前
Testing REST web services has never been easy. It requires a running web server, multiple threads, network conection and complex transaction management.<p>Ideally, REST web service client test should have the following characteristics:<p><pre><code> The experience of testing web service API is similar to that of testing a ActiveRecord model Start up and shut down the web server for the purpose of running REST web services Rollback test data after each test Control fixture creation for REST web services </code></pre> In this article, I demonstrate solutions to each of those mentioned with ActiveResource and Distributed Ruby.