September 2005 Entries
Team Fondation Server 2005 B3 on a DC, Watch out for the pre-requisite products installation order!

Ok like promised here are a few thing to do in order to successfully create a Single Server install of Team Foundation Server B3.

Follow the documentation available on the DVD and also available here it has been greatly updated since the last release and has some good information.

What I used to do was to create a Virtual Machine with Windows 2003 Server SP1 (apply Windows Update) and then promote to a DC. Install IIS, then install SQL Server 2005, Windows Sharepoint Services and Finally the ATDT setup from TFS.

This worked fine up to B2. Enter SQL Server 2005 June CTP...

Starting with that release of SQL, you can't install SQL after you promoted your machine to a DC, the setup fails because it can't create a local group.  So what you need to do is install Windows 2003 Server SP1 with patches then IIS and SQL Server 2005.  When that is done, you then promote to a DC.  Once that is done, reporting services will not work anymore, you'll need to give the NETWORK SERVICE user access to Read and Write everything under the windows\microsoft.net\Framework\2.0.x directory as well as Windows\temp.  Note: I think this may be a limitation of SQL Server 2005 (pre-RTM) hopefully they will fix this for RTM.

The rest of the install should go smoothly from there.

Oh something we coun't do before B3, you can also decide to run in a workgroup environment and not promote you Single Server to a DC.  I have tested this scenario and it works fine also.  That would alleviate those problems for testing machines.

Components to use Visual Studio Team Suite RC, SQL Server 2005 September CTP, and the newly release VSTF B3 all available on MSDN and supporting version 2.0.5027.26 of the .NET Framework 2.0

Don't forget to give as much memory as possible to your VM or physical Server when running TFS as a Single Server.

Release of Visual Studio 2005 and the .NET framework 2.0 will finally stabilize the madness of .Net framework mixing and matching all future Beta product should be recompile with the RTM Framework bits and we'll only have to deal with the actual beta products and not the Framework.... I'm highly anticipating that moment... November 7th can come fast enough!

That's all for now,

ET

Update: Vurg says that he was able to install on a promoted DC.  The way I usually install is on a new VM in which I use a Windows 2003 Server SP1 slipstreamed install cd.  I then Promote to a DC, Install IIS and then Run the SQL Server 2005 install CD.  I use all the defaults in the SQL Setup exept for the User ID that will run the services.  As per the TFS installation guide I Use the built-in System account and from the list select Local system I'm wondering if I used a domain user/administrator if that would let me install properly.  I have not had any success installing SQL Server on a DC using the above mentionned user id.  Next time I install I'll try with a domain admin and see if it works.  I'll let you know.

Overall impressions of Team Fondation Server 2005 B3

Well B3 of TFS is now available on MSDN.  I've been installing and testing builds leading to B3 for the last 3 weeks and B3 is solid.  There are so many more feature than B2.

On of the new cool things is the Source Control Proxy server.  This server basically caches files "gotten" by the first user, then all subsequent "get" are super fast.  This server is designed to be used in a WAN scenario between two location that share a low bandwidth line.  I'm sure you'll like if your in this situation.  VSS was just sooo slow in WAN scenario...  Good call from Microsoft to actually do this, it will help large enterprise make better decision in there choice of Configuration Management System.

Performance is also greatly improved all around the product.  We can round-trip very large description from Excel and Project also good stuff.

I actually got Team Build to work and store data in the Warehouse to produce the cool reports we have been shown in slideware for the last year.  Again cool stuff.

You will notice the polish of the product right from the install, there is a new "checker" that verifies the pre-requisite before going on.  Note: When installing in a VM you will get an error, if you look at the error it will say that the Hardware is not to par with the requirements, you can ignore this and proceed with the install it works fine.

There are so many other things I could talk about but right now this is what comes to mind.

The overall feel of all the parts VSTS, TFS, the Team Explorer is that the quality bar as gone way up! Release is near....

Is it perfect, absolutely not, can it be improved on hell yes! But are we close to having an affordable Team Development environment I say fo sure!

Next Post, A few gotchas when installing single server TFS with domain controller.

Cheers,

ET

Multiple input for Unit Test Case

I was just reading Marc Lehmann post on Code Coverage and I agree with him that a single pass through your code will give you 100% coverage but it doesn't mean you extensively tested the boundaries of your code.

So with this in mind, I'll show you how to setup a link to a database where you can use a table to feed your unit test with all the test cases you need to fully test you code.  The unit testing framework of Team System lets you connect to a table and run the same test once for each row in the table.

First you need to connect you unit test to a database table, from the unit test view click on the test you want to connect and look in the property window.

Go to the Data Connection String property and click the … this will show the database connect box

Connect to your test data database this will add the following lines of code to your test (in VB.Net)

    <DataSource("System.Data.SqlClient", "Data Source=.;Initial Catalog=TestData;Integrated Security=True", "AddTestData", DataAccessMethod.Sequential)> <TestMethod() >  _
    Public Sub AddTest()

You now have a connection to the datatable.

Next you need to wire the data coming from that table to your unit test case here's how to do that (I'm showing a unit test method that tests the Add method in my class, obviously the Add method adds two integer and return the value).

        Dim target As MyClassLib.MyClassLib = New MyClassLib.MyClassLib

        Dim a As Integer = CType(TestContext.DataRow("a"), Integer)

        Dim b As Integer = CType(TestContext.DataRow("b"), Integer)

        Dim expected As Integer = CType(TestContext.DataRow("res"), Integer)

        Dim actual As Integer

        actual = target.Add(a, b)

        Assert.AreEqual(expected, actual, "MyClassLib.MyClassLib.Add did not return the expected value.")
    End Sub

So the most import piece of information here is the TestContext piece. The test harness create a property at the top of the test class here is a copy of it.

    Private testContextInstance As TestContext

    '''


    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''

    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property

This TestContext hold a lot of properties but the one that interests us is the DataRow one, when we are connected to a datatable the DataRow property holds the current row.  The test harness will run the test for as many rows as there is in the table.  There are two type of data access method we can use, Sequential (all the row in the table in sequential order), and Random (All the row but picked randomly until they are all covered).

When you run the test, the test will pass of fail based on *all* the rows in the table so if one fails the test fails if they all pass then the test pass. Here is a result view of my little test with the following data in "TestData" table

a b res
3 3 6
4 5 9
3 5 8

We should have success and the result is here

So there you have it.   Run multiple input through your test so the code coverage will have more meaning.

Happy multipe input testing,

ET

VSTS B3 is done and will be available shorty on MSDN

Well this is not really a scoop since it's been blogged about a lot in the last 24 hours by Sam Gentile here Jeff Beehler here and Eric Lee here... but since it's my first post on Geekswithblogs I wanted to let everyone know what my interests where.

I love development in .NET. The platform is so empowering its incredible the things you can do with it.  .NET 2.0 will be even better and cooler.

I have the privilege to be able to work with the Team System product group as part of my daily job, and I regularly give them feedback on the direction and usage of Team Foundation Server in the enterprise. I will try to give my view and opinions here when I can.  Tips and tricks on usage of Team Suite and the various SKUs of Team System on the client side.

I think we are entering a new era of possibilities with the eminent release of Visual Studio 2005 and I can't wait....

Stay basic! Stay sharp! (Well VB and C# anyway) and enjoy the ride.

ET

...It's all good!...