Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8106387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:26:58+00:00 2026-06-06T00:26:58+00:00

When using Coded UI tests in Visual Studio 2010, is there an easy way

  • 0

When using “Coded UI tests” in Visual Studio 2010, is there an easy way to start the application under test (AUT) only if the AUT is not already running?

I know that I can implement such a piece of startup code from scratch, but I wonder whether the Visual Studio test framework offers something out of the box.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:27:00+00:00Added an answer on June 6, 2026 at 12:27 am

    It seems as if this can be done using this code:

    [TestInitialize]
    public void MyTestInitialize()
    {
        if (_application != null)
        {
            return;
        }
        Process[] processes = Process.GetProcessesByName("ApplicationUnderTest");
        if (processes.Length > 0)
        {
            _application = ApplicationUnderTest.FromProcess(processes[0]);
        }
        else
        {
            _application = ApplicationUnderTest.Launch(@"C:\Path\To\ApplicationUnderTest.exe");
        }
    }
    

    The AUT is launched only if it is not already running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to integrate Visual Studio 2010 Coded UI Test with Specflow?
I'm using Visual Studio 2010 Ultimate SP1. I have around 225 unit tests in
I'm using Visual Studio 2010 and created a bunch of unit tests. Here is
I'm using Visual Studio 2010 SP1. When I run All Tests in Solution, I
I have Visual Studio 2010 Ultimate and C# and am doing unit tests and
Consider the following code (written with Visual Studio 2010 and .NET 4.0) using System;
Hi I'm using visual studio 2010.. And I added the add in for Qt
Using Visual Studio 2010 C++ with googletest. I'm new to unit testing and I've
Using VB.NET in Visual Studio 2010, I have two files: test2.aspx and test2.aspx.vb. The
I'm using the client-side reporting capabilities that are bundled in with Visual Studio 2010.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.