* Testing
Testing is an important part of the Mono project: every one of its
three major components has a test suite tailored for its needs. This
is very helpful, because in the course of developing the software it
is very common to introduce bugs in existing code. A test suite
helps us fix the bugs as soon as they are introduced.
** Class Library Tests
All classes in Mono libraries should have comprehensive unit test
suites to go with them. Unit testing is a software engineering
methodology that makes it easier to build correct code. Every
method in every class should have a set of tests to verify
that they work correctly. Mono also needs a testing framework
to make it easy to write and run lots of tests.
Try NUnit
Why do unit testing? It becomes simple to run automated tests
for the whole library. Unit tests are a safety net - you can
change part of the code and verify that you haven't broken
anything. Ideally, tests are written before the actual library
code itself. And every time a bug is discovered, a test should
be written to demonstrate the bug and its fix. Then, if
you ever reintroduce the bug, you will know immediately. For
more info, read
JUnit Test Infected: Programmers Love Writing Tests.
** Getting Started
We welcome all contributions to the Class Libary Test Suite.
There is information to help you get started in CVS at
mcs/class/doc/NUnitGuidelines. Once you have written your test, please
post it to mono-list.
Someone will make sure to add the file or apply the patch as
appropriate. If you plan to be an on-going contributor and
would like to get cvs account, email miguel.
Normally, after you send a couple of well-written new files
and/or patches to the list, you will be given cvs access.