Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Testing Qt plugins

    General and Desktop
    3
    5
    2328
    Loading More Posts
    • 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
      mbnoimi last edited by

      Hello,

      What's best way to test Qt plugins which used for building Qt Application Plugin based?

      Usually I make my tests through the main GUI interface application but I wonder is there any way to run or test this kind of plugins from test interface instead of the main GUI interface?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        What I do is to write a test suite using QTest within the plugin project to test everything.

        If things rely on a user interaction, I usually write a little test application for the functionality

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • M
          mbnoimi last edited by

          bq. What I do is to write a test suite using QTest within the plugin project to test everything.

          I never used QTest before so I've to read about it now.

          Btw, Do you've any example or tutorial about how to use it in nutshell?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            It's really as simple as what the documentation shows.
            What I generally do is create a subfolder tests where all test resides. IIRC you can even create the test projects directly from QtCreator

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • K
              koahnig last edited by

              A good start for me was creating a test project with creator.

              Create a new project in creator. Under "Other Porjects" there is "Qt Unit Test". The creation allows you to make a couple of choices. IMHO it is quite easy to start.

              There is a "testlib overview":http://qt-project.org/doc/qt-5.0/qttestlib/qtest-overview.html and "there is QTest tutorial":http://qt-project.org/doc/qt-5.0/qttestlib/qtest-tutorial.html

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post