Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1261

Qt Test Adapter finds wrong test functions in a GoogleTest Project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 3.3.0
    • Debug/test integration
    • None
    • Visual Studio 2022 (17.12.1)
      Qt VS Tools 3.3.0 (rev.47)
    • Windows
    • 42db9c950 (dev)

    Description

      In Visual Studio GoogleTest project the Qt Test Adapter finds wrong test functions and add them to the Test Explorer:

      Here is the Full Log from the QtTest Discovery:

      ========== Starting test discovery ==========
      Test Adapter for Google Test: Test discovery starting...
      Found 1 tests in executable D:\Spielwiese\Sample-Test2\x64\Debug\Sample-Test2.exe
      Test discovery completed, overall duration: 00:00:00.3617355
      Could not locate debug symbols for 'D:\Spielwiese\Sample-Test2\x64\Debug\Sample-Test2.exe'. To make use of '--list_content' discovery, ensure that debug symbols are available or make use of '<ForceListContent>' via a .runsettings file.
      Starting Qt tests discovery.
      Cannot find QtTest section in .runsettings file.
      QtTestSettings: [
        QtInstall: $(DefaultQtVersion)
        ShowAdapterOutput: True
        TestTimeout: -1
        DiscoveryTimeout: 2000
        ParsePdbFiles: False
        SubsystemConsoleOnly: False
        Output: [
          FilenameFormats: [
          ]
        ]
        Verbosity: [
          Level: 
          LogSignals: False
        ]
        Commands: [
          EventDelay: -1
          KeyDelay: -1
          MouseDelay: -1
          MaxWarnings: 2000
          NoCrashHandler: False
        ]
      ]
      Trying to populate Qt auto-tests from executable: 'Sample-Test2.exe'.
      Added Qt version '$(DefaultQtVersion)': 'D:/Bildverarbeitung/ConfigMgmt/Libs/ExternalLibs/Qt/6.8.0/msvc2022_64/bin' to path.
      Started process: 'Sample-Test2.exe', PID: '42556'.
      Process 'Sample-Test2.exe', PID: '42556' did exit in time. Exit code: '0'.
      Auto-test functions found. Type: 'Running', Symbol: 'main()'.
      Auto-test functions found. Type: '[==========]', Symbol: 'Running, 1'.
      Auto-test functions found. Type: '[----------]', Symbol: 'Global, 1'.
      Auto-test functions found. Type: '[', Symbol: 'RUN, '.
      Add Qt auto-test: 'Sample-Test2.exe'.
      Finished Qt tests discovery.
      ========== Test discovery finished: 8 Tests found in 1,4 sec ========== 

       

      Attachments

        1. image-2024-11-26-11-11-17-540.png
          28 kB
          Dominik Schrott
        2. Sample-Test2-1.7z
          16.71 MB
          Dominik Schrott
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtvstools Qt VS Tools
            schrotti Dominik Schrott
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes