Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25066

Custom qml testcase doesn't appear in "Test" sub-window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 4.13.1
    • Test Integration
    • None
    • Ubuntu 20.04
    • Linux/X11

    Description

      Hello,

      I need to use custom qml classes that derive from TestCase for my unit tests. I have put them inside a module which I import at the beginning of the test file. This works well, except that the test doesn't appear in the Test sub-window of QtCreator as it should. This is fairly annoying as I use a lot this window to launch individual functions when making my unit tests.

      Plus, I have noticed that if I import the module with relative path instead of module path, the test reappears inside the test window. But this is not an option for my dev work since the custom TestCase maybe elsewhere on the disk.

      I provide a minimal example of this problem, with two test files. One uses relative path to import the module, and is visible inside the Test window. The other uses module path, and is not visible inside the Test window (see screenshot).

      Both tests pass when being executed from the command line or with Ctrl-R inside qtcreator.

       

      Is something more I should do to have the test files recognized by qtcreator, or is this a bug ?

       

      Regards.

       

       

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-25066
        # Subject Branch Project Status CR V

        Activity

          People

            cstenger Christian Stenger
            elisabeth Elisabeth Rousset
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change