Reporting on Windows Users and Security Rights

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Reporting on Windows Users and Security Rights

Post by stapes » Fri Jun 24, 2016 3:21 pm

I am running tests through Jenkins. I am getting a warning message telling me that the user starting the Ranorex executable and the user starting the automated application are not the same & will not necessarily have the same security rights.

It doesn't seem to be a problem right now, but it may prove to be one later.

Is there to determine who these users are (from within the test)?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Reporting on Windows Users and Security Rights

Post by krstcs » Fri Jun 24, 2016 4:30 pm

Is your Jenkins slave started as a service? If so, you need to change it to be started as a user process by a logged-in user account instead, in a batch file, for example, when the user logs in.

The service account cannot start applications at the UI level and tests will NOT work because there will be no realized UI.
Shortcuts usually aren't...

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Reporting on Windows Users and Security Rights

Post by stapes » Fri Jun 24, 2016 5:09 pm

slave.agent.jnlp is in the Startup Tab of the Task Manager.

Not sure what that means, but my test runs do generally work.

The question here is about a mere warning message.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Reporting on Windows Users and Security Rights

Post by krstcs » Fri Jun 24, 2016 5:18 pm

Jenkins slave issues are usually the first issue that people have when this sort of thing pops up, so I ask to make sure it isn't that.

Is your SUT being started by another process besides Ranorex (Jenkins maybe)?

If so, I would suggest you let Ranorex start your SUT.

If not, are you using a "runas" (or similar) command in the Ranorex command-line? If so, I would remove that and have both Ranorex and the SUT started under the same user instead of using a runas inside Ranorex.

Does your SUT require elevated permissions? If so, Ranorex will need to be run at that same permission level in order to ensure that it has access to all interface elements correctly (this is a Windows security issue, not a Ranorex issue, and it cannot be worked around).

Mainly, you just need to make sure that both Ranorex and the SUT are started with the exact same user account and account security level (regular user, super user, admin, etc.) in order so ensure that the test software can access the SUT correctly.
Shortcuts usually aren't...

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Reporting on Windows Users and Security Rights

Post by stapes » Fri Jun 24, 2016 5:27 pm

I am running my SUT here:

Code: Select all

processID=Host.Local.RunApplication(global_Program_Name, "", global_Working_Directory, false);
The Execute Windows Batch Command looks like this:
.\Test-365AgilePortal\Test-365AgilePortal\bin\debug\Test-365AgilePortal.exe /cc "[email protected]" /to "[email protected]" /title "jenkins.service" /brief "no" /addresses "no" /user "[email protected]" /email "yes" /emailaddress "yes" /mod "yes" /dob "yes"