views:

48

answers:

1

In the VS2010 Test Settings file, I've specified a .bat file that invokes a powershell script. Running the .bat file from a command prompt works just fine and the .bat returns in less than 5 secs. However, if I try to run a test, the run eventually reports a 'not executed' result and reports an error "The setup batch file on agent machine [machinename] exceeded the execution timeout period" (which is 100s by default). I am running the test locally (no seperate controller) using VS2010 Ultimate.

Has anyone run into this?

A: 

I was able to reproduce the problem of test execution failing with exceeded timeout problem when the setup script contains call to powershell.exe. As mentioned here, the problem is that the powershell.exe does not exit until its input stream is open.

However I was able to make it working with the workaround mentioned here (The workaround is to use null stream as input for the powershell.exe.)

powershell.exe dir < NUL

Regards Aseem Bansal

Aseem Bansal