aspose file tools*
The moose likes Ruby and the fly likes Software Testing using Ruby? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Software Testing using Ruby?" Watch "Software Testing using Ruby?" New topic
Author

Software Testing using Ruby?

Tj England
Greenhorn

Joined: Jun 21, 2008
Posts: 2
Hi Peter,

I'm curious if Ruby can be used in automated software testing? My programming experience is limited to Mercury (HP) WinRunner which is based on the C programming language. I would like to build scripts to perform load tests on web applications.

Thanks


-TJ
Peter Cooper
Author
Greenhorn

Joined: Jul 17, 2009
Posts: 25
There are a lot of ways to do testing, load testing, and Web application testing from Ruby. The Ruby community seems to be a little bit nuts over testing - almost religious about it - so the number of testing libraries is.. quite large for the size of the community ;-)

One of the best known libraries is Watir. To steal some info: "Watir is an open-source library for automating web browsers. It allows you to write tests that are easy to read and maintain. It is simple and flexible. Watir drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page. Watir is a family of Ruby libraries. They support Internet Explorer on Windows, Firefox on Windows, Mac and Linux, Safari on Mac, Chrome on Windows and Flash testing with Firefox."

There's also an attempt to port Selenium to Ruby.

If you want something that's lower level and doesn't rely on a browser, there's also WebRat which provides an API for mechanizing Web requests and browser features using Ruby methods. With this you can put together scripts to perform whatever actions are necessary on your sites.

The above are all quite generic tools - if you actually write your app in Ruby, then you can test a bit "closer to the bone" with things like Rack::Test, but I'm assuming you're talking about using Ruby in a more generic way to access Web applications generally.


Author of Beginning Ruby (Apress): http://bit.ly/t31ag
Editor of Ruby Inside and RubyFlow
Peter Cooper
Author
Greenhorn

Joined: Jul 17, 2009
Posts: 25
Also check out http://www.httpwatch.com/rubywatir/
Tj England
Greenhorn

Joined: Jun 21, 2008
Posts: 2
Peter,

Thanks for the information, it is very helpful. I had heard of Watir, but had not idea of how versatile it was. The majority of application testing I do is web based, so I should definitely explore Watir.

Thanks again.

-TJ


Peter Cooper wrote:There are a lot of ways to do testing, load testing, and Web application testing from Ruby. The Ruby community seems to be a little bit nuts over testing - almost religious about it - so the number of testing libraries is.. quite large for the size of the community ;-)

One of the best known libraries is Watir. To steal some info: "Watir is an open-source library for automating web browsers. It allows you to write tests that are easy to read and maintain. It is simple and flexible. Watir drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page. Watir is a family of Ruby libraries. They support Internet Explorer on Windows, Firefox on Windows, Mac and Linux, Safari on Mac, Chrome on Windows and Flash testing with Firefox."

There's also an attempt to port Selenium to Ruby.

If you want something that's lower level and doesn't rely on a browser, there's also WebRat which provides an API for mechanizing Web requests and browser features using Ruby methods. With this you can put together scripts to perform whatever actions are necessary on your sites.

The above are all quite generic tools - if you actually write your app in Ruby, then you can test a bit "closer to the bone" with things like Rack::Test, but I'm assuming you're talking about using Ruby in a more generic way to access Web applications generally.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Software Testing using Ruby?