ruby on rails - Testing RESTful API with Cucumber in a front end less application -


Hello, I have no front end in my app. I'm just ready to release a Resipple API That can be used by different clients. How should any indicators proceed with me to test with cucumber? Every action in the controller generates XML feed, any signal or suggestion?

I think webrat is more than you need. For XML feed testing, you do not need a browser simulator like WebRet, which will load the page and analyze all the markups (links, forms, etc.) when you do not actually have any HTML pages.

Instead you need something like curl () or curb (on rubyforge, on curb of ruby ​​binding), or patron (on rubyforge).

These libraries can create a request header according to your liking (like setting content -Tip, select post delight head etc.) and get feedback and possibly follow the 302 redirection.

The answer came back, then the XML object can be changed, and XML is available for the parser Ruby can be used to test the output. In addition, you can write XML Mapping Classes (on Ruby Forge) and test their properties etc. to convert XML output to Ruby objects. It's very clean, IMHO


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -