... | ... | @@ -84,13 +84,15 @@ can adapt an existing test. Here are some we know of: |
|
|
|
|
|
When adding or debugging tests you probably don't want to wait for a full Gitlab CI pipeline. You can run the test suite locally if you don't mind doing some preparations. You will need Docker / Podman to run the tests, and `jq`.
|
|
|
|
|
|
1. Clone gnome-build-meta repo.
|
|
|
1. Clone [gnome-build-meta](https://gitlab.gnome.org/GNOME/gnome-build-meta/) repo.
|
|
|
|
|
|
2. Get the `installer.iso` file you want to test. The simplest way is to build the 'iso-installer-x86_64` job in Gitlab CI, then use the 'Job artifacts' menu to download it.
|
|
|
2. Clone [openqa-needles](https://gitlab.gnome.org/GNOME/openqa-needles/) repo, link or rename it to be inside gnome-build-meta folder at `./openqa/needles`.
|
|
|
|
|
|
3. Get the `vars.json` file from a successful OpenQA run. Visit https://openqa.gnome.org/tests to find the latest successful run, then visit the 'Logs & Assets' tab and download `vars.json`.
|
|
|
3. Get the `installer.iso` file you want to test. The simplest way is to build the 'iso-installer-x86_64` job in Gitlab CI, then use the 'Job artifacts' menu to download it.
|
|
|
|
|
|
4. Run this command inside the gnome-build-meta clone to start the openqa_worker image:
|
|
|
4. Get the `vars.json` file from a successful OpenQA run. Visit https://openqa.gnome.org/tests to find the latest successful run, then visit the 'Logs & Assets' tab and download `vars.json`.
|
|
|
|
|
|
5. Run this command inside the gnome-build-meta clone to start the openqa_worker image:
|
|
|
|
|
|
podman run --privileged -it \
|
|
|
-v ./openqa:/tests -v ./installer.iso:/installer.iso \
|
... | ... | @@ -100,14 +102,14 @@ When adding or debugging tests you probably don't want to wait for a full Gitlab |
|
|
|
|
|
The test log will be written to stdout, the other data is still inside the container.
|
|
|
|
|
|
5. Find the ID of the container you just ran, using `podman ps -a -l`
|
|
|
6. Find the ID of the container you just ran, using `podman ps -a -l`
|
|
|
|
|
|
6. Copy the test results and video out of the container:
|
|
|
7. Copy the test results and video out of the container:
|
|
|
|
|
|
podman cp 12345678abc:/testresults ./testresults
|
|
|
podman cp 12345678abc:/video.ogv .
|
|
|
# See all files in the container by running: podman export 12345678abc | tar -v -t | less
|
|
|
|
|
|
7. Remove the container with `podman rm` when you are done.
|
|
|
8. Remove the container with `podman rm` when you are done.
|
|
|
|
|
|
It's common to use `save_screenshot` when writing testcases, which gives you a `.png` which you can then convert into a Needle. |