Tests Failing in RDP session

8 posts, 0 answers
  1. Zachary
    Zachary avatar
    21 posts
    Member since:
    Dec 2010

    Posted 02 Aug 2011 Link to this post

    Hi,

    I am using the QA edition of test studio - our environment is highly virtualized, so I am running TestStudio on a Windows 7 VM that I access via RDP.

    I've noticed a very frustrating issue, and I'm hoping you can provide some insight. I have a login test that enters a username, password, changes a dropdown option, then clicks a button to login. This test works just fine when I observe it in the RDP session. However, if I shrink the RDP window, or close the RDP window (without logging out), the username and password are not entered, but the dropdown option is changed and the login button was clicked. It appears that the mouse clicks work, but the text entry does not work unless I am viewing the RDP session.

    Ideally we would like to schedule these tests to run on this machine at various times, and we do not want to be required to have an RDP session open to do so. I figured this was possible as long as you don't log out of the account you're running it under, but now i'm not so sure. It also appears that the screen capture at failure does not properly work if I am not viewing the test run in the RDP session. Please let me know any insight you have.

    Thanks,
    Zach
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 02 Aug 2011 Link to this post

    Hello Zachary,

    I suspect the text entry steps are set to simulate actual key presses, and are not injecting an event directly against the element as the mouse clicks are. Please see this KB article for more information. Although it is written for locked machines, it is also applicable to minimized or closed RDP sessions.

    Best wishes,
    Anthony
    the Telerik team
    Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  3. Zachary
    Zachary avatar
    21 posts
    Member since:
    Dec 2010

    Posted 02 Aug 2011 Link to this post

    Hi Anthony,

    Thanks for the response. That makes sense - although we are not using Silverlight or WPF. Is there a setting i can change/action i can take to inject the text directly instead of logging the keystrokes?

    Thanks,
    Zach
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 02 Aug 2011 Link to this post

    Hi Zachary,

    Text input is recorded this way by default. There is a SimulateRealTyping property for "Set text" steps and a SimulateRealClick property for "Click" steps. These are False by default, unless you changed your Project Settings > Recording Options.

    Greetings,
    Anthony
    the Telerik team
    Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  5. Jason
    Jason avatar
    2 posts
    Member since:
    Jul 2011

    Posted 09 Aug 2011 Link to this post

    We are having a similar problem with testing and RDP sessions.  When I am logged in and have the RDP session either full screen and in focus or not-full screen without focus, the test executes successfully.  When I minimize or exit the RDP session (user remains logged in, merely closing the session), then the text entry for the text box fails.  We are utilizing 'Desktop command: LeftClick' to select the text box prior to entry, and 'RadInput' to enter the text.  Are these the commands you were referencing above?  In the properties for the steps that perform text box selection and entry, I don't see the SimulateReal properties you mention, so I am wondering if I am using the wrong actions.  I have tried to see what other options are available, but I haven't been able to record or find anything different.  Any assistance would be greatly appreciate, thanks.
  6. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 09 Aug 2011 Link to this post

    Hello Jason,

    The "Desktop command: LeftClick" step emulates a real mouse click as an actual user would perform. Thus it requires an unlocked and visible desktop. The RadInput step was recorded because of an enabled RadControl Translator that opens up the element to work with Test Studio.

    If you were to disable that translator from Project Settings and re-record the text input step, it will appear as a standard "Set text" step. This step will have the "SimulateRealTyping" property to toggle.

    What is likely easier, however, is to explore the VNC option as mentioned in the KB article previously linked in this thread.

    Greetings,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  7. Jason
    Jason avatar
    2 posts
    Member since:
    Jul 2011

    Posted 10 Aug 2011 Link to this post

    I removed the 'LeftClick' steps and disabled the translator so that the 'Set text' steps were recorded instead of 'RadInput'.  When I perform the 'Set text', it looks like I am no longer able to verify that content, but this probably isn't a big deal.  I see the text being set in the text boxes, but when I attempt to submit the text via a submit button the GUI, I get an error back reporting that the text boxes are empty.  So, something in our code or the interaction is failing to actually set or pull those values from the text boxes.  Since this is failing local, whereas the simulated real inputs were at least working locally, I guess I'll stop exploring this approach.

    I can give the VNC approach a try, but I am confused as to how this is any different than just exiting the remote session?  In either case, I am remotely accessing the system, and then terminating that connection but leaving the user logged in and screen unlocked.
  8. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 10 Aug 2011 Link to this post

    Hello Jason,

    I am only familiar with the differences between RDP and VNC on a basic level, but after some research on Google I have a little more information.

    Traditionally, VNC allows you to interact directly with the desktop console whereas RDP logs you into a virtual session. RDP is more integrated with Windows (it's a proprietary Microsoft protocol) which may make it less compliant with the desktop interactivity required by certain automated tests. VNC is more like a remote control that allows you to see and interact with the machine from afar. VNC is "dumb" in this respect and simply transmits keystrokes and mouse inputs blindly.

    Regards,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Back to Top