Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Testing Apps
Forum Updated to NodeBB v4.3 + New Features

Testing Apps

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 643 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichaelT
    wrote on 17 Apr 2015, 14:18 last edited by MichaelT
    #1

    Probably a very basic question. I've looked around for help using QTest and pretty much the only example I can find is the test for QString which is not much help actually when trying to test a real App.

    For instance, I created a simple Qt App and QTest within a subdir project, and populated the MainWindow in the app with a label.

    I want to check that the label is there and the contents of that label should be a particular string in a test.

    I can't even create the form in the test to check the label. If I try creating the form with the default QTEST_APPLESS_MAIN macro I get a complaint that I need to instantiate an app first. If I use QTEST_MAIN, I get errors about 'undefined reference to vtable'

    I really wish there was an example testing an actual Application instead of QString. Can anyone point me to something I can use for help?

    I don't want a GUI tester like Squish. I want something I can create to use TDD patterns.

    Anyone else have problems with this?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      T3STY
      wrote on 17 Apr 2015, 16:23 last edited by
      #2

      I haven't used QTest but the error about instantiating an app might be because QLabel derives from QWidget which needs a QApplication instance to start the event loop.
      The 'undefined reference to vtable' is often related to the fact that the make files haven't been updated correctly to the code changes. You should try running qmake ([menubar] Build > Run qmake).

      1 Reply Last reply
      0

      1/2

      17 Apr 2015, 14:18

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved