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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:42:23+00:00 2026-05-14T18:42:23+00:00

I have just made my first proper little desktop GUI application that basically wraps

  • 0

I have just made my first proper little desktop GUI application that basically wraps a GUI (php-gtk) interface around a SimpleTest Web Test case to make it act as a remote testing client.

Each time the local The Web Test case runs, it sends an HTTP request to another SimpleTest case (that has an XHTML interface) sitting on my server.

The application, allows me to run one local test that collates information from multiple remote tests. It just has a ‘Start Test’ button, ‘Stop Test’ button and a setting to increase/decrease the number of remote tests conducted in each HTTP Request. Each test-run takes about an hour to complete.

The trouble is, most of the time the application is making http requests. Furthermore, whenever an HTTP Request is being made, the application’s GUI is unresponsive.

I have taken to making the application wait a few seconds (iterating through the Gtk::main_iteration ) between requests in order to give the user time to re-size the window, press the Stop button, etc. But, this makes the whole test run take a lot a longer than is necessary.

<?php
require_once('simpletest/web_tester.php');

class TestRemoteTestingClient extends WebTestCase
 {

 function testRunIterations()
  {
  ...
  $this->assertTrue($this->get($nextUrl), 'getting from pointer:'. $this->_remoteMementoPointer);
  $this->assertResponse(200, "checking response for " . $nextUrl );
  $this->assertText('RemoteNodeGreen');
  $this->doGtkIterationsForMinNSeconds($secs);
  ...
  }

 public function doGtkIterationsForMinNSeconds($secs)
  {
  $this->appendStatusMessage("Waiting " . $secs);
  $start = time();
  $end = $start + $secs;

  while( (time()  < $end) )
   {
   $this->appendStatusMessage("Waiting " . ($end - time()));
   while(gtk::events_pending()) Gtk::main_iteration();
   }
  }
 }

Is there a way to keep the application responsive whilst, at the same time making an HTTP request?

I am considering splitting the application into two, where:

  • Test Controller Application – Acts as a settings-writer / report-reader and this writes to settings file and reads a report file.
  • Test Runner Application – Acts as a settings-reader / report-writer and, for each iteration reads the settings file, Runs the test, then write a report.

So to tell it to close down – I’d:

  • Press the Stop Button on the ‘Test Controller Application’,
  • which writes to the settings file,
  • which is read by the ‘Test Runner Application’
  • which stops, then
  • writes to the report file to say it stopped
  • the ‘Test Controller Application’ reads the report and updates the status
  • and so on…

However, before I go ahead and split the application in two – I am wondering if there is any other obvious way to deal with, this issue. I suspect it is probably quite common and a well-trodden path.

Also is there an easier way to send messages between two applications that sit on the same machine?

  • 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-14T18:42:23+00:00Added an answer on May 14, 2026 at 6:42 pm

    You will have to implement some threading in order to manage multiple processes simultanously. That way, your app wont get unresponsive while you execute some other tasks in the background.

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

Sidebar

Related Questions

I have a package that I just made and I have an old-mode that
I have just inherited a server application, however it seems that the only copy
I have just ported several of our home-made Outlook COM-addins from Delphi 2007 to
I have made a new windows service which works fine using barebone code (just
I've just create a new MVC project, and have made no changes at all,
I have just installed C# for the first time, and at first glance it
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have just started playing with ASP.NET MVC and have stumbled over the following situation.
I have just set up cruise control.net on our build server, and I am

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.