Writing automated tests for packages
-
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.
-
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.
-
@girish Beautiful I'll get tests going for Directus then. Since I am being paid for it's packaging.
@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.
-
@murgero Thanks, if you have any question, feel free to ask and I am happy to help.
-
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!
-
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!
-
@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? -
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.
-
It will be initialized by the test.js script. The
require
s are important as well as thebefore
andafter
hook. See https://git.cloudron.io/cloudron/minio-app/-/blob/master/test/test.js