• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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.
    • U Offline
      UniSuperBox
      last edited by 2 May 2019, 13:40

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

      D 1 Reply Last reply 2 May 2019, 13:52 Reply Quote 0
      • D Offline
        dobey @UniSuperBox
        last edited by 2 May 2019, 13:52

        @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
        • D Offline
          dobey @Krille
          last edited by dobey 5 Mar 2019, 13:31 2 May 2019, 13:54

          @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
          • K Offline
            Krille
            last edited by 3 May 2019, 04:23

            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?

            D 1 Reply Last reply 3 May 2019, 13:32 Reply Quote 0
            • U Offline
              UniSuperBox
              last edited by UniSuperBox 5 Mar 2019, 13:02 3 May 2019, 13:02

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

              1 Reply Last reply Reply Quote 0
              • D Offline
                dobey @Krille
                last edited by 3 May 2019, 13:32

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

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Krille
                  last edited by Krille 5 Apr 2019, 08:57 4 May 2019, 04:55

                  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 4 May 2019, 08:05 Reply Quote 0
                  • D Offline
                    domubpkm @Krille
                    last edited by 4 May 2019, 08:05

                    @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.

                    K 1 Reply Last reply 4 May 2019, 08:57 Reply Quote 1
                    • K Offline
                      Krille @domubpkm
                      last edited by 4 May 2019, 08:57

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

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        Krille
                        last edited by 2 Jun 2019, 18:12

                        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

                        D 1 Reply Last reply 3 Jun 2019, 13:00 Reply Quote 0
                        • D Offline
                          dobey @Krille
                          last edited by 3 Jun 2019, 13:00

                          @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