Tuesday, November 10, 2009

Writing JUnit Tests in Geoserver

In order to get a community module promoted to extension status I had to write a couple of unit tests with JUnit. Geoserver strives to be production quality software so unit tests are quite handy, for agile programming as well as regression testing. Making tests pass through taking short-cuts is quite easy but usually very unwise. I did have to take the copy-paste short cut route though, since the generic DefaultMapProducerTest was hardcoded with the "image/gif" output format and I was not in the mood to make core changes (outside my tiny module).

Well now a couple of tests are written and the module code passes them and works as expected in general, time to petition for inclusion as an extension.

Post a Comment