An easy to use automated QA testing tool based on QEMU
Project description
miniQA
A simple to use automated QA test tool: miniQA runs an OS of your choice in QEMU, interacts with it based on your YAML test files and ensures the results match your criteria.
miniQA includes a simple web editor/mini IDE providing some helpful tools to write your test cases in quick iterations with the VM screen on the side.
Setup
Via PIP
miniQA can be installed via pip:
pip install miniqa
Make sure you have the runtime dependencies (qemu-system-x86, qemu-utils and optionally ovmf) installed as well:
- Debian:
sudo apt install qemu-system-x86 qemu-utils ovmf - Fedora:
sudo dnf install qemu-system-x86 qemu-img edk2-ovmf
Now, you can just run your tests by running this from your tests folder:
miniqa run # - or: `miniqa editor` for the webui
Via Podman/Docker
Alternatively, miniQA can be used without any installation via podman or docker. The image includes QEMU already. To do so, just invoke a command such as this from your tests folder:
docker run \
--rm \
-it \
--device /dev/kvm \
--tmpfs /tmp:size=1G,mode=1700 \
-p 8080:8080 \
-p 6080:6080 \
-v .:/tests \
miniqa run # - or: `miniqa editor` for the webui
Quick Start
Setup the Files:
In your project, create a tests folder. Everything miniQA will live in this folder. In this folder, you need to create:
-
An
imgfolder: Here, the OS image(s) will be located. For example, you can grab a copy of GNOME OS Nightly and place it inimg/gnome_os_disk.img. -
A
miniqa.ymlfile: This file contains your overall miniQA configuration and can look like this:image: img/gnome_os_disk.img # the image our VM boots use_ovmf: true # required to boot GNOME OS qemu_args: [ "-device", "virtio-multitouch-pci", # adds multitouch capabilities to the VM "-device", "VGA,edid=on,xres=1080,yres=720" # ensures a fixed screen resolution ] cache_directory: ./miniqa-cache
-
A nested
testsfolder: This will contain your test cases, e.g.example_test.yml, or this one:steps: - wait: # - wait for boot to complete, and then for the GNOME OS for: # setup wizard (which has gray background) to show up dominant_color: '#fafafb' timeout: 120s # - on timeout, our test will fail - click: # - go to the next page find: text: Next - snapshot: base # - create a snapshot other tests can start from
Your overall directory structure should now look like this:
your_project
├── …
└── tests
├── img
│ └── gnome_os_disk.img
├── tests
│ ├── example_test.yml
│ ├── second_example_test.yml
│ └── …
└── miniqa.yml
Run your Tests
Now, you're ready to run your first test:
cd your_project/tests
miniqa run
Edit in the Webui
Afterward, you can edit your tests in any editor you like, but I'd highly recommend using miniQA's webui. This way you'll be able to
- run tests right away,
- see the VM's screen right next to the YAML editor, and
- have basic autocomplete making it easy to discover miniQA's features.
The webui also has tools allowing you to easily pick screen positions, regions and colors right from the VM.
To launch it, run:
miniqa editor
Check the Docs
Well, docs might be a bit far-fetched, but there's a bit of reference in ./docs.
The aim is, that this should be enough to easily find your way into miniQA and work with it in the long run; should you have questions or miss anything in there, please don't hesitate to create an issue to get in touch.
Contribute
I'd highly value your contributions – if you'd like to add a new feature or make bigger changes, please create an issue to briefly discuss it upfront, so we can make sure your work is not for nothing; for small fixes feel free to just open a PR.
Please be aware that the codebase is not yet quite as clean as I'd like it to be, since this project was originally just a sidequest and I haven't yet had much time to fully clean it up. However, I'm glad to help you around, should you have questions!
Support
If miniQA is helpful for you, I'd appreciate you supporting me with a small amount. Even a dollar a month helps!
To donate, choose a platform below:
Recommended! Most payment methods, one-time or recurring donations, no sign up required.
Donate by card, no sign up required.
License
This project is licensed under GPL-3.0-or-later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file miniqa-0.1.0.tar.gz.
File metadata
- Download URL: miniqa-0.1.0.tar.gz
- Upload date:
- Size: 91.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d50ae5743beac5a741c101a65ecbc5d883079be27393f22a736cacdfe39f2fba
|
|
| MD5 |
1e765d7fd0c787a69329aa83fb17e452
|
|
| BLAKE2b-256 |
62a42cc9a8018f3afb10ea1dc7b4042936578b38609e7210b2c04b961d73e076
|
Provenance
The following attestation bundles were made for miniqa-0.1.0.tar.gz:
Publisher:
python-publish.yml on mityax/miniqa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
miniqa-0.1.0.tar.gz -
Subject digest:
d50ae5743beac5a741c101a65ecbc5d883079be27393f22a736cacdfe39f2fba - Sigstore transparency entry: 1271732046
- Sigstore integration time:
-
Permalink:
mityax/miniqa@b4d7c02e346ff97d44c40958390990dd5829b630 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mityax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b4d7c02e346ff97d44c40958390990dd5829b630 -
Trigger Event:
release
-
Statement type:
File details
Details for the file miniqa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: miniqa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 109.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb7cd610c0dd80705365e024827200d1e65a106c334796f33776468744fcabca
|
|
| MD5 |
e2a0b5e2de034173e77518c3a3356d79
|
|
| BLAKE2b-256 |
f64dbcd74c563279c09256354a86368c0c9ab5b7fe80f46362f9667dd6e22049
|
Provenance
The following attestation bundles were made for miniqa-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on mityax/miniqa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
miniqa-0.1.0-py3-none-any.whl -
Subject digest:
bb7cd610c0dd80705365e024827200d1e65a106c334796f33776468744fcabca - Sigstore transparency entry: 1271732065
- Sigstore integration time:
-
Permalink:
mityax/miniqa@b4d7c02e346ff97d44c40958390990dd5829b630 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mityax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b4d7c02e346ff97d44c40958390990dd5829b630 -
Trigger Event:
release
-
Statement type: