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 251753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:37:16+00:00 2026-05-11T21:37:16+00:00

Is there a way I can show the progress of a single TestMethod In

  • 0

Is there a way I can show the progress of a single TestMethod In Visual Studio 2008 ?

Within a set of unit tests, I have a single TestMethod that runs for a very, very long time – normally it will take between 30 and 60 minutes. I’ve set the Timeout using the [Timeout] attribute, no problem there. But I’d like to be able to get a visual indication of progress of the test.

I know the Test Results window gives a visual progress update of all the test methods. What I want is a visual progress update of a single method. In a WinForms app I would popup a ProgressBar control. In a console app, I would position the cursor and display a status message. But this is a unit test. I can write to the TestContext, but that window is not viewable until the test completes.


EDIT: I know there is a way to do it; it’s all just software, so there is always a way. But what is a simple, practical way?

One way to do it is to create a TestMethodProgressMonitor.exe app, which reads from a named pipe, and updates a progress bar based on the messages that come through the pipe. The TestMethod can shellExec the TestMethodProgressMonitor.exe, then write to the named pipe. When finished, maybe there is a well-known shutdown command that the TestMethod sends to the TestMethodProgressMonitor.exe app.

Another option is to construct the TestMethodProgressMonitor.exe as a COM server, and the TestMethod can use COM (DCOM) to update a hosted progress bar within the app.

Another option is to use the user32.dll SendMessage() method to send a WM_COPYDATA message to the monitor app. This is sometimes done for remote control of apps.

Those are some of the possibilities. Before I set about building one of them, I’d like to know if there is a simpler way.

  • 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-05-11T21:37:16+00:00Added an answer on May 11, 2026 at 9:37 pm

    I just start a GUI thread with a Window that has the progressbar.

    Here’s a snippet to get you started. It simply pops up MyProgressWindow in another thread (rather than another process).

    [ClassInitialize()]
    static public void MyClassInitialize(TestContext testContext)
    {
        start_app_in_gui_thread();
    }
    
    static Thread t;
    
    private static void start_app_in_gui_thread()
    {
        t = new Thread(() => {
            var w = new MyProgressWindow();
            var app = new App();
            app.ShutdownMode = ShutdownMode.OnMainWindowClose;
            app.Run(w);
        });
        t.SetApartmentState(ApartmentState.STA);
        t.Start();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 241k
  • Answers 241k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer [\s] matches either a \ or an s. Try using… May 13, 2026 at 7:23 am
  • Editorial Team
    Editorial Team added an answer Table cell highlight $(function(){ function clearTable(){ $('td.selected', table).removeClass('selected'); } var… May 13, 2026 at 7:23 am
  • Editorial Team
    Editorial Team added an answer I think this might be what you are looking for… May 13, 2026 at 7:23 am

Related Questions

I've created a copy utility in c# (.NET 2.0 Framework) that copies files, directories
Is there a way to get the Content-Type of the response or conversely set
I have a wxPython application ( http://www.OpenSTV.org ) that counts ballots using methods that
Hey guys. I have a method that gets called each second which I want

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.