Friday, August 05, 2005
Hi People !
 
Lately I have been getting a lot of spam in my blog from spammers posting ads
using the blog comments system or add trackbacks to it.
To fight this I have turned on dasBLog's captcha  system.
It means that when you add comments,
you will have to enter a string of chars copied from an image near the save button.
 
Eli.
Friday, August 05, 2005 9:15:53 AM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, June 06, 2005
Hi,
 
Today I completed phase 1.
 
For this step I used 3 VMWare Machines, One for the Team Foundation Server (Single Server Deployment)
And Another 2 as clients with Team Suite Installed ( The test will simulate 2 users working on the same foundation server).
 
All machines are running Windows 2003 Standard Edition SP1.
The Foundation Server is running the Yukon CTP like suggested in the installation guide.
 
I've got to say I was surprised when almost everything went smooth.
 
I downloaded the updated installation guide from here.
Followed the installation instructions step by step,
and although the process was a bit tiring and took several hours,
It worked like a charm.
Pretty nice for a Beta 2 Product.
 
It was a bit upsetting that not all perquisites for the installation were found on the DVD/CD itself.
 
which is a bit of a hassle for people like me working on an intranet which is disconnected from the Internet.
 
The only bug I found so far was trying to add domain users to the Foundation Server Security groups.
Most of our users have caption names written in Hebrew and the / character in the department name, and it seems to bug the server.
It gives an error saying it has trouble adding users from other domain which is not the case here...
The workaround I found: I have created a new Windows Domain security groups with an English name.
Added the users to the group, and added this group to the TFS Security group.
For now it seems to work OK.
 
Stay tuned for phase 2 in the coming days...
 
Eli.
 
Monday, June 06, 2005 8:47:18 PM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
Hi,
 
I started testing Microsoft's new Team System Beta 2 (Visual Studio 2005 & Team Foundation).
On the coming weeks I will test them with a test case of a real project,
the same one I used to convert Unit Test from Nunit 1.0 to Nunit 2.2.2.
 
The test will consist of the following phases:
 
1) Installing the environment.
2) Loading all code from VSS 6.0d to Team Foundation Source Control
3) Converting all code from Framework 1.1 to 2.0, without warnings And all Unit Tests green.
4) Testing the source control (Labeling, Branching etc...)
5) Testing the Bug Tracking.
 
From Time To time, I will publish interesting stuff I encounter during the process, so stay tuned ...
 
 
Eli.
Monday, June 06, 2005 8:32:07 PM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
Hi friends,
 
I opened my Blog, having tons of ideas to write about,
But all you got was 2 months of silence.
 
I've been busy at work, going on some trips, scuba diving, and lots more.
(I will upload some new photos to my site album soon)
 
Hopefully I will have some more free time on the coming weeks to write ...
 
Eli.
 
Monday, June 06, 2005 8:15:04 PM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, April 03, 2005
 
 
Hi all,
 
One of our projects at work began 3 years ago.
at that time we searched for a Unit Testing tool for .Net.
After trying some options, we made the right decision and chose Nunit 1.0 as the Unit Testing tool for the project.
 
Nunit GUI 1.0 was not perfect for our requirements at that time, so we used the benefits of open source code and
inserted some light changes, that later on became a natural part of Nunit on the Public version.
 
When Nunit grow and developed it became an excellent tool,
only we could not start to use it easily as Nunit 1.0 was not Attribute based, and we had tons of "Legacy"
Unit testing code in our hands and a tight project deadline ...
 
So it became that after 3 years of coding, the project stayed with Nunit 1.0.
 
Only recently the team has decided that enough is enough and it's time to move on.
After consulting with Roy Osherove we have decided on a general plan of converting the code
by using an evaluation version of Resharper & Modifying the Nunit 1.0 open source interfaces
to become as close as possible to Version 2.2.2.
 
Me and Galia decided to take responsibility for the mission and transformed the code in less then a day of work.
 
We decided to share the experience in case there are other people around stuck in the same problem ...
 
Here is the recipe for transforming Nunit 1.0 Tests into Nunit 2.2.2 Tests
 
A bit of technical information about the project:
 
  • Over 50 Assemblies
  • Written in C#.
  • Using Visual Studio 2003.
  • Visual Source Safe 6.0d Source Control
 
Here are the steps we went through:
 
 
   Definition:
   "Transformation milestone X" is defined as the actions:
  1. Check in all you Code ( Keeping it checked out, ore checking it out again)  commenting it with the changes made so far.
  2. Create a label "Nunit Upgrade - X"
 
  • Coordinate a day with all the development team so that you can check out all the code without intervention
    • (Unless you are working with a Source Control System that allows nice branching)
  • Install Resharper in the Workstation.
    • If you have 99$ to spare, it will be a money well spent in my opinion.
    • If not, use the evaluation version as we did, and uninstall it when you are done.
  • Make sure all code is checked in the source control .
  • Clear your working folder on the hard drive.
  • Get all code from source control and Re build all projects.
  • Run all Unit tests in all the projects to make sure all is green and that we are starting on a "clean surface".
  • In case you have multiple projects spreading over a few solutions, create one solution with all the projects.
  • Create a Label in the Source Control named "Before Nunit upgrade"
  • Check out all code in the new solution.
  • Rename all methods to begin with "Assertion."
    • This conversion was done using the IDE's  Find & Replace dialog.
    • Replace all "TestCase." instances with "Assertion."Find instances with one white space before name and ( after. and replace them.   
       According to your coding conventions, you might need to change the spacing, tabs prefixes and so on..          
    • Here are the strings we needed to replace ( for some projects you might need more)
      • "AssertEquals("
      • "AreNotNull("
      • "AssertNull("
      • "AssertSame("
      • "Assert("       - This one is done last !
    • If code uses C#'s Debug.Assert, correct it using the transformation: Debug.Assertion -> Debug
  • Create Transformation milestone "After renaming methods to static formation"
  • Add Nunit 1.0 source code to the solution.
    • You can download the source from here.
    • You only need to add the NunitCore project.
    • Rename the project from NunitCore to NunitCoreOld
  • Change all assembly references from the binary file to the added projects.
    • We know .. it's dirty work, but we didn't think it was time worthy to automate this process...
    • Save & Build all. Check that there are no compilation errors.
      • If done correctly, none should be.
      • If there are, fix them.
  • Using Resharper , Auto rename all public methods of "Assertion" class in the NunitCoreOld project.
    • These are the transformation we used. We actually found out not all the methods were is use, so we got lazy and did only the ones we needed. you might need to add some more to the list. simply check out the new API documentation for differences.
      • Assert -> IsTrue
      • AssertEquals -> AreEqual
      • AssertNotNull -> IsNotNull
      • AssertNull -> IsNull
      • AssertSame -> AreSame
    • Rename "ExpectException" attribute class to "ExpectedException"
  • Save & Compile code to make sure there are no errors, If there are any, fix them.
  • Now we need to change all parameters order according to the new API in the "Assertion" class using Resharper.
    • The Rule is "For all public methods that has a string as a first parameter, move it to be the last.
    • For methods that has 3 string parameters, sample the transformed code to see it was done correctly. We found a problem, didn't bother to make sure if it was a software error or a human error.
  • Save & Compile code to make sure there are no errors, If there are any, fix them.
  • Using Resharper, rename the "Assertion" class to "Assert".
  • Save & Compile code to make sure there are no errors, If there are any, fix them.
  • Create Transformation milestone "After Resharper transformation" .
  • Install Nunit 2.2.2
    • You can download the installation package here.
  • Change all project references from NunitCoreOld  to the new nunit.framework binary in the GAC from Version 2.2.2.
  • Remove NunitCoreOld from the Solution.
  • Create Transformation milestone "Referencing Version 2.2.2" .
  • Now we need to deal with adding the new Attributes of the 2.2.2 framework to the tests.
    • We did all the transformation in this section using the IDE's Find & Replace dialog with the Regular Expressions checkbox enabled.
    • Here are all the transformation & Regular expressions used to make them:
      • TestCase inheritance -> [TestFixture]
        • public class {:c+}.*TestCase -> [TestFixture]\n\tpublic class \1
      • Setup method ->  [SetUp] :
        • protected override void SetUp -> [SetUp]\n\t\tpublic void SetUp 
      • TearDown method -> [TearDown]
        • protected override void TearDown -> [TearDown]\n\t\tpublic void TearDown
      • TestMethod - > [Test]
        • public void Test -> [Test]\n\t\tpublic void
        • ( notice one white space at the end of the replace string ! )
      • Removing Inheritance:
        • \([Ss]tring name\).*\n*.*base\(name\) -> \(\)
  • Save & Compile code to make sure there are no errors, If there are any, fix them.
  • Create Transformation milestone "Changing to Attribute formation" .
  • Run all tests using the new Nunit 2.2.2 GUI.
    • You might find some errors created by bad transformation . we found only 2. it took 5 min. to solve them.
  • Create Transformation milestone "Ready for Nunit 2.2.2" .
  • Delete old Nunit Source code from Source Control & File system. (Normal delete, not permanent)
  • Delete old Nunit 1.0 binaries from source control * File system. (Normal delete, not permanent)
  • Optionally, Install "Test Driven .Net" for easy usage in development process.
That's all ! Your'e done !
 
And it took us less then a day.
Should take you less because you have all the process figured out already right here :-)
 
Good Luck !
 
Eli & Galia.
 
 
 

Sunday, April 03, 2005 9:39:36 PM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [2]  | 
 Wednesday, March 16, 2005

Hi,

 
This is my new blog.
 
you are welcome to monitor it & visit from time to time...
 
Eli.
Wednesday, March 16, 2005 9:14:50 PM (Jerusalem Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |