A Jenkins- and opsi-based test environment

opsi currently runs on 15 different Linux distributions. For a long time we didn't have automated tests. Most were tested manually. Usually Ubuntu and Debian were tested more intense, because we use these distributions internally.

We then started to build a more complex test environment including functional tests. This test environment uses Jenkins, opsi and small scripts. Jenkins introduced the pipeline plugin with v2.0. With this plugin it is fairly easy to build complex tests with a good overview. opsi is higly integrated into theses tests.

Each test consists of the following build steps:

  • install linux distribution

  • install opsi on this fresh machine

  • perform basic tests (logrotate, opsi-convert, etc.)

  • install a Windows netboot product

  • add a client to the new opsi server and install Windows (7, 8.1 and 10)

  • test for basic installed products on new Windows machine


The above image shows the graphical output of each stage of the jenkins pipeline. Whenever an error occours the step turns red and the pipeline aborts.

To simplify the steps of installing opsi, test it and then run the Windows installation we have seperate products. l-opsi-server installs opsi on a linux machine. It detects the distribution and installs the opsi packages for the distribution. The test product tests this machine for opsi commands like opsi-convert, opsi-backup, opsi-set-rights etc.. The client product adds a client and installs Windows netboot products. Additionally it fills the installfiles directory and sets this product on setup. A script then starts the virtual client and waits until the netboot product is installed, along with the opsi-client-agent. This step performs three times with Microsoft Windows versions (7, 8.1 and 10).

These tests are orchestrated by an opsi-server. We have three different stability levels. Therefore three opsi-servers with different package versions, matching the current stable, testing and experimental versions. The opsi-servers also just install package versions from their stability level on their client machines. This way we can check if our tested products can be released to the next stability level or not.

Please note that our test environment is currently work in progress and not all released packages are tested with it. We plan to integrate more and more products in the near future.