I am working on creating deb/rpm packages for an OSS tool I use. So far, I have been manually testing each deb/rpm in a virtualbox live cd version of that OS but it’s tedious to do that for every release. This is a GUI tool, I basically just need to confirm that the apt install goes correctly and the program can actually launch. There is a systemd service associated with it I’d also like to check the existence/status of. In the future, we may make a flatpak as well.

Are there any tools to automate this process? Or maybe if it can’t test the GUI functionality it can at least install and take a screenshot and I can review the screenshot?

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    11 months ago

    https://Open.qa it is an OpenSUSE tool but it can be used to auto test installs of any OS/software. Their open build service also automates and tests package building

    • andruid@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      OpenQA is the best answer that I know of for this too! You can even trigger from Gitlabs CI jobs if you are already here.

  • GamesRevolution@programming.dev
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    11 months ago

    I think there would be a way to test it with docker, you could find a image that has systemd installed and use something like distrobox to test it with the GUI.

  • Pantherina@feddit.de
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Not mentioned here so:

    • virt-manager is better than virtualbox.
    sudo dnf install qemu qemu-kvm virt-manager
    sudo groupadd libvirt
    sudo usermod -aG libvirt $USER
    systemctl enable --now libvirtd
    virt-manager
    

    Thats the way on Fedora, debian packages are called a bit differently, Ubuntu again, but that method works.

    Also for packaging an app that just works, why not flatpak? Especially if its a GUI app, this would highly improve availability on many Distros not covered by RPMs and DEBs. Also RPMs can have dependency conflicts between Opensuse and Fedora because naming, probably similar with Ubuntu and Debian.

  • tmat256@lemmings.world
    link
    fedilink
    arrow-up
    4
    ·
    11 months ago

    If it were me and I was intending to automate this I would probably do the following. Set up each test distro as a VirtualBox image and take a snapshot so I could easily roll back. Then I would write a script for each distro that downloaded the package, installed and launched the app. I would then probably query the window system to make sure the gui showed up, wait a period of time if I had to and take a screenshot.

    This can probably all be done as a set of bash scripts.