Things I Love About UML
October 6th, 2011- umm, I’m sure I’ll think of something…
- or not?
The problem: We have several XML transformations, which we want to test with several inputs each. The tests are done by running the transformation on a source XML file and comparing the result with an expected XML file (using XMLUnit’s Diff class). These XMLs are stored in directories in the file system, where each such directory contains the input file, the expected result and info of which transformation to use them against.
I want each directory to be treated as a separate unit test, but I don’t want to actually write a separate test method for that. Thus the XML test will be well integrated with the rest of the unit test of the system and I don’t have to develop separate reports and other management stuff for them.
I couldn’t find anything like that for JUnit, other than the advise to read JUnit’s source code and try to figure out where to hook my changes. But I also found this blog entry, discussing JUnit extensions. Yes, I know, his needs were different than mine. Anyway, I decided to give TestNG a try, because I’ve also considered it before for a different project. And guess what I found! They have a nice little feature, called “factories,” which allow you to dynamically generate test cases. Just what I needed.
There are TestNG plugins for various IDEs, including Eclipse, and it is supported by Maven. So, it seems TestNG is the right answer for this situation.
I was rereading the essay “The Other Road Ahead” from “Hackers & Painters” and I was quite surprised by the following note (it’s number 14):
If the Mac was so great, why did it lose? Cost, again. Microsoft concentrated on the software business and unleashed a swarm of cheap component suppliers on Apple hardware. It did not help, either that suits took over during a critical period. (And it hasn’t lost yet. If Apple were to grow the iPod into a cell phone with a web browser, Microsoft would be in big trouble.)
This was back in 2004, mind you! And Apple announced iPhone in January 2007. “The Other Road Ahead” was originally published in September 2001, and is missing the part between the parentheses, but it turned out that Apple announced iPod one month later.
Most impressive.
Peter Siebel points out the fact that googling for “common lisp tutorial” gives poor results. I hope that this post will help a bit in improving the situation, because I think Practical Common Lisp is the best introduction to Lisp.
Update
It’s now up to 3rd place! Not bad.
In a stunning move, yesterday EA officially released the shining new FIFA’08 with state of the art copy protection missing, in the hopes of catching the cracker community off-guard. A member of a well known cracker group was quoted to say that “[they] expected the worst,” but nevertheless they’ve released an “official” zero-day crack.
EA spokesmen refused to comment these events.
Six innocent people are sentenced to dead in Libya! The five Bulgarian nurses and the Palestinian doctor are accused of deliberately infecting more than 400 Libyan children with the AIDS virus and the death sentence was recently reconfirmed by the Libyan high court.
There are multiple proofs by independent experts that these children were already infected before our medics start working there, but these were dismissed in favor of confessions obtained by torture.
I’m supporting this (and others) campaigns for whatever good they bring.
Second rule of Emacs-related blog: don’t talk about emacs.
Let’s see if anybody brakes them on Planet Emacsen.
Just stumbled on Planet Emacsen. At last, there is an aggregation for Emacs-related blogs. Currently it doesn’t seem to filter emacs unrelated posts, but I guess that will happen over time.
Today, the SBCL team released the long awaited version 1.0. Besides the bugfixes, this version introduces several interesting optimizations:
There are also improvements to the Windows port.
Great work! Congratulations, guys.