One approach to software test automation is to use an Open Source test framework. A test framework is a set of prewritten software modules plus optionally, a master program of some kind that engineers can use to create test automation. In other words, if lightweight test automation is a short program, written from scratch in a language such as C# or Perl, which tests a software system, then an Open Source test framework is much the same except that a lot of code modules are already available to you. Or put another way, an Open Source test automation framework is similar to a commercial test framework, except that an Open Source framework is free, typically (but not always) at the expense of features, quality and support. Bret Pettichord, a well-known writer and speaker on software testing, also pointed out to me that Open Source frameworks can also be considered a library which enables you to more easily write test automation. There are hundreds of Open Source test frameworks available. Some examples are JUnit for Java unit testing, NUnit for C# unit testing, and Watir for Web testing. Click on the image at the bottom of this blog entry to see a screenshot of Junit.
Like all testing approaches, using an Open Source framework has pros and cons. The obvious advantage of using an Open Source framework is that, once you learn how to use the framework, you can potentially save time. One disadvantage of using an Open Source framework is that most require a moderate to significant amount of time to learn. Another disadvantage of Open Source frameworks is that they tend to be changing constantly as new features are added and bugs are fixed. And a third disadvantage is that when you use an Open Source framework, there is an extremely strong tendency to test your system based on what the framework can do rather than what needs to be tested.
As always, there is no one best approach to software test automation. Some members of the Open Source community tend to be very strong advocates of all things Open Source, even to the extent of claiming that using Open Source frameworks is always a better approach than writing custom lightweight test automation. That is just not true; different software development scenarios require different testing approaches.