Forum Discussion

cesaralbusac's avatar
cesaralbusac
Occasional Contributor
11 months ago

Test failing due to overlapped window

Hello, 

I have a test that works fine by running from TestComplete, but it's failing when running through the command line. This is the error output I get from the console:

Any ideas how to solve the issue? 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Are you running your project on a different environment, such as a VM?

    SessionCreator is a utility tool to allow you to run automated tests remotely via continuous integration systems or nightly by the Task Scheduler.

  • cesaralbusac's avatar
    cesaralbusac
    Occasional Contributor

    I need to run the test from the VM. I trigger it from a pipeline. 

    For testing purposes, I logged into the VM, and then I ran the tests opening TestComplete software in the VM, worked. From the same virtual machine powershell window, it failed. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I have a PowerShell script file on the VM with the following command,

    & 'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\SessionCreator.exe' RunTest /UserName:Tester1 /password:'Tester1' /UseActiveSession /ScreenResolution:"1920*1080" /ProjectPath:"C:\Sandbox\TestComplete\ALS\ALS.pjs"

    which can be triggered by Task Schedule. For this command to work, an active sessions must exist - see Disconnecting From Remote Desktop While Running Automated Tests

    If I am connected to the VM, I run the following PowerShell script,

    Start-Process 'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe' -ArgumentList """C:\Sandbox\TestComplete\ALS\ALS.pjs"" /run /exit /DoNotShowLog
    • cesaralbusac's avatar
      cesaralbusac
      Occasional Contributor

      From my pipeline, I have this command to run in a Windows 10 Pro VM where the runner is installed:

      .\SessionCreator.exe RunTest /UserName:myuser  /password:mypassword /UseActiveSession /ScreenResolution:"1920*1080" /ProjectPath:"C:\PathToMyProject\MyProject.pjs"

      Before I run the UI Test stage, I log into the VM to see if it performs the test, and I can see it runs properly. But the results are seen as a failure, and these are the logs printed:

      The TestComplete process has exited with the following code: 2.
      
      29 There was an attempt to perform an action at point (35, 5) which is transparent or out of the window bounds.
      
      30 The test run has stopped because your test project is configured to stop on errors.
      
      31 TypeError: Cannot read property 'split' of undefined
      
      32 The test run has stopped because your test project is configured to stop on errors.
      
      33 The window is overlapped by the 'TestComplete - C:<SPAN class="token function selector"><SPAN class="token function selector">\PathToMyProject</SPAN></SPAN><SPAN class="token function selector"><SPAN class="token function selector">\MyProject</SPAN></SPAN>.pjs' window.
      
      34 There was an attempt to perform an action at point (1235, 809), which is overlapped by TestComplete's window.
      
      35 The test run has stopped because your test project is configured to stop on errors.
      
      36 The project suite execution has been stopped.


      No idea what I could do.

      I've also tried what you said about disconnecting from the Remote Desktop. Same result as before. 

      I started the runner from the cmd, with "gitlab-runner.exe run" to allow to start my application first.  


      • rraghvani's avatar
        rraghvani
        Champion Level 3

        On the VM, if you use TestExecute.exe command with the appropriate parameters, does it run without failing?

        If yes, then if you log into the VM as user 'pevolve', then you need to use the same username in SessionCreator too.

        When you first log onto the VM, are there any dialogs that appear which requires user interactions? As this may be obscuring TC from running.

        If you're using a separate command to launch your application, the automation needs to wait for this to be loaded first.