Version 18 (modified by Samuli Seppänen, 8 years ago) (diff)



This page outlines the efforts taken to maintain OpenVPN's code quality without excessive compromises on development speed.

Static testing

Peer review

Static testing usually refers to static code analysis, which is baked in into our development process in the form of mandatory ACK process which every patch has to go through. The ACK process not only improves code quality, it also prevents highly specialized or rarely used features from polluting the codebase. Code reviews are especially important for patches coming from non-core contributors who may not be familiar with OpenVPN's coding practices.

Automated static testing

OpenVPN's codebase is scanned using Coverity Scan which detects many potential security vulnerabilities.

Dynamic testing

Dedicated black-box tests

Dynamic black-box testing means trying out an application and verifying if it works as intended. In closed-source software development which is organized around a waterfall model there are usually dedicated testers who do various scripted or intuitive/exploratory tests to verify that an application works as intended. This usually happens just before launch. In complex applications (such as OpenVPN) testing even a small fraction of functionality would be impractical and very costly. Fortunately, in Lean software development methodologies such as Scrum and especially in community-driven OSS development doing extensive dedicated testing is in general just a waste of time. It is replaced by

  • Constant quality assurance achieved with static whitebox technique (e.g. code reviews)
  • Testing in real environments (by users)

This said, a small amount of dedicated, dynamic testing (a.k.a. smoke testing) goes into each release to catch the most obvious errors:

Operating systemArchitectureTesterList of testsNotes
Windows XP installeri388mattockUninstall/install, OpenVPN-GUI connect/disconnect, service connect/disconnect
Windows 7 installeramd64mattockSame as for Windows XP, above
Ubuntu/Debiani386/amd64mattockInstall, upgrade, service connect/disconnect2-3 of the official packages are tested

All tests are performed against an OpenVPN 2.1.3 server that authenticates from LDAP and uses tls-auth.

If you want to help with pre-release testing please don't hesitate to contact the developers.

Performance tests

In the past performance tests have been conducted to measure OpenVPN performance:

As no systematic performance tests have been conducted, minor performance regressions might go unnoticed.

Testing in real environments

In OpenVPN (and most other open source projects), the stability of stable releases is ensured with real-life testing by it's users during all phases of software development, starting from patches sent to the mailing list, followed by development code in Git and leading into stable releases. There are at least two kinds of barriers to using pre-release code:

  • Psychological barriers
    • Risk avoidance
  • Technical barriers
    • Unfamiliarity with required tools (e.g. Git)
    • Difficulty of deployment, e.g. building software from sources (especially on Windows)

This means that the closer were getting closer to release, the more people we can expect to be testing the codebase. The figures below are not based on any real data and can only be considered rough estimates:


Use of snapshots help overcome some of the technical barriers. The only way to overcome psychological barriers is to speed up the release cycle. This results in new features get into wide circulation faster, which in turn results into issues being reported more quickly. This also gives more confidence in integrity of stable releases. On the flipside, more bugs will probably end up in the initial versions of the stable releases.

We do not currently provide development snapshot binaries, although doing that would definitely be beneficial.

Continuous integration

The project also has a Buildbot buildmaster, which drives several buildslaves. These together form a continuous integration environment for OpenVPN. Each of these buildslaves is running a different operating system, and every commit to the OpenVPN Git repository triggers a build on each. After the build, each buildslave's newly compiled openvpn instance tries to connect to several test servers using several different configurations. This ensures that

  • OpenVPN builds properly on a variety of platforms
  • The very basic functionality is not horribly broken

Unit testing

At the moment, there is no coherent set of unit tests to spot regressions. One option would be to use CUnit or similar unit test framework to cover the most commonly used and/or critical codepaths.