cancel
Showing results for 
Search instead for 
Did you mean: 

The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

SOLVED
Highlighted
Occasional Contributor

The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

I have been using TestComplete and TestExecute over Jenkins with the jenkins plugin for testcomplete quite sometime. I observe a wierd issue with testcomplete when run from CI jenkins with the below conditions,
1. When I set the screen resolution similar to that of the RDP machine's resolution.
2. With not using active session checkbox
3. when I have logged off from my RDP system.
I notice when I run the tests with above conditions it by default only runs for 1280*1024, whereas my RDP system resolution is 3840*2160. Because of which all my test fails. I have sorted out this to be a wierd behavior as it is observed only when I have either disconnected from remote session or logged off. I have followed strict testcomplete documentation for running over CI for testcomplete. It tells the same stories again and again but does not provides a solution. I have tried various other ways even my using command-line over jenkins: sessioncreator.exe /RunTest /Username:"username" /password:password /ScreenResolution:"3840*2160"
But still the actual results produced is with that of system resolution 1280*1024. Why by default it sets to 1280*1024 when the RDP machine is closed?
I have posted this over community forum but I have been pointed out to different sections and I see I have been only spending much time into it and it doesn't fixes my issue. I see that this /screenresolution setting doesn't seems to make a point here, because to whatever value you set it. It by default sets it to 1280*1024 when the RDP session is either logged off or disconnected.

Note: I always want to either disconnect or loggoff the user session and I cannot keep the session always open as I am implementing a continuous integration/CD test system using testcomplete. The above scenario works fine when the RDP session  is not disconnected and the /screenresolution setting works fine. The issue is only when the RDP session is disconnected or logged off.

Also I see that there is a know issue /useactivesession hope if this gets resolved it might resolve my issue. But for now please provide me a suggestion and quick fix for my issue.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

@AlexKaras 😆 thank you! My Community Search skills are unbeatable! 

 

@ArunKarunakaran  Have you tried changing the resolution via registry as Alex proposes?- https://community.smartbear.com/t5/TestComplete-General-Discussions/Screen-Resolution/m-p/181508

 

 


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

9 REPLIES 9
Highlighted
Community Hero

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

If the community suggestions are not what you want, you can always contact Support here:

https://support.smartbear.com/message/?prod=TestComplete

Highlighted
Occasional Contributor

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

I did not solve the problem. I have written to SmartBear Customer Care about the Issue and Alexander Ivanov is looking at the issue.

Please find the mail trail details as below,

 

*****************************************************************************************************************

From: Arun Karunakaran
Sent: 21 May 2020 20:25
To: SmartBear Customer Care <customercare@smartbear.com>
Subject: RE: Case #00437001: Unable to change set the screenresolution for RDP while running from jenkins

Hi Alexander,

 

Thanks for writing!

I have provided answers to your questions below in the mail thread. And you can see them highlighted below.

 

I have configured the slave node over a virtual machine and the OS is windows 10. I have a similar setup even on Windows server 19

 

As far as Jenkins plugin is considered I have configured the setup correctly. Because I don’t see any issues while executing the Jenkins build when I am logged into the remote virtual machine window with active session on. I see all the tests running perfectly fine. I used the disconnect.bat which contains the following script to disconnect from the VM,

for /f "skip=1 tokens=3" %%s in ('C:\Windows\System32\query.exe user %USERNAME%') do (

  %windir%\System32\tscon.exe %%s /dest:console

)

 

And with active session off I ran the testcomplete execution.

I have used the jenkins plugin setup I have configured for testcomplete execution with active session off ,

 

When I do this. The tests runs but with the session screen resolution defaulted to 1280*1024. I don’t see a way to alter this though I am setting the dropdown of screen resolution to 3840*2160. This results with the comparison of actual and expected images result failures. There is a variation of the height and width of the images. Following this I did a second run with the remote machine connected during the run and I see all the images matching as expected. As of now I am automating by scheduling a task scheduler job that runs just before this Jenkins build job and keeps the VM connected so that my test passes. But I want to figure out a way from the Jenkins itself to run the tests for the said resolution of 3840*2160 even when the VM is not connected. Please note that I am not locking out the VM but I am only just disconnecting it using the bat script. Which clearly says that the tests should run for the resolution 3840*2160 but it doesn’t. I need a solution to fix this particular step alone.

Please guide me if you can see through it. Thanks!

 

Regards,

Arun K

********************************************************************************************************

From: SmartBear Customer Care <customercare@smartbear.com>
Sent: 19 May 2020 18:53
To: Arun Karunakaran 
Subject: Case #00437001: Unable to change set the screenresolution for RDP while running from jenkins

 

Hi Arun,

Thanks for reaching out.

I believe this resolution is your console session resolution. I am not sure where it is specified and whether it can be changed as my attempts to do so were not successful. I believe it scales with your DPI which, I suppose, is set to 200% for you, right?

When you already have a session open on this machine, I believe it stores the correct resolution and DPI which should be reused if you use the /useactivesession switch. On the other hand, these preconditions should not affect the process if you do not use this switch.

Anyway, when running tests though Jenkins, you are supposed to use our Jenkins integration unless you have a solid reason not to. The SessionCreator utility is needed for cases where there is no more specific solution. The Jenkins integration uses the same internal mechanism to create sessions, but it still would be more correct in this scenario. 

Please take a screenshot of your TestComplete step in your Jenkins configuration. Make sure to expand the Advanced session of this step.

Also, please enable "This project is parameterized" in your build settings and add a new Boolean parameter of TESTCOMPLETE_PLUGIN_DEBUG and set it to true. Run your build again and share the full Console output with me. ----This is condition is set but I cannot share the console output as it is restricted for me to do so.

What are the exact OS version and build on the slave machine? ---OS versions is Windows 10

Does it have a physical monitor connected to it?  ---I don’t have a physical monitor connected to the virtual machine

Is it a physical or virtual machine?  ---The machine is a virtual machine

 

Regards,
Alexander Ivanov
Customer Care Engineer


To upload large files to your case,
click here.

Ask questions, share experience, build reputation, have fun in our Community!
»  
http://community.smartbear.com
 

Please do not remove this case id: ref:_00D708FQP._5001O1lAqWL:ref

 

******************************************************************************************************************

From: Arun K
Submitted: Tue, 19 May 2020 11:22:03 +0300
Subject: Unable to change set the screenresolution for RDP while running from jenkins
 

I have been using TestComplete and TestExecute over Jenkins with the jenkins plugin for testcomplete quite sometime. I observe a wierd issue with testcomplete when run from CI jenkins with the below conditions,
1. When I set the screen resolution similar to that of the RDP machine's resolution.
2. With not using active session checkbox
3. when I have logged off from my RDP system.
I notice when I run the tests with above conditions it by default only runs for 1280*1024, whereas my RDP system resolution is 3840*2160. Because of which all my test fails. I have sorted out this to be a wierd behavior as it is observed only when I have either disconnected from remote session or logged off. I have followed strict testcomplete documentation for running over CI for testcomplete. It tells the same stories again and again but does not provides a solution. I have tried various other ways even my using command-line over jenkins: sessioncreator.exe /RunTest /Username:"username" /password:password /ScreenResolution:"3840*2160"
But still the actual results produced is with that of system resolution 1280*1024. Why by default it sets to 1280*1024 when the RDP machine is closed?
I have posted this over community forum but I have been pointed out to different sections and I see I have been only spending much time into it and it doesn't fixes my issue. I see that this /screenresolution setting doesn't seems to make a point here, because to whatever value you set it. It by default sets it to 1280*1024 when the RDP session is either logged off or disconnected.
Also I see that there is a know issue /useactivesession hope if this gets resolved it might resolve my issue. But Please provide me a suggestion and quick fix for my issue.

---------------------------------------------------------
Situational Questions:

Q: What is the type of your request?
A: Technical Inquiry

Q: When does the problem occur?
A: Command line / COM API / SDK usage

Q: What is the problem?
A: Other problem
Requested info: * Record a video demonstrating the problem and attach it to your query.
* Or, provide us with a number of screenshots fully demonstrating the problem.
* Describe the expected and the actual behavior so we understand the difference.

Q: How many of your usage scenarios cause the issue?
A: All scenarios

 

******************************************************************************************************************

Highlighted
Community Hero

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

Hi,

 

 I used the disconnect.bat which contains the following script to disconnect from the VM, [...]

> \tscon.exe %%s /dest:console

As the filename and code implies, this command does not close RDP session but switches it to default console one (exactly as Alexander wrote to you). Resolution of this session is set by Windows setup program during Windows install.

 

P.S. I seem to remember that there was a thread there that mentioned how to change default resolution via registry edit, but don't have the link at hand at the moment...

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

@ArunKarunakaran @AlexKaras  Is this the one?

- Screen Resolution

 


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Hero

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

@sonya_m :

 

> Is this the one?

Yes, it is 🙂

Sonya, you are fantastic!

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

@AlexKaras 😆 thank you! My Community Search skills are unbeatable! 

 

@ArunKarunakaran  Have you tried changing the resolution via registry as Alex proposes?- https://community.smartbear.com/t5/TestComplete-General-Discussions/Screen-Resolution/m-p/181508

 

 


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

Highlighted
Occasional Visitor

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

The tests runs but with the session screen resolution defaulted to 1280*1024. I don’t see a way to alter this though I am setting the dropdown of screen resolution to 3840*2160. This results with the comparison of actual and expected images result failures. There is a variation of the height and width of the images. Following this I did a second run with the remote machine connected during the run and I see all the images matching as expected. As of now I am automating by scheduling a task scheduler job that runs just before this Jenkins build job and keeps the VM connected so that my test passes. But I want to figure out a way from the Jenkins itself to run the tests for the said resolution of 3840*2160 even when the VM is not connected.

Highlighted
Community Hero

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

note that the resolution on disconnect is based upon the console resolution, not what you set during the RDP session.  This is something that needs to be set either directly on the console or via a registry edit.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Community Manager

Re: The sessioncreator.exe doesn't sets the screenresolution of RDP when the RDP is disconnected.

@ArunKarunakaran Any luck with solving this? I checked your support ticket and see that our team is still waiting on some actions from your side.

But, perhaps, something else helped your cause?


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors