UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Qml tests using TestCase

    Scheduled Pinned Locked Moved App Development
    14 Posts 4 Posters 1.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • dobeyD Offline
        dobey @UniSuperBox
        last edited by

        @UniSuperBox said in Qml tests using TestCase:

        Hmm... It's possible that you also need to set QT_QPA_PLATFORM=xcb either using export or by putting it before your command.

        No, that is not the problem. Qt will select that automatically.

        1 Reply Last reply Reply Quote 0
        • dobeyD Offline
          dobey @Krille
          last edited by dobey

          @Krille Ah, sorry. I forgot the extra option one needs to ensure color depth of the virtual display.

          Try xvfb-run -a -s '-screen 0 540x960x24' qmltestrunner instead.

          Not sure why clickable didn't show you the error and exit, though. Maybe a bug in clickable?

          1 Reply Last reply Reply Quote 0
          • KrilleK Offline
            Krille
            last edited by

            Okay, so now I've tested:

            clickable --arch="amd64" run "xfvb-run -a -s '-screen 0 540x960x24' qmltestrunner"
            

            Leads me to:

            bash: xfvb-run: command not found
            

            Maybe we need to install xfvb in the container? Is there a way how I can install this in the container by myself?

            dobeyD 1 Reply Last reply Reply Quote 0
            • U Offline
              UniSuperBox
              last edited by UniSuperBox

              Sorry... xvfb, not xfvb. It stands for "X Virtual FrameBuffer."

              1 Reply Last reply Reply Quote 0
              • dobeyD Offline
                dobey @Krille
                last edited by

                @Krille Sorry, was a typo. I've edited the post now. It's xvfb-run

                1 Reply Last reply Reply Quote 0
                • KrilleK Offline
                  Krille
                  last edited by Krille

                  Haha okay. So now:

                  clickable --arch="amd64" run "xvfb-run -a -s '-screen 0 540x960x24' qmltestrunner"
                  

                  And again the previous result: Nothing happens anymore 😞 I will try to run the command in the container to get an error report...

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    domubpkm @Krille
                    last edited by

                    @Krille Hi. I don't know anything about what you are doing but my eyes see again xfvb above whereas it is spoken about xvfb. Just to be sure it's normal, i prefered to prevent you.

                    KrilleK 1 Reply Last reply Reply Quote 1
                    • KrilleK Offline
                      Krille @domubpkm
                      last edited by

                      @domubpkm Oh, sure sorry. But nothing changes...

                      1 Reply Last reply Reply Quote 0
                      • KrilleK Offline
                        Krille
                        last edited by

                        Btw I have found that this is propably the same reason why the UI tests (at least) in the messages app are still disabled: https://github.com/ubports/messaging-app/blob/xenial/tests/qml/CMakeLists.txt#L18

                        dobeyD 1 Reply Last reply Reply Quote 0
                        • dobeyD Offline
                          dobey @Krille
                          last edited by

                          @Krille said in Qml tests using TestCase:

                          Btw I have found that this is propably the same reason why the UI tests (at least) in the messages app are still disabled: https://github.com/ubports/messaging-app/blob/xenial/tests/qml/CMakeLists.txt#L18

                          The tests aren't disabled. If xvfb is installed and tests are run, then these tests which depend on xvfb should be run too. If however, you are using crossbuilder then the tests will not be run, because tests do not get run during the build then, as you cannot run arm binaries native on x86.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post