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

Running a single test using "Run this test" may run another test with the same name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 9.0.1
    • Qt Creator 9.0.0-rc1
    • Test Integration
    • None
    • Linux/X11
    • ad072db2b (master), f0eb8501f (master)

      Hello, 

      I have a medium-sized QMake project with QTest unit tests. There has been a change in one class' business logic with a requirement to retain backwards compatibility, and the logic is chosen with a class property. To make sure the old version's logic is still tested, I copied the existing test class, renamed it and enhanced it to test for the new logic. 

      Now, obviously, some of the existing algorithms remained unchanged, and both test classes contain test cases with the same method names. Sometimes, when a single test from the new test class is executed using right click in "Tests" pane and choosing "Run This Test", a test method from the "old" test class with the same name is executed:

      This behavior is not consistent and I feel like it happens more often when QtCreator is first started.

       

      UPD: Seems like I can reproduce the issue every single time when I choose "Run test under cursor" from the class declaration:

       

        1. image-2022-11-24-12-49-47-067.png
          56 kB
          Dmitriy Purgin
        2. image-2022-11-24-13-00-11-138.png
          274 kB
          Dmitriy Purgin
        3. project.zip
          3 kB
          Dmitriy Purgin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cstenger Christian Stenger
            dpurgin Dmitriy Purgin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes