"Infinitest" with the XP Frameworkat 2012-06-30 in Unittests by friebe (0 comments) Thinking about our upcoming 5.8.6 release whose focus is on unittesting, I recently came up with the idea to have unittests run whenever I change, and save, the code I'm working on (yesterday evening I found out in the Java world this is called "infinitest" - my focus though was to get this done on the command line, without the necessity to plug in to various IDEs).Searching for utilities to monitor the file system for changes, I found the "inotify tools". Since I work on Windows using Cygwin though, I decided to "port" them using the .NET Framework's FileSystemWatcher class. The results can be found here (just clone and run "make" - prerequisites are .NET Framework v3.5). Given this, the basic command line is: $ inotifywait -r -m src/ | while read line ; do \ Extending this example to run unittests is easy, especially with unittest now accepting paths as command line argument. Last but not least, we use an additional listener to update the xterm or xterm compatible shell's title with the progress and the "executive summary" later on, so we only have to glance at the console's title bar to see what's going on. ![]() infinittest for XP running in a mintty window Putting it all together, we now end up with the following command line: $ inotifywait -r -m src/ | while read line ; do \ Pretty cool, I'd say! |
|