unit testing

How to automate testing with CMake, CTest, and gtest

In this article, we will have a look at how we can integrate unit, integration, and system tests with CMake. We will see that CMake comes with additional helper utilities, one of which is CTest. We use CMake to register all tests and then compile them into individual executables, and we use CTest to run …

How to automate testing with CMake, CTest, and gtest Read More »

How To Test A Linear Algebra Solver Library Using gtest

In this article, we look at how we can test the linear algebra solver library we developed previously. In particular, we will look at how we can write unit, integration, and system tests that ensure our code is working using both white-box and black-box testing. This will provide our code with additional resistance against regressions …

How To Test A Linear Algebra Solver Library Using gtest Read More »

How To Test A CGNS-based Mesh Reading Library Using gtest

In this article, we extend our knowledge on how to integrate gtest into our mesh reading library using the CGNS data format for structured and unstructured grids that we developed in a previous series. We will rewrite the unit tests that we have already written using our own primitive testing framework and highlight how gtest …

How To Test A CGNS-based Mesh Reading Library Using gtest Read More »

How to get started with gtest in C++ for CFD development

In this article, we will look at testing frameworks in C++ and I provide reasons for why I am using Google’s gtest testing framework and why it covers all of our use-cases we have to test CFD solvers and related code. We will use it to rewrite our tests for the complex number class we …

How to get started with gtest in C++ for CFD development Read More »

The test-driven development for writing bug-free CFD code

In this article, we will put the knowledge that we gained from the previous article on software testing principles into practice, and learn about different software project management approaches, that prioritise testing differently. We will see that there are two competing approaches available, the waterfall and agile approach, where the waterfall approach leaves testing to …

The test-driven development for writing bug-free CFD code Read More »

How to get started with software testing for CFD codes

In this series, we are going to look at software testing, how we can incorporate that into our CFD coding projects and how we can run tests automatically to ensure that we have a bug-free codebase. In this opening article, we will define common terminology and get an intuitive understanding of how tests are structured …

How to get started with software testing for CFD codes Read More »