Forum Discussion

adoniram's avatar
adoniram
New Contributor
15 years ago

TestComplete with vmrun

I trying to run a testcomplete inside a virtual machine, through command line, using vmrun to start the TestComplete:



vmrun -T server -h https://pat111:1111/sdk  -u adoniram -p 11111 -gu administrador -gp 111111  runProgramInGuest "[standard] Win XP adoniram/Windows XP Professional/winXPPro.vmx" "C:\Arquivos de programas\Automated QA\TestComplete 6\Bin\TestComplete.exe " "c:\teste_notepad.pjs " "/run"







The TestComplete application starts fine, but it doesn't run the test.

It just open the TestComplete with the last application tested.

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Adoniram,


    Just a guess, what if you enclose <command> into quotes?

    I.e. :

    ... runProgramInGuest "[standard] Win XP adoniram/Windows XP Professional/winXPPro.vmx" """C:\Arquivos de programas\Automated QA\TestComplete 6\Bin\TestComplete.exe " "c:\teste_notepad.pjs " "/run"""

    The exact syntax may be slightly incorrect, but the idea is to pass TestComplete.exe with its parameters as one (string) element to runProgramInGuest. 


  • adoniram's avatar
    adoniram
    New Contributor
    Hi Alexei, thanks for reply.

    I did what you say, but it give me a message "A file was not found".

  • adoniram's avatar
    adoniram
    New Contributor
    Its not a TestComplete problem.

    The vmrun only recognize the first parameter of TestComplete.

    Thanks!!!!!
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    In this case, what if you try to enclose with additional quotes only TestComplete parameters?
  • adoniram's avatar
    adoniram
    New Contributor
    I did it, but vmrun show me a "file not found" error message.



    This way works:

    vmrun -T server -h https://pat583:8333/sdk  -u xxxxx -p 1111111 -gu yyyyyyyy -gp 111  runProgramInGuest "[standard] Win XP adoniram/Windows XP Professional/winXPPro.vmx" cmd.exe /c"c:\arquiv~1\automa~1\testco~1\bin\TestComplete.exe c:\\teste_winapp.pjs /r "



    I pass TestComplete and its parameters as a cmd parameter.
  • laxtc's avatar
    laxtc
    Occasional Contributor
    Hello,



    I am trying to make this command work for some reason I am not successful. Can you pleaes let me know what I am doing wrong:



    C:\Documents and Settings\Lax>vmrun -T ws -gu username -gp  runProgramInGuest "C:\Documents and Settings\user\My Documents\My Virtual Machines\Windows XP Professional\Windows XP Professional.vmx" cmd.exe /k "C:\Progra~1\Autom~1\T

    estComp~1\Bin\TestComplete.exe C:\ProjectSuite2\ProjectSuite2.pjs /r /p:Project1 /u:Unit1 /rt:Main"



    This is not working. Can anybody tell me what I am doing wrong If I don't pass "C:\ProjectSuite2\ProjectSuite2.pjs /r /p:Project1 /u:Unit1 /rt:Main" then TC does start on the GuestBox.

  • Hi Laxmikant,





    Actually, you are facing the issue with vmrun due to the fact that your command is too long. You need to shorten the command line. To do this, you can try moving the project suite to the root folder and reducing the number of arguments.