Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Writing automated tests for packages

Writing automated tests for packages

Scheduled Pinned Locked Moved App Packaging & Development
12 Posts 7 Posters 2.4k Views 8 Watching
  • 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.
  • girishG girish

    I recorded a quick video showing host the tests run. The browser on the left is my Firefox that just shows the Cloudron dashboard. The browser that appears on the right is Chrome and it is where the automated testing happens.

    EDIT: OK, this is funny. @nebulon was wondering why I had some dark music in the video. I thought I had recorded a silent video and did not even know there was some background music 🙂 Investigating, I found out that my youtube at some point has started auto-playing "3 HOURS Most EPIC POWERFUL BATTLE MUSIC"! and OBS was happily recording that. Since, I don't have a headset connected to this setup, I had no idea. Funnily, when I uploaded this video, it immediately told me there is a "copyright claim" and I thought "yeah, right". Now I know why.

    murgeroM Offline
    murgeroM Offline
    murgero
    App Dev
    wrote on last edited by
    #3

    @girish Beautiful I'll get tests going for Directus then. Since I am being paid for it's packaging.

    --
    https://urgero.org
    ~ Professional Nerd. Freelance Programmer. ~

    marcusquinnM 1 Reply Last reply
    4
    • murgeroM murgero

      @girish Beautiful I'll get tests going for Directus then. Since I am being paid for it's packaging.

      marcusquinnM Offline
      marcusquinnM Offline
      marcusquinn
      wrote on last edited by
      #4

      @murgero Yay 😁 unit testing definitely a great string to add to your bow and hopefully time-saver for adding more apps without adding maintenance whack-a-mole overhead too when you'd hope the tests will do the monitoring so we don't need to so much.

      Web Design https://www.evergreen.je
      Development https://brandlight.org
      Life https://marcusquinn.com

      1 Reply Last reply
      1
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #5

        @murgero Thanks, if you have any question, feel free to ask and I am happy to help.

        1 Reply Last reply
        1
        • doodlemania2D Offline
          doodlemania2D Offline
          doodlemania2
          App Dev
          wrote on last edited by
          #6

          Can you tell me a bit about your setup? I assume this is a Linux desktop distro? Any pointers on initial setup would be appreciated!

          doodlemania2D 1 Reply Last reply
          0
          • doodlemania2D doodlemania2

            Can you tell me a bit about your setup? I assume this is a Linux desktop distro? Any pointers on initial setup would be appreciated!

            doodlemania2D Offline
            doodlemania2D Offline
            doodlemania2
            App Dev
            wrote on last edited by
            #7

            @girish - i watched the video and was able to discern most of your setup, but would still appreciate a sanity check if you have time on how you got your test harness up and running. Having troubles getting Selinium to "run"

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #8

              @doodlemania2 Happy to help!

              Yes, I am on Ubuntu but @nebulon is on Arch, so that should work as well. Which part are you stuck in? Did the npm install go through? What's your setup like?

              1 Reply Last reply
              0
              • girishG girish

                I recorded a quick video showing host the tests run. The browser on the left is my Firefox that just shows the Cloudron dashboard. The browser that appears on the right is Chrome and it is where the automated testing happens.

                EDIT: OK, this is funny. @nebulon was wondering why I had some dark music in the video. I thought I had recorded a silent video and did not even know there was some background music 🙂 Investigating, I found out that my youtube at some point has started auto-playing "3 HOURS Most EPIC POWERFUL BATTLE MUSIC"! and OBS was happily recording that. Since, I don't have a headset connected to this setup, I had no idea. Funnily, when I uploaded this video, it immediately told me there is a "copyright claim" and I thought "yeah, right". Now I know why.

                BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote on last edited by
                #9

                @girish Arg how did you enable the browser on the right? (Selenium/Chromedriver)

                Like my work? Consider donating a drink. Cheers!

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by nebulon
                  #10

                  It will be initialized by the test.js script. The requires are important as well as the before and after hook. See https://git.cloudron.io/cloudron/minio-app/-/blob/master/test/test.js

                  BrutalBirdieB 1 Reply Last reply
                  0
                  • nebulonN nebulon

                    It will be initialized by the test.js script. The requires are important as well as the before and after hook. See https://git.cloudron.io/cloudron/minio-app/-/blob/master/test/test.js

                    BrutalBirdieB Offline
                    BrutalBirdieB Offline
                    BrutalBirdie
                    Partner
                    wrote on last edited by
                    #11

                    @nebulon Yea I just wanted to reply never mind, I copied the tests from the alltube app which do not even use selenium so yeeaa my mistake.

                    Now I took the nextcloud tests and will learn from them 🙂

                    Like my work? Consider donating a drink. Cheers!

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      erics
                      App Dev
                      wrote on last edited by erics
                      #12
                      This post is deleted!
                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search