DEVELOPER GUIDE

Unit Testing

Introduction

Unit testing can be used for testing small pieces of functionality. We use GoogleTest as our test framework.

Running Tests

GoogleTest is already included in the OGS source code. Running tests is as simple as building the tests-target.

Writing Tests

All tests are located inside the Tests-directory in library-specific subfolders. To write a new test you simply create a new .cpp-file and use the GoogleTest macros.


This article was written by Lars Bilke. If you are missing something or you find an error please reach out to us on our forum.
Generated with Hugo 0.164.0 in CI job 825193 | Last revision: April 20, 2026
Commit: refactor(MeshLib): remove PropertyVector::push_back 870422dde  | Edit this page on