Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtCreators auto detection of test cases is doing it wrong.



  • I just found out that the unit testing plugins don't use the cmake data to detect the available test cases. Instead they just scan the source test and they do this very bad. For example when you wrap the TEST (gtest) or TEST_CASE (catch2) macros in your own macros they will not get detected.

    This is bad. Abstracting from the individual test case syntax is important if you for example want to use the best on all platforms.
    With just 200 lines of code i can use generic tests that run well with gtest/catch2/XCtest and microsofts CppUnitTest and are displayed in Visual Studio and XCode.

    Can this design error please be fixed.
    This would also make supporting of new test frameworks much easier.
    XCode and VisualStudio are also doing it this way for a good reason.

    If not, can we please don't look at the unprocessed source code level but clang model level declarations to detect the test cases in the source code? Via clang we can resolve macro redirection already perfectly well.

    This problem made me join this community, so please forgive me if it was already discussed or there is some other way then the forum to request feature changes.


  • Lifetime Qt Champion

    @llothar said in QtCreators auto detection of test cases is doing it wrong.:

    or there is some other way then the forum to request feature changes.

    The forum is user-driven and have nothing to do with the Qt development. Bug reports should go to bugreports.qt.io


Log in to reply