Work together on openQA tests

A more recent version is now officially available on https://openqa.debian.net/work_on_tests.html

In order to be able to create new tests or to improve/modify existing tests, you’ll need to have your own fork of the test repository. If you are a Debian Developers, you can skip the forking step.

These instructions assume that you are using a virtual machine, as configured https://rclobus.nl/blog/?p=440

Prepare the git workspace

  1. The key, that is used locally for Ansible, can be re-purposed for use on Salsa too (user=user)
    cat ~/.ssh/id_ed25519.pub
  2. Paste the output of the last command in ‘SSH Keys’ for Salsa (https://salsa.debian.org/-/user_settings/ssh_keys)
  3. Create a fork in Salsa
  4. Install additional packages for the coding convention (user=root)
    apt-get install --yes make perltidy
  5. Add your user to the group that owns the git workspace (user=root)
    usermod --append --groups geekotest user
  6. Activate the new group membership -> logout and login again
  7. Add your fork to the local git workspace (user=user)
    cd /var/lib/openqa/share/tests/debian
    git config --global --add safe.directory /var/lib/openqa/share/tests/debian
    SALSA_USERNAME=enter your username for salsa here
    git remote add mine git@salsa.debian.org:${SALSA_USERNAME}/openqa-tests-debian.git
    git fetch --all
  8. Tell git who you are (user=user)
    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"
  9. Work with git as usual to prepare the update
    git checkout origin/debian
    git switch -c ${SALSA_USERNAME}/featurename
    git add some_modified_file
  10. Always apply the Perl coding convention before doing a commit (user=user)
    make tidy
  11. Publish your changes and create a merge request (user=user)
    git commit
    git push --set-upstream origin ${SALSA_USERNAME}/featurename
  12. Merge requests on Salsa are monitored, so your change will be reviewed and merged soon

Monitor a job and perform needle updates

  1. Install additional packages (user=root)
    apt-get install --yes tigervnc-viewer
  2. Browse to a running job on http://localhost
  3. Go to the tab ‘Live View’
  4. Click on ‘Developer Mode’
  5. Change ‘Pause on screen mismatch’ to ‘assert_screen timeout’
  6. Click on ‘Confirm to control this test’
  7. See also the documentation of upstream: Use of the web interface