wiki:MapGuideRfc180

MapGuide RFC 180 - Migrate from CppUnit? to Catch2

This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission Date15 Jul 2020
Last Modified29 Jul 2020
AuthorJackie Ng
RFC Statusimplemented
Implementation Statuscompleted
Proposed Milestone4.0
Assigned PSC guide(s)(when determined)
Voting History(vote date)
+1Jackie,Gordon,Reno
+0Martin
-0
-1
no vote

Overview

This RFC proposes to replace CppUnit? with Catch2 for our unit testing purposes.

Motivation

Catch2 is a header-only unit testing library that has a simpler installation and consumption story.

Being header-only means we don't have to build and link to this library unlike CppUnit?. Just #include the single catch.hpp header file and you can get started writing tests. This means one less external library we have to build.

Also being header-only means that we can easily integrate it into areas/projects within the Server and Web tiers sorely lacking in test coverage right now, such as the mapagent http handler.

The simplicity of writing tests under Catch2 should encourage more tests to be written.

Proposed Solution

Add Catch2 header to Oem

Remove CppUnit? sources from Oem

The UnitTesting? and mg-desktop UnitTest? projects will be migrated from CppUnit? to Catch2. Invocation of these test suites will remain the same.

Implications

Catch2 test output differs from what CppUnit? outputs, so any CI processes that pass or fail a MapGuide build based on checking test runner output or its file report will have to be adjusted.

Test Plan

The current test suite must still pass after migration to Catch2

Funding / Resources

Community

Last modified 16 months ago Last modified on Jul 28, 2020, 7:36:05 AM