Skip to content

05. Testing Rain Gauge Statistics

Matthias Prinke edited this page Jun 20, 2024 · 1 revision

Due to the relative complexity and the time-scale of real input data, unit tests have been implemented with CppUTest in https://github.com/matthias-bs/BresserWeatherSensorReceiver/tree/main/test.

There are two sets of tests:

  1. TestRainGauge.cpp - artificial test data; separate tests for each function, considering corner cases
  2. TestRainGaugeReal.cpp - generated from real-world data (Pottery Fields rain gauge rainfall data - 12/06/2013 - 21/02/2016) with raindata2test.pl; all functions combined

In addition to the test results, the test coverage (line coverage) is provided.

While the actual implementation- and testing-cycle has been done locally, the unit tests are now also implemented as CppUTest.yml GitHub workflow with GitHub Actions.

The coverage report is exported to https://coveralls.io/github/matthias-bs/BresserWeatherSensorReceiver using the Coveralls GitHub Action.