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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:39:25+00:00 2026-05-12T11:39:25+00:00

I am attempting add some tests to an existing QT GUI application using QTest.

  • 0

I am attempting add some tests to an existing QT GUI application using QTest. The GUI uses quite a bit of complicated start-up code so I’d rather not write another main() to start it again.

To me, it seems like the easiest way would be instantiate the app and then run the tests on it. I am just not sure, however what function I could plug my test object into so that I don’t block the flow of messages.

I could send a special message to start the test or set a timer but that’s complicated and tests are supposed to simplify things.

So where would be the best place in existing GUI to insert and qexec a Qtest object?

  • 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-12T11:39:26+00:00Added an answer on May 12, 2026 at 11:39 am

    I’m willing to be proven wrong, but test frameworks in general (and QTest specifically from what I’ve used of it) tend to assume that the test framework will be driving the code to be tested, as opposed to running along side of it.

    I’m also concerned about “The GUI uses quite a bit of complicated start-up code….” Are you intending on testing the startup code? Or testing other stuff around it?

    Generally speaking, when I start looking at adding tests to an application, I try to find smaller pieces that are used in a lot of the application, and write tests for those. I then build up to testing the bigger pieces that integrate those smaller ones. My general idea is that if the small pieces work properly, then either I’ve put them together correctly and things should work, or I haven’t and things should obviously fail when I try to run the application.

    I should mention that there are other options for testing GUIs for Qt applications in particular. They tend to be more like scripts run on your program, with the output recorded. If that interests you, then you could look into Squish for Qt.

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

Sidebar

Related Questions

I am attempting to add validation to my application. I have some rules I
I am attempting to add to a src of multiple images using jQuery as
I'm attempting to do some calculations for a running total, this is my code:
I am attempting to interop to this simple scala code, but am having some
I'm attempting to add a UIImageView to the subview of a UILabel, but for
With the power of jquery... I'm attempting to add two selections together, they both
I've got this to work using a very basic example(outlined below) and I want
my application has a UIViewController subclass which is being managed by a UINavigationController. In
I am trying to compile a portable version of perl containing a CPAN module,
My custom ASP.Net RequiredFieldValidator renders markup like this... var af1_ctl00 = document.all ? document.all[af1_ctl00]

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.