.NET Module Testing with IronPython

One of the areas where dynamic languages particularly shine is testing. There is a whole chapter of IronPython in Action on the subject (chapter 7 which is free to download and is a great introduction to unittest and testing topics for both Python and IronPython).

The .NET world is starting to realise this, and a new MSDN article by Dr. James McCaffrey explores both 'ad-hoc' testing with the interactive interpreter and writing your own test harness in IronPython for automated testing of .NET classes and libraries. (Personally I think he would have found it much easier to use unittest, but as you can see from the article even writing a custom test harness can be done in very little code with Python.)
The Python scripting language has features that make it an excellent choice for performing several types of software testing. There are several implementations of Python available including CPython, the most common implementation on machines running UNIX-like operating systems, and IronPython, an implementation released in late 2006 that targets the Microsoft .NET Framework. In this month's column I'll demonstrate how to use IronPython to test .NET-based modules from both the Python command line and in lightweight Python scripts.

Comments

Popular posts from this blog

Extending Abobe Flash Player and AIR with Python and Ruby

IronPython Tools for Visual Studio CTP3

Further Adventures of the Debugger