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

Manage Environment when running All tests

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 10.0.1
    • Ubuntu 22.04 

      X11

      Qt6.5

      QtCREATOR 10.1

    • Linux/X11

    Description

      Description:

      I would like to be able to manage environment variables when I run all tests.

      I can manage the env for each test, but I would like to be able to define one env for all tests. I believe It could be helpful to split the env when you are working on one test and the execution of all tests at once.

       

      The weird thing is that if I select a test binary with the offscreen env variable defined, and then run all tests it is working. I believe the all tests run is done with the execution env from the currently selected binary. It is hard to follow. I can live with this right now, but having a proper way to set the env of all tests run will be much appreciated.

      Why :

      I'm currently working on unit test in a project. My goal is to reach a good coverage. So, I need to run the whole test suit quite often. Some of the tests are showing up window for few seconds.

      Which causes a huge mess and I have to wait until the end in order to get control of my computer.

      To run the "all tests", I use ctest with five jobs. I imagine that if I go back to QTest for running all tests. It may use the env defined for each test binary.

      I have many tests, It will be real nightmare to change all env, and moreover QTest is not supporting multi-threading which will make the run  much longer.

      What I want:

      My process is easy: If I'm currently working on one test, I want to be able to run it in an environment where I can see that is happening.

      When I'm done improving it, it can be executed with all the rests in the background.

      So my plan is to run "all tests" with "QT_QPA_PLATFORM=offscreen".

      This is a feature to improve my working process.  It won't be the same in a CI which is why I believe the IDE could provide this kind of feature.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            renaudg Renaud Guezennec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes