views:

982

answers:

2
+3  Q: 

Watin in TFS?

I'm trying to get my WATIN tests to work in TFS2008 (continuous integration) as part of a nightly build.

All tests work fine on my local machine (from VS2008), and my unit tests (non-watin) work great locally, as well as in TFS.

to illustrate what we're doing I've got a simple test:

    [TestMethod]
    public void Watin()
    {
        //set up stuff

        browser.GoTo("http://localhost/");
    }

When running the test in TFS, this causes the following error:

TestTypes\37e36796-fb51-4610-8d5c-e00ceaa68b9f could not be loaded because the TIP could not be instantiated for the following reason(s): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Tips.WebLoadTest.Tip, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.QualityTools.Tips.WebLoadTest.Tip, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)

When searching the net for similar problems, I'm led to believe that this is a problem with the TFS version which we're using - but I'm not sure. We're using TFS 2008 Developer Edition / VS2008 Developer Edition

We tried downloading the TFS suite trial, which contains the DLL in question. We've copied the WebLoadTest.Tip file to the global assembly cache of the TFS server (just to see if that would fix the problem). That did result in making the error go away, but unfortunately it produced a new one:

MSBUILD : warning MSB6006: "MSTest.exe" exited with code 1.

Is the only way around this problem upgrading to the Suite edition? That seems a bit rigorous.

Any help is appreciated!

edit: what I don't understand is that it seems to require the WebLoadTest functionality of TFS, even though we're not explicitly calling it. Instead we're using Watin, which is a third party framework. I don't think that Watin has any webloadtest dependencies either.

+1  A: 

Getting the right assemblies and everything else in place on the build server for doing automated builds of Team System stuff is notoriously difficult. The supported way is to install a copy of the things that you need on your build server and you are licensed to run them provided the people who have contributed that stuff to the source code have a license to the relevant team edition (for example if you are running web tests then you need to have a Test SKU license).

I don't know much about Watin, but from your error it looks like you are making use of the WebLoadTest functionality which is part of the Test SKU, therefore you would need to have a license for that.

You can install the Developer Edition and the Test Edition on the build server and it will make a Dev+Test combination if that is all you have proper licenses for. Alternatively you can install the Suite if you have a license for it.

I would hesitate about installing a trial of Team Suite if you do not have a suite license in your organization as it means that you might fix the problem and you'd be up and running, only to find out in 90-days time (when your trial expires) you need a licensed copy of the full Suite to carry on running all the tests you have been writing for the past 90 days...

Good luck,

M.

Martin Woodward
thanks!> "I would hesitate about installing a trial of Team Suite if you do not have a suite license in your organization as it means that you might fix the problem"Agreed, we were just evaluating it to see if that was the cause of the problem.
ampburner
added more info in original question.
ampburner
Question for you: How are you deploying the website prior to having the WatiN tests run?
Craig Fisher
+1  A: 

WatiN does not have any dependencies on 'Microsoft.VisualStudio.QualityTools.Tips.WebLoadTest.Tip at all..

All you should need to do is create a test project, and then add a unit test to it, the refernces to watin.core.dll, mshtml.dll and SHDocVw.dll I think that at some point you have added a VS web test to the solution and it now has a reference to those assemblies.

Try with a new empty test solution and see how that goes.

Bruce McLeod