TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Testing REST Web Services with Rails

1 pointsby jingwenoalmost 14 years ago

1 comment

jingwenoalmost 14 years ago
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.