Test Automation with Scripting Languages

By far the biggest change in the field of software testing over the past couple of years has been the increased use of software test automation (programs which test the system under development). Although you can purchase a commercial test automation framework from companies like Mercury (HP), Segue, Rational (IBM), and many others, a more flexible approach is to write custom test automation code. If you write your own test automation code, you can use a fully-compiled language (typically C or C++), an intermediate-compiled language (Java, C#, VB.NET), classic Visual Basic (which I feel is a language in its own category), or a scripting language. Scripting languages are often a good choice of a language for test automation in Agile-style environments, and scripting language automation almost always nicely complement larger and more complex test automation environments. The seven main scripting languages I’ve used for test automation are Perl, JavaScript, VBScript, Python, Ruby, PHP, and PowerShell. I really like all seven of these scripting languages and I think each has strengths and weaknesses. Perl is the grand-daddy of scripting languages and has the advantage of the availability of a huge set of code libraries. JavaScript has the advantages of working very well with Web browser Document Object Models (especially the IE DOM), and with ActiveX / COM objects. VBScript has been around for a long time so you can find tons of example code on the Internet. I see Python as an improved Perl (object oriented capabilities are designed in rather than more or less tacked on). Ruby work very well with Web applications and the RoR framework (Ruby on Rails) in particular. PHP also works very well with Web applications, especially those developed using PHP. And Windows PowerShell is terrific for testing .NET systems because PowerShell can directly call into the .NET Framework. There has been a huge growth of technologies over the past few years and in general it’s no longer possible for testers to have a fairly deep knowledge of every scripting language. But the more you know about a range of different scripting languages, the stronger asset you’ll be to your project team, and the more career growth opportunities you’ll get.
This entry was posted in Software Test Automation. Bookmark the permalink.