santoguya
15 years agoContributor
Using VMWare COM API in TestComplete
In this article you discuss how to launch VMWare, load a virtual image, and power off a virtual machine using VMWare's COM API.
http://www.automatedqa.com/techpapers/testcomplete/automated-testing-in-virtual-labs/
Sub sub1
Dim vmHost, vmMachine
Set vmHost = dotNET.Vestris_VMWareLib.VMWareVirtualHost.zctor
vmHost.ConnectToVMWareWorkstation
Set vmMachine = vmHost.Open("c:\VMWare virtualmachines\vm1.vmx")
vmMachine.PowerOn(5000)
Call vmMachine.Login("tester", "password")
vmMachine.PowerOff
End Sub
I tried using this code in a test script and ran it and ran into this runtime exception:
"Object doesnt support this property or method: dotNET.Vestris_VMWareLib"
The article says "We use a .NET wrapper for VIX COM API to power on and then to power off a virtual PC" when referring to the above code. Since i have the VIX API installed, shouldn't TestComplete be able to recognize this .NET code? Or do I need to install something manually (install extensions, etc.)?
I have TestComplete 8.2, VMWare Workstation 7.1.3, and also installed VMWare VIX API 1.6.2 installed.
Thanks!
http://www.automatedqa.com/techpapers/testcomplete/automated-testing-in-virtual-labs/
Sub sub1
Dim vmHost, vmMachine
Set vmHost = dotNET.Vestris_VMWareLib.VMWareVirtualHost.zctor
vmHost.ConnectToVMWareWorkstation
Set vmMachine = vmHost.Open("c:\VMWare virtualmachines\vm1.vmx")
vmMachine.PowerOn(5000)
Call vmMachine.Login("tester", "password")
vmMachine.PowerOff
End Sub
I tried using this code in a test script and ran it and ran into this runtime exception:
"Object doesnt support this property or method: dotNET.Vestris_VMWareLib"
The article says "We use a .NET wrapper for VIX COM API to power on and then to power off a virtual PC" when referring to the above code. Since i have the VIX API installed, shouldn't TestComplete be able to recognize this .NET code? Or do I need to install something manually (install extensions, etc.)?
I have TestComplete 8.2, VMWare Workstation 7.1.3, and also installed VMWare VIX API 1.6.2 installed.
Thanks!