4 ms·
"It uses openCV and a library of reference screenshots (with areas of interest selected to allow openQA to ignore things we don’t care about) which we call ‘nee
by vmorgulis 11y ago
"It uses openCV and a library of reference screenshots (with areas of interest selected to allow openQA to ignore things we don’t care about) which we call ‘needles’ ..."
OpenQA is a fascinating project. The tests are written in perl and I think the OpenCV magical stuff is around the "check_screen()" function.
For example, a test for Firefox:
x11_start_program("firefox https://html5test.com/index.html", 6, {valid => 1});
# makes firefox as default browser
if (check_screen('firefox_default_browser')) {
assert_and_click 'firefox_default_browser_yes';
}
https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/x11/firefox.pm https://github.com/os-autoinst/os-autoinst-distri-opensuse/b...
- nextos 11y agoThis is very cool. But it irritates me a bit another cool piece is reproducible builds, as implemented by guix challenge [1], and I can't have both! I also tend to think most package managers lack a sound foundation, unlike nix. It builds everything upon a basic but powerful idea, don't force to keep the whole package tree in sync. [1] https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-challenge.html https://www.gnu.org/software/guix/manual/html_node/Invoking-...
- rbrownsuse 11y agocheck_screen is a non-fatal check, really useful for stuff like you cite in that example "tell openQA to see if something is on the screen, then react to it" assert_screen is it's fatal cousin "make sure the screen has this needle on it, or die" assert_and_click is it's mouse-controlling companion, "make sure the screen has this needle on it, then click on it" https://github.com/os-autoinst/openQA/blob/master/docs/WritingTests.asciidoc https://github.com/os-autoinst/openQA/blob/master/docs/Writi... The above doc covers the basics, we also have a whole bunch of tutorials on YouTube https://www.youtube.com/watch?v=-fqvaSO6nKE https://www.youtube.com/watch?v=-fqvaSO6nKE https://www.youtube.com/watch?v=a8LmqhwpVvg https://www.youtube.com/watch?v=a8LmqhwpVvg https://www.youtube.com/watch?v=EM3XmaQXcLg https://www.youtube.com/watch?v=EM3XmaQXcLg
- vmorgulis 11y agoThat's great! I found the piece of code I was looking for inside "tinycv" (about OpenCV): https://github.com/os-autoinst/os-autoinst/blob/3c2f5edda09bff3246f5438d47ad84123a5cf151/ppmclibs/tinycv_impl.cc#L200 https://github.com/os-autoinst/os-autoinst/blob/3c2f5edda09b... I switched to Debian from Fedora a year ago during the "freeze" in the release cycle. I wonder what is the stability level of Tumbleweed compared to a standard (non-beta) Fedora or a Debian testing. Is it the good repo for Tumbleweed OpenQA test? https://github.com/os-autoinst/os-autoinst-distri-opensuse https://github.com/os-autoinst/os-autoinst-distri-opensuse
- rbrownsuse 11y agoYes, we share one test repo amongst all the openSUSE distributions and SUSE distributions SUSE use openQA for testing their enterprise distributions too, and keeping all our tests together and reused as heavily as possible really helps in all directions (and proves the argument that maintaining openQA tests isnt hard even when dealing with multiple codebases-under-test all moving at different paces) I use Tumbleweed as my daily driver on all my machines besides my server (Leap). In 2 years I've had no problems that I didnt cause myself (eg. rm -rf /) and even then snapper saved the day and let me rollback to a working snapshot (Tumbleweed, like all openSUSE/SUSE distributions have btrfs snapshots and rollback by default) So I'd say its comparible to Fedora or Debian testing And we'd like to see more contributors, not only adding more packages and maintaining them, but to openQA also so that Tumbleweeds quality doesn't just stay at that level but gets even higher
- vmorgulis 11y agoThank you a lot. I'll try Tumbleweed.