$machine->waitForWindow("^Desktop ");
It looks incredibly useful.Thanks!
$machine->waitForWindow("^Desktop ");
It looks incredibly useful.Thanks!
Tests are written in a mix of Nix and Perl automation scripts like this; the Perl scripts control QEMU, but the Nix code describes what is put into the disk images. It's fairly bespoke and tuned to our own needs. The source code for the Perl driver is here: https://github.com/NixOS/nixpkgs/blob/f148c5c4a1ffa353836bfd...
It can even do multi-machine test setups as another comment pointed out, and it's pretty fun for writing functional demonstrations; for example I've been meaning to use these tools to write examples of doing PostgreSQL replication and failover, etc.
PLEASE consider releasing some form of this tool, or at least documenting the snot out of it... it looks incredible. We'd really use this at work.
- http://open.qa/ - TestKitchen
But I must recommend, indeed, taking a good hard took at NixOS! :)
https://github.com/NixOS/nixpkgs/blob/49a6964a4250d98644da61...
Digging a little bit, nixos' tests appear to be written in perl and are executed in a context that has access to a bunch of useful primitives for asserting these sorts of things. https://nixos.org/nixos/manual/#sec-writing-nixos-tests
I'll be writing more soon about how these tests work and how neat they are. They really help NixOS quickly release really high quality updates!
In this case, the test makes use of both xdotool and Nix's own testing library.