Issue #1664: Unit Test support for mapserver

Sean Gillies sgillies at FRII.COM
Tue Feb 14 14:51:15 EST 2006


On Feb 14, 2006, at 9:23 AM, Umberto Nicoletti wrote:

> I have opened issue #1664 to track comments, feedback and of course
> criticisms on the much needed (IMHO) addition of unit tests to
> mapserver.
>
> Unit tests are a completely automated way of testing code, which
> should improve the development process, the code quality and the
> developers' confidence in making changes to the code. I now use them
> in almost every project I am involved and I find them invaluable. Go
> and check out some unit tests advocacy here:
>
> http://www.junit.org
>
> For unit testing mapserver I have decided to use Cunit (version 2.0.x
> from http://cunit.sf.net). Unit tests are located under the cunit
> directory and must be compiled in pretty much the same way a mapscript
> extension would. Build and running instructions are detailed in
> bugzilla.
> Please note that you need to install CUnit on your computer before you
> can use it. I am currently using 2.0 on gentoo x86.
>
> The unit tests I have implemented so far only test the connectin
> pooling functions and to activate them you need to configure using the
> --with-threads argument.
>
> Last but not least I am working on a continuos integration project (a
> la Cruise Control).
>
> Let me know what you think and let's get this into cvs HEAD!
>
> Umberto

I had not yet heard of cunit. Seems pretty cool. IMO, this could be  
generally better, and more direct, than the unit tests under  
mapscript/python. We've all got C compilers, so no one can complain  
about how they don't have Python. On the other hand, it doesn't  
exercise the C#, Java, or Python bindings at all, so it isn't a  
complete replacement for the Python test suite (or a similar Java  
suite).

Like Frank suggests, write up an RFC. I'm in support of the idea, and  
I'm sure others can also be convinced of its utility.

cheers,
Sean

---
Sean Gillies
sgillies at frii dot com
http://zcologia.com/news



More information about the mapserver-dev mailing list