Forum Discussion
I installed TestExecute on another server machine. I scheduled the script to run. The script runs fine but at the end it displays this pop up as shown in the attatched which prevents it from exiting Test Execute without my intervention and close the popup.
This leads to the situation that when it tries to run after an hour or next time, it says again Cannot open another instance of Test Execute. This will be an issue when i want to trigger this script automatically every hour. I cannot manually go and close the pop everytime.
Please suggest how I can avoid this pop up to show which asks for me to save any changes to the project suite.
- baxatob9 years agoCommunity Hero
Yes, scheduled tests will work on locked machine. There is some specific procedure if you are working remotely: https://support.smartbear.com/viewarticle/74665/ You should use a tscon utility to disconnect from remote desktop.
Common steps:
1. Setup test items of your project
2. Exit from TestComplete / TestExecute
3. Setup schedule
4. Close remote session using tscon
- baxatob9 years agoCommunity Hero
Hi William,
We can work with minimized session window, but it requires some changes in registry of the computer from where you launch the remote session: https://support.smartbear.com/viewarticle/72139/
Yury
- AlexKaras9 years agoCommunity Hero
Hi,
No, this is not possible.
This is not a limitation of TestComplete but generic behavior of Windows OS. When the given user is not logged on, the system does not allocate him a desktop. And because the desktop does not exist, application has no place to display its GUI on and thus testing tool cannot access and control this GUI. Just because the GUI is absent. The very same behavior will be observed for any other testing tool (Selenium, Ranorex, CodedUI, etc.) running on behalf of the account that is not logged-on interactively.
Suggested tscon utility will switch your remote session to the local server's console (even if the console is physically absent) and, if the physically absent console is turned off and the server is not publicly physically accessible, I see no problem of been constantly logged-in.
- baxatob9 years agoCommunity Hero
No, disconnecting this way doesn't mean "log off".
Quite the opposite, it helps you to keep your remote computer in unlocked state. That means your remote pc will not lose its graphical interface, and your tests will run using GUI.Hope you have found this link: https://support.smartbear.com/viewarticle/72794/
- sriguda9 years agoFrequent Contributor
I don't have the setting you showed for the "Action after the run" in the screen shot in your response. I installed TestExecute on the server and scheduled on that machine itself and runnning the script on schedular.
If this is not correct please suggest where do i set up this After the Run config or How?
- tristaanogre9 years agoEsteemed ContributorAfter the Run is part of distributed testing. Since it doesn't appear that you are using that, then I don't think that it applies to your situation.
- sriguda9 years agoFrequent Contributor
I scheduled a windows task with command line as below for Test Execute.
Program/Script:
"C:\Program Files (x86)\SmartBear\TestExecute 10\Bin\TestExecute.exe"
Add arguments section: "\\file02\Development\Test Complete\ProductionScripts\Prod_Tracking.pjs" /r /p:ezDispense_ProdTrack /e /SilentMode
This project has two test Items. It runs first one successfully but failing to run second test item.
When I run this project on TestComplete mnaully without schedular, it runs two items successfully.
Do I have to mention each keyward test Item in the command line?
Please see the screen shots of my project test items, folder etc.
- sriguda9 years agoFrequent Contributor
Does the scripts run fine with the automatic scheduling when my system is locked?
I am logged on but the desktop will be locked when I am away or in the night times from which I am accessing the server remotely on which the TestExecute runs. The script needs to be run every hour.
So I am remotely logged on to the server on which the testexecute script runs from my desktop. I am minimizing the remoke server desktop and working on my desktop while the script is scheduled to run on the server that is remotely connected.
But looks like when i am not on server even though it is logged on , the script is not executing good. it fails. But when i am on server desktop and the schedule triggers , it runs fine.
Please suggest.
- sriguda9 years agoFrequent Contributor
ok, ThankYou. I will look into it and get back.
- william_roe9 years agoSuper Contributor
Short of tscon (which I haven't used) I don't believe you can minimize the remote session window on your desktop. This closes the user session the remote server. I leave my workstation running a remote session every evening but don't minimize the window. Other local windows can overlap the remote window but it can't be minimized or closed.
- sriguda9 years agoFrequent Contributor
Hi, I am running my scripts on TestExecute on a server that I am connecting remotely from my desktop on. I scheduled to run these scripts every hour using windows schedular on the remotely connected server.
The scripts are being triggered by schedular and are excuting fine on Test execute. The only Issue I am facing now is sometimes I am being logged off from the server during night times and all my tests fail during that time.
So I would like to know if there is a way to run the tests on this remote server automatically using the schedular on that machine as it does now but being logged off.
I saw in the previous message, disconnect the remote session using tscon.
What is this tscon and how do I use it or anyother sugessions to run scripts on remote machine being logged off or disconnected using schedular.
- baxatob9 years agoCommunity Hero
"
You can automate the disconnection procedure using a batch file. On the remote computer, do the following:
Create a batch file with this code:
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do ( %windir%\System32\tscon.exe %%s /dest:console )Create a desktop shortcut to this file. To do this, right-click the batch file and select Send to | Desktop (create shortcut).
In the shortcut properties, click Advanced and select Run as administrator.
Now, when you need to disconnect from Remote Desktop, double-click this shortcut on the remote computer (in the Remote Desktop window).
You can also call this batch file at the beginning of your tests (provided that the tests are run as an Administrator).
" --->>>
- sriguda9 years agoFrequent Contributor
Hi, So when I disconnect from the server this way meaning logged off, will my tests run fine automatically with schedular? Just want to confirm.
- sriguda9 years agoFrequent Contributor
ok, I am trying this now.
But is there a way to logoff from the remote server and continue running the scripts on that server with the schedular? I don't want to be logged on to that remote machine all the time. It would be nice to run the scripts on that remote one being logged off and I will monitor the emails I get from the script run for any failure I have implemented.
PLease suggest.
- sriguda9 years agoFrequent Contributor
I disconnected from the remote server with Tscon using that batch file suggested in the previous post.
The tests ran fine when i was working on my local machine and is not locked.
Once I locked my local machine than the tests failed to run on a disconnected remote server.
So the tests will fail to run on disconnected remote server if my local machine is locked?
Please suggest.
- AlexKaras9 years agoCommunity Hero
Hi,
This sounds pretty strange... Didn't you miss some detail?
When you open a remote desktop (RDP) session and execute in this remote session suggested tscon command, your remote session should close with the message like "Your remote session was disconnected...". After this point, your and remote computers are not connected in any way and you can do whatever you want on your local computer (lock it, logout, turn it off...).
- sriguda9 years agoFrequent Contributor
Hi Alex, I tried once and all my tests were faling when my local machine was locked.
But will try again and let you know.
- sriguda9 years agoFrequent Contributor
I am running a script every hour on a server machine which is connected remotely from my local machine.
But this server is logged off occationally and the schedular still triggers to run which is causing false failures of scripts and alerts.
On Schedular, I have selected the option, Run only when user is logged on as shown in the screen shot in the attatchment.
So I am not sure why the schedular is triggered to run when it logs me off from the server.