问题
I'm using TFS 2010 SP1 Lab Management and a variation on the LapDeployTemplate to execute build workflows and unit tests on a Hyper-V VM, managed via SCVMM (per the ALM Rangers Lab Management Guidance doco on codeplex). After configuring all of this, I've created a Test Plan containing test cases that map to automated unit/integration tests that use Moles. I've used tcm.exe import these test cases and get them into the Microsoft Test Manager.
I'm getting the following error when I try to execute test cases remotely on my VM using the LabDeploy workflow: "The host type 'Moles' cannot be loaded for the following reason: The key 'Moles' cannot be found."
Normally, I've seen this error on machines where Moles isn't installed, but here's my configuration on the VM currently:
- Windows 2008 Server R2
- Moles 0.94.51023.0 x64
- VS2010 Test Agent\Controller x64
- VS2010 Build Agent x64
- VS2010 Lab Agent x64
Test Settings file is set to use the Default Host type and to have tests execute in x64 on an x64 machine. This is identical to the development boxes we use and they all execute tests fine.
I've already tried an uninstall/reinstall of Moles as well as the test agent on the machine to no avail. Any ideas? Has anyone else ran into this?
回答1:
Moving my comment to an answer so that I can mark it as answered - I've opened the Moles MSI in ORCA and it turns out that it has Registry conditions that prevent the Moles host agent from installing on a box without a full VS 2010 devenv install. Thus, I had to spoof that registry key to get Moles to install all bits. Once this was done, I got the agent to execute, but fails with errors dealing with environment config, etc. After looking through all of this and the lack of doco online for this scenario, I'm fairly certain it's not been tested nor is supported. I think that the Lab Agent for 2010 + Moles only configuration just doesn't work
来源:https://stackoverflow.com/questions/7210328/microsoft-moles-hosttype-errors-in-tfs-2010-lab-management-environment