Coded UI Tests: Executing a test case while desktop is not active.

One of the biggest time consuming and productivity killer task for automation engineers is the time when they are executing their scripts. Not only scripts take long time to run but also while they are running, we cannot do any thing else. This is a desire of every automation engineer that he could do some other work (like developing other test cases) while the previous test case executes.

Same case happens with me and I found a solution for that. Since coded UI tests require an active desktop screen to execute it, there are three ways to achieve this.

1. Either you install visual studio on your development machine and install Test Agent on any other machine where you want to execute tests. When you will execute a test case on your development machine, it will be executed on the test machine PC and development machine will remain free for doing other tasks.  (This approach requires another PC. That means it is an expensive approach)

2. You can set up a VM machine of Windows 7 (or any other) on your development machine. On the VM machine install Test Agent. When you will execute a test case on your development machine, it will be executed on the VM machine and development machine will remain free for doing other tasks. (This approach is less expensive)

3. You can set up a VM machine of Windows 7 (or any other) on your development machine. On the VM machine install Visual Studio 2010 and get the latest version of your source code there with the help of TFS. In this approach you will have two benefits.

  1. You will be able to execute test cases right from VM machine
  2. You will be able to develop or modify test cases in the VM machine.

In approach number 3, you can run the test cases from visual studio inside VM machine and minimize that window. The code will be executed while this VM window is minimized. You will be free to do other tasks as well. I personally follow approach number 3. It allows me to change my code in both environments and by using TFS I am also able to check in / check out my code at both locations and code remains always updated.

What approach do you follow? and what are the benefits. I will love to hear it out.

Cheers.

 

About these ads

Tagged: , , , ,

6 thoughts on “Coded UI Tests: Executing a test case while desktop is not active.

  1. Vinod October 16, 2013 at 4:17 am Reply

    Hey Guys,
    Recently joined this group, below is the setting required for running autaomted tests in minimized mode/remote or UI less mode:-

    Registry Setting:-

    · Log in to the computer from which you connect to remote computers (if you are not logged in yet).
    · Close all open Remote Desktop sessions.
    · Click Start and select Run. In the Run dialog box, type regedit and press ENTER. The Registry Editor starts.
    · Navigate to one of the following Registry keys, depending on whether you wish to modify the Remote Desktop settings only
    for the current user or for all users on the computer:
    · HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client
    · HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client
    · Create a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2.
    · Close the Registry Editor.

    Let me know how this works :-)

  2. Selvantharjah Roshanth December 4, 2013 at 8:43 am Reply

    thanks Vinod this work well…

  3. Selvantharjah Roshanth December 4, 2013 at 8:50 am Reply

    Do u know any way to run the Coded UI test at the background in my local PC ?

  4. Coded UI Tests: Tutorials | Binary Clips January 27, 2014 at 2:33 pm Reply

    […] Coded UI Tests: Executing a test case while desktop is not active. (binaryclips.wordpress.com) […]

  5. Pritesh February 6, 2014 at 1:56 pm Reply

    Hi Vinod,

    This works in minimize mode only.

    I want to execute the test cases on Agent in lock mode , is it Possisble ?

    Thanks.

    Pritesh

  6. naveen February 14, 2014 at 1:32 pm Reply

    Thanks vinod, its working well..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Believe !!! There are 101 ways to Automate

Come let us explore together...

selenium online training with expert

Any One can Learn Selenium, It's simple, It's robust

Automation Planet

Automate your best experience

The Software Testing Guide

Software Testing Guide, Links, Resources etc.

DOC SERVE

DocServe is a community for IT & Software professionals to find and share professional documents. Find free functional documents and free professional documents.

Dan Ashby

Blethering about Software Testing

Sharing ideas, Sharing experiences

Jaagrugta Failao - By Sunil Singhal

TechCrunch

Startup and Technology News

Ryan Burnham's Blog

Just another WordPress.com site

Binary Clips

Experiences, Products, Thoughts...all about technology

Emerging .NET Devs

A Registered User Group under INETA

DreamXtream's Blog

Its all about life, a geek's life.

Ahmed Nasr's Blog

Talk about ALM, TFS and AGILE

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: