cancel
Showing results for 
Search instead for 
Did you mean: 

TestExecute, running without being logged in

SOLVED
New Contributor

TestExecute, running without being logged in

I'm aware of this page. https://support.smartbear.com/testcomplete/docs/testing-with/running/on-locked-computers.html

However, as a part of a team discussion, I'd like to seek confirmation about whether it is possible to run TestExecute with a scheduled task without the computer being logged in at all. I'm pretty sure it still requires a login at some point just like the above method, but a confirmation would be nice. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: TestExecute, running without being logged in

Hi,

 

> whether it is possible to run TestExecute with a scheduled task without the computer being logged in at all.

Yes, TestExecute (and TestComplete) can be started by the scheduled task and perform actions that do not require UI interactions. For example: access to file shares, sending/receiving http requests, working with COM objects, etc.

Interaction with UI is not possible for this scenario. The reason is not in TestExecute/TestComplete, but in the fact that operating system does not provide user session with desktop to the tasks started unattended and thus GUI applications just has no place where display their user interface. And, subsequently, TestExecute/TestComplete cannot access user interface that does not exist.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
6 REPLIES 6
Frequent Contributor

Re: TestExecute, running without being logged in

we managed this with jenkins and there we do not need a user to be logged in when starting the TestExecute Test, only the machine must be reachable from jenkins.

 

https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/requirements-and-li...

 

Here are some requirements that are needed so it can actually run without logging in - perhaps some of those settings might also help when running TestExecute in a scheduled task

Community Hero

Re: TestExecute, running without being logged in

Hi,

 

> whether it is possible to run TestExecute with a scheduled task without the computer being logged in at all.

Yes, TestExecute (and TestComplete) can be started by the scheduled task and perform actions that do not require UI interactions. For example: access to file shares, sending/receiving http requests, working with COM objects, etc.

Interaction with UI is not possible for this scenario. The reason is not in TestExecute/TestComplete, but in the fact that operating system does not provide user session with desktop to the tasks started unattended and thus GUI applications just has no place where display their user interface. And, subsequently, TestExecute/TestComplete cannot access user interface that does not exist.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: TestExecute, running without being logged in

Sounds like what I expected.
Good to know that it can be used for some non GUI tasks when not logged in but our main purpose involves a web site and interacting with the gui.

Highlighted
Community Hero

Re: TestExecute, running without being logged in

Hi,

 

> a web site and interacting with the gui.

This means that the following must be met:

-- User logged-in interactively;

-- Active not locked user session;

-- Jenkins agent started not as a service (because service cannot interact with UI) but as an application from within this given user session (Jenkins agent has such option);

-- TestComplete/TestExecute (and browser, depending on your test design) must be started by Jenkins agent to inherit its access to user session and its GUI.

 

P.S. For the note: the above design is not something specific to TestComplete/TestExecute but the fundamental requirement of Windows OS.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: TestExecute, running without being logged in

Are you sure AlexKaras?

 

We test our jenkins run with logged out user (fully UI tests).

 

Watching on the monitor from the machine where our jenkins tests run you see a logged out user for the whole process. It starts a subprocess in the background and rund the UI tests there (not sure about the logic behind it and how its done).

 

But we do not need a user to be logged in, nor do you visually see a test run.

 

Support helped me to set up the jenkins to run with a non active user session

Community Hero

Re: TestExecute, running without being logged in

@Lagencie :

> We test our jenkins run with logged out user (fully UI tests).

In case of Selenium, headless web driver may be used. Interactive UI (might) not be required in this case.

Also, because Selenium does not interact with the UI like the human user does but emulates this via API calls, it is possible to lock the desktop while Selenium tests are running. But active unlocked session is still required to start browser.

 

In case of TestComplete:

Can you describe your setup with more implementation details?

It is quite possible, that UI for your user is switched to console. In this case the user will be displayed as disconnected in the remote desktop software.

I also saw somewhere in time that technically it is possible to assign (or keep on disconnect/logoff) a video buffer to the user session. So it will have all functionality of the interactively logged-in user, but without actual desktop. But I really doubt that you have such tricky setup.

 

BTW, aren't you running your TC tests on the server with the terminal services enabled?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors