[Mono-dev] nunit test upgrading task force

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Tue Jun 23 02:34:37 EDT 2009


Hi,

I'm thinking if we can upgrade our nunit tests to eliminate derivation
from Assertion (such as eliminating AssertEquals), to make our tests
ready for future versions of NUnit.

The task is very easy: if there is a test class that looks like

     [TestFixture]
     public class FooTest : Assertion
     {
         [Test]
         public void FooBar ()
         {
             AssertEquals ("#1", str1, str2);
         }
     }

rewrite it like:

     [TestFixture]
     public class FooTest
     {
         [Test]
         public void FooBar ()
         {
             Assert.AreEqual (str1, str2, "#1");
         }
     }

I tried to count it by "grep AssertEquals", and there were 8000 lines
in corlib, 1000 lines in System, 1500 lines in Sys.XML, and so on.

So, it is a simple but massive task that I cannot do it by myself.
But if we can hack a volunteer team from here it would be possible.

If you can join the effort, you are welcome :)

* list of the files

I have made an easy list of such "old" test files on a spreadsheet:
http://spreadsheets.google.com/pub?key=rkWl-ZQHJvcu6tkJOeFFg3A&output=html

* workflow

Basically, removing the base class (Assertion) will give lots of
errors. And when there is no more errors, then you are done with it.

You might want to mark your ownership on the spreadsheet before
you actually start working on them. I'll release the ownership
if some of them are "locking".

If you have commit access, let's just check in. Otherwise, post
your changes. (attachment, monoport, etc.)

One sort of concern is that, if you are actively maintaining some code
files and making changes in such old test files, please mark them as
you don't want them changed.
We don't have to do this conversion task perfectly right now. (And
of course you don't have to do upgrade task by yourself because of
marking them.)

* starting

If you are willing to join the task force, please drop me a line
and/or post to the list (here) :)

I'll share the spreadsheet so that you can edit the spreadsheet.
If you don't have Google account, I'll update it instead (with
possible delay).

Atsushi Eno


More information about the Mono-devel-list mailing list