Forum Discussion

d98rolb's avatar
d98rolb
New Contributor
14 years ago

Scheduled execution of Testcomplete fails.

Hi!

With TestComplete 8 we have a script that is scheduled to start 06:00 every morning by this line:



"C:\Program Files\Automated QA\TestComplete 8\Bin\TestComplete.exe" "C:\Attracs\TestComplete\Attracs\AttracsTEST\AttracsTESTProject.mds" /r /e /SilentMode



The problem is that often this fails. The log remark says:

An error occurred while calling the "Keys" method or property of the "TcxCustomInnerTextEdit" object.

The object or one of its parent objects does not exist.



If I connect to the computer with Remote Desktop and manually run the script it works fine.

There is no screensaver active and the power scheme is set to never sleep.



Any solution ?



Regards

Roland Bengtsson

Attracs Team

  • Hi Roland,





    The cause of this issue is that the Windows session in which a scheduled test is executed does not have GUI and, therefore, TestComplete cannot access GUI objects. You can find more information on this problem along with possible ways to avoid it in the Running Tests on Locked Computers help topic.
  • d98rolb's avatar
    d98rolb
    New Contributor
    Thanks for the answer.



    The page you referring to have 3 solutions.



    1. Remote Desktop.

    We use that to run manually start tests with TestComplete. But the doc says:

    While running tests that interact with GUI, the Remote Desktop window
    must be visible on the screen. If you minimize the Remote Desktop window
    or disconnect from the Remote Desktop Connection session, the GUI tests
    will fail.




    So this cannot be used 06:00 every morning for the scheduled task.



    2.  Virtual Machine. You can use Virtual Machine software, VMware server, VMware ESX or Microsoft Virtual server 2005:



    • Install TestComplete and your application to a virtual machine. Also,
      copy all files that your application and TestComplete project may
      require for running and testing.




    • Lock the virtual machine’s host computer.




    • Log onto the virtual machine from any other computer.




    • Start executing tests.




    TestComplete will run tests on the virtual machine despite the host being locked.


    We use VMWare Workstation and Microsoft HyperV . I assume this works with those.

    So if the Virtual machines window is open all the time and started by a scheduled task this can work automatically ?



    3. Network Suite.

    This require 2 licenses and we only have one.



    So it seems that we must running th test on a virtual machine if I understand the docs correct ?



    Regards Roland Bengtsson

    Team Attracs
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Roland,



    > So this cannot be used 06:00 every morning for the scheduled task.

    It can be used if you have Remote Desktop window open on your workstation and your workstation is not locked.



    > So if the Virtual machines window is open all the time and started by a scheduled task this can work automatically ?

    Yes, it should, but consider the TestComplete license type that you have - TestComplete with Named User license cannot be installed on virtual machine. Installation on virtual machine(s) requires Floating license.

  • Hi Roland,





    I would like to add that if you have an Enterprise edition of TestComplete, you also own a TestExecute license that can be used to run tests. In this case, you can install TestExecute to another computer and run tests on it using the Network Suite feature as in point 3.





    Also, TestExecute license is always shipped as a Floating User license. This means that you can install the license on your PC and use it on any computers that have access to your PC, including virtual computers.