| 1 | |
| 2 | = !MapGuide RFC 180 - Migrate from CppUnit to Catch2 = |
| 3 | |
| 4 | This page contains a change request (RFC) for the !MapGuide Open Source project. |
| 5 | More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. |
| 6 | |
| 7 | == Status == |
| 8 | |
| 9 | ||RFC Template Version||(1.0)|| |
| 10 | ||Submission Date||15 Jul 2020|| |
| 11 | ||Last Modified||15 Jul 2020|| |
| 12 | ||Author||Jackie Ng|| |
| 13 | ||RFC Status||draft|| |
| 14 | ||Implementation Status||pending|| |
| 15 | ||Proposed Milestone||4.0|| |
| 16 | ||Assigned PSC guide(s)||(when determined)|| |
| 17 | ||'''Voting History'''||(vote date)|| |
| 18 | ||+1|||| |
| 19 | ||+0|||| |
| 20 | ||-0|||| |
| 21 | ||-1|||| |
| 22 | ||no vote|| || |
| 23 | |
| 24 | == Overview == |
| 25 | |
| 26 | This RFC proposes to replace CppUnit with Catch2 for our unit testing purposes. |
| 27 | |
| 28 | == Motivation == |
| 29 | |
| 30 | Catch2 is a **header-only** unit testing library that has a simpler installation and consumption story. |
| 31 | |
| 32 | 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. |
| 33 | |
| 34 | 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. |
| 35 | |
| 36 | The simplicity of writing tests under Catch2 should encourage more tests to be written. |
| 37 | |
| 38 | == Proposed Solution == |
| 39 | |
| 40 | Add Catch2 header to Oem |
| 41 | |
| 42 | Remove CppUnit sources from Oem |
| 43 | |
| 44 | The UnitTesting project will be migrated from CppUnit to Catch2. Invocation of these test suites will remain the same. |
| 45 | |
| 46 | == Implications == |
| 47 | |
| 48 | None. |
| 49 | |
| 50 | == Test Plan == |
| 51 | |
| 52 | The current test suite must still pass after migration to Catch2 |
| 53 | |
| 54 | == Funding / Resources == |
| 55 | |
| 56 | Community |