Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. QA Tools
  3. Squish
  4. Is it possible to 'see' by using e.g. VNC actual GUI when executing tests using squishtest python library?

Is it possible to 'see' by using e.g. VNC actual GUI when executing tests using squishtest python library?

Scheduled Pinned Locked Moved Solved Squish
3 Posts 2 Posters 184 Views
  • 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.
  • M Offline
    M Offline
    MRosiek
    wrote on 12 Mar 2025, 11:29 last edited by
    #1

    Hello,

    To be started with, I am running my AUT on remote machine using Linux like OS. This application is served inside docker container which also forwards VNC ports and squish related ports.

    I have simple test cases written in python using squishlibrary. Basically what I would want to achieve is to see actual GUI when executing these test cases. Something similar when I open "Remote Control" in Squish IDE.

    What I have achieved so far is:
    I was able to attach to my application using: squishtest.attachToApplication(aut) method with configured toolkit as "Qt". After that I am able for example fetch some properties from my app and test their values.

    I m wondering if it is possible to configure or attach to my application in some way that it will allow me to see GUI interface.

    I have found method called: connectTo(target) but I am not able to run it with success. I thought that I can use this method instead attachTo and get visual on my UI.

    PS. When I use connectTo("vnc://192.168.0.170:5900") I get following error:
    Squish couldn't start the AUT because the program doesn't exist. Make sure the AUT is really built and was not removed. Also make sure that the path to the AUT is correct in the settings.

    PS. I am able to connect to my app using VNC when I use VNC client like e.g. TightVNC over 5900 port and then I am able to see GUI and interact with it using mouse, keyboard etc.

    Could you please help me with this matter?

    Best Regards,
    Mateusz

    J 1 Reply Last reply 18 Mar 2025, 02:44
    1
    • M MRosiek
      12 Mar 2025, 11:29

      Hello,

      To be started with, I am running my AUT on remote machine using Linux like OS. This application is served inside docker container which also forwards VNC ports and squish related ports.

      I have simple test cases written in python using squishlibrary. Basically what I would want to achieve is to see actual GUI when executing these test cases. Something similar when I open "Remote Control" in Squish IDE.

      What I have achieved so far is:
      I was able to attach to my application using: squishtest.attachToApplication(aut) method with configured toolkit as "Qt". After that I am able for example fetch some properties from my app and test their values.

      I m wondering if it is possible to configure or attach to my application in some way that it will allow me to see GUI interface.

      I have found method called: connectTo(target) but I am not able to run it with success. I thought that I can use this method instead attachTo and get visual on my UI.

      PS. When I use connectTo("vnc://192.168.0.170:5900") I get following error:
      Squish couldn't start the AUT because the program doesn't exist. Make sure the AUT is really built and was not removed. Also make sure that the path to the AUT is correct in the settings.

      PS. I am able to connect to my app using VNC when I use VNC client like e.g. TightVNC over 5900 port and then I am able to see GUI and interact with it using mouse, keyboard etc.

      Could you please help me with this matter?

      Best Regards,
      Mateusz

      J Offline
      J Offline
      jagadish
      wrote on 18 Mar 2025, 02:44 last edited by
      #2

      Hi @MRosiek

      best way to see your remote screen is using the "Remote Control" in Squish IDE. from where you can use all other features of squish like the record video etc..

      In your case its simple just open the VNC display on which ever your already using the TightVNC over 5900 port and run your test case,
      You will see the application being launched by Squish and tested by Squish on this display.

      I have used this in past and it works fine, this should solve your situation.
      Let me know if this helps.

      You can always raise support tickets directly from SquishIDE
      https://doc.qt.io/squish/collect-information-for-squish-support-dialog.html

      1 Reply Last reply
      1
      • M Offline
        M Offline
        MRosiek
        wrote 30 days ago last edited by
        #3

        Hi @jagadish ,
        thank you for your answer. Using Squish IDE when I run automatic tests is not an option. Im only using squishtest module from python code. Well that suggestion about using TightVNC as another process controlled from python was the best option for me. I just run TightVNC client via subprocess module and later when tests finished i just killed it.

        1 Reply Last reply
        0
        • M MRosiek has marked this topic as solved 30 days ago

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved