开发者

Hudson with MS Test issue: Unable to start a new process from the code when building a job through Hudson

I have an issue with Hudson calling MSTest. When I manually run the commands below on my machine, I encounter no issues. However, once I have Hudson execute these set of commands, my tests do not run correctly.

cd C:\testProj

"%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" testcontainer:testProj\bin\Debug\testProj.dll /resultsfile:result.trx

I checked the result.trx file and it seems to be failing at an area where I'm launching a process which gives me the following exception.

System.InvalidOperationException:  System.InvalidOperationException: Process must exit before requested information can be determined.. Aborting test execution.

I understand this is happening since it thinks my process hasn't finished executing but even if I try to open up windows calculat开发者_如何学JAVAor or any other application, the application doesn't run.


Can you do a "set" call to see the environment variables? Since the Hudson slave runs as the localsystem, it might not have all the environment variables set that your logged in user has. Some of my slaves I had to set up to run as a real user on the system.


I'd recomment to add a test fixture, i.e. having _ prefix so that it runs before all the tests with the following statements:

var environmentVariables = Environment.GetEnvironmentVariables();
            foreach (var key in environmentVariables.Keys)
            {
                Console.WriteLine(key.ToString() + "=" + environmentVariables[key].ToString());    
            }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜