Here is the relevant output from the TFS2008 build: Task "TestToolsTask" Command: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe /nologo /runconfig:"C:\Build\ProjectName\BuildName\Sources\Trunk\SolutionFolder\BuildTestRun.testrunconfig" /searchpathroot:"C:\Build\ProjectName\BuildName\Binaries\Debug" /resultsfileroot:"C:\Build\ProjectName\BuildName\TestResults" /testcontainer:"C:\Build\ProjectName\BuildName\Binaries\Debug\\TestAssembly0.dll" /publish:"http://tfs2008server:8080/" /publishbuild:"BuildName_20080618.6" /teamproject:"ProjectName" /platform:"Any CPU" /flavor:"Debug" The "TestToolsTask" task is using "MSTest.exe" from "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe".
And the same section from the TFS2005 build: TestToolsTask RunConfigFile="C:\Build\ProjectName\BuildName\BuildType\..\Sources\trunk\SolutionFolder\BuildTestRun.testrunconfig" SearchPathRoot="C:\Build\ProjectName\BuildName\BuildType\..\Sources\..\Binaries\Debug\" PathToResultsFilesRoot="C:\Build\ProjectName\BuildName\BuildType\..\Sources\..\TestResults" PublishServer="http://tfs2005server:8080/" TeamProject="ProjectName" PublishBuild="BuildName_20080618.16" BuildFlavor="Debug" Platform="Any CPU" Both seem to set the SearchPathRoot attribute correctly to binary folder, at any rate they're the same as each other. Regards, Damian Edwards Readify | Senior Consultant M: 0448 545 868 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | C: [EMAIL PROTECTED]<sip:[EMAIL PROTECTED]> | W: www.readify.net<http://www.readify.net/> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Bartholomew Sent: Wednesday, 18 June 2008 16:05 To: [email protected] Subject: Re: [OzTFS] TFS2008 team build unit test issue with deployment items >From what I can see the TestToolsTask sets the current directory to the >SearchPathRoot parameter that is passed in by Team Build. This parameter >defaults to the property $(OutDir). If you wanted to check the value of this >property you could override the BeforeTestConfiguration target and output the >$(OutDir) variable to the log. On Wed, Jun 18, 2008 at 3:03 PM, Damian Edwards <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: In the TFS2005 environment we're using the msbuild community task that allows container assemblies, in the TFS2008 environment we're using the in-built container assembly support. Regards, Damian Edwards Readify | Senior Consultant M: 0448 545 868 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | C: [EMAIL PROTECTED] | W: www.readify.net<http://www.readify.net/> From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> [mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>] On Behalf Of William Bartholomew Sent: Wednesday, 18 June 2008 14:53 To: [email protected]<mailto:[email protected]> Subject: Re: [OzTFS] TFS2008 team build unit test issue with deployment items How are the tests being executed from Team Build? Using tests lists, test containers, or executing mstest.exe directly? Assembly.Load and relative file reads (which it looks like WSE is doing) will use the current working directory which appears to be the location of devenv.exe rather than the unit test's directory. William On Wed, Jun 18, 2008 at 2:27 PM, Damian Edwards <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Heya, We're having trouble migrating some unit tests from the existing TFS2005 build environment to the new TFS2008 environment. The tests in question all rely on reading a file from disk which is deployed using the DeploymentItemAttribute, e.g. wse3policycache.config. The errors raised are like this: Test method Centricom.POLi.TestAssembly0.DummyTests.DansDummyTest threw exception: System.FormatException: Failed parsing the policy document. ---> System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\wse3policyCache.config'.. So as you can see it is trying to read that file from the wrong folder, in this case it looks like the folder that the test host is run from. The file in question is actually deployed to the test result out folder as expected: Error! Filename not specified. Other tests use the DeploymentItemAttribute to deploy Excel files for data-driven tests and they are working fine, indicating the issue seems to be isolated to when either WSE is looking for the policy cache file, or when using Assembly.Load() to load a file from the active folder (as some other tests that are failing are doing). This all works fine on the current TFS2005 build server and when run locally in VS2008. Ideas? Regards, Damian Edwards Readify | Senior Consultant Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia M: 0448 545 868 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | C: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | W: www.readify.net<http://www.readify.net/> ________________________________ The content of this e-mail, including any attachments is a confidential communication between Readify Pty Ltd and the intended addressee and is for the sole use of that intended addressee. If you are not the intended addressee, any use, interference with, disclosure or copying of this material is unauthorized and prohibited. If you have received this e-mail in error please contact the sender immediately and then delete the message and any attachment(s). OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com<http://mailenable.com/>, supported by www.readify.net<http://www.readify.net/> OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com<http://mailenable.com/>, supported by www.readify.net<http://www.readify.net/> OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com<http://mailenable.com/>, supported by www.readify.net<http://www.readify.net/> OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net
