Ruby for Test Automation

My book editors tell me that the Ruby programming language is one of the fastest growing technologies. Ruby has been around since 1994 but ony recently has received a lot of attention. Ruby is not an acronym, it comes from the gemstone; Ruby was created to be an improved Perl, by making the new language 100% object oriented. I like what I’ve seen of Ruby so far but I’m guessing that Ruby’s use in software testing will be relatively minor. More specifically, I suspect that Ruby’s best use in software testing will be for testing Ruby applications and possibly non-Windows applications. For testing Web applications, Perl and JavaScript are excellent choices — Perl because of its large CPAN library of useful code, and JavaScript because of its ability to manipulate Web browser Document Object Models. For .NET Windows applications, C# and VB.NET are great choices because of their ability to directly call into the .NET Framework (for example using System.Reflection, and the underlying data types). For non-.NET Windows applications, C# and VB.NET again are great choices because of their ability to use the P/Invoke mechanism to call the Win32 API functions. In other words, for these kinds of systems, there’s no compelling reason to use Ruby. But for Ruby applications, Ruby is a natural choice as a test automation language. And for non-Windows applications (typically written in Java or C++), Ruby may in fact prove useful, mostly because as a scripting language, Ruby is generally quicker to write than a compiled language (although that depends more on your choice of editing and debugging tools than choice of language).

This entry was posted in Software Test Automation. Bookmark the permalink.