Googletest to CUTE: a step further

Thévenaz, Muriel (2019) Googletest to CUTE: a step further. Student Research Project thesis, HSR Hochschule für Technik Rapperswil.

[thumbnail of FS 2019-SA-EP-Thévenaz-Multi-File Google Test -  CUTE Test Konverter.pdf]
FS 2019-SA-EP-Thévenaz-Multi-File Google Test - CUTE Test Konverter.pdf - Supplemental Material

Download (1MB) | Preview


“Googletest to CUTE: a step further” is a student project conducted over a semester (15 weeks) for the Institute for Software (IFS) at the University of Applied Sciences Rapperswil. The aim of the project was to amend CUTE, the C++ testing framework integrated into the IFS IDE Cevelop, with a way of automate the conversion of Googletests to CUTE tests. Another student team created an initial version of that conversion plug-in before. It was able to convert all main Googletest assertions, but only for a single file at once. Since most of the real-life projects need more than one file with tests, the most urgent next step was to implement a solution suitable for tests spreading over several translation units. Another important goal was to implement a conversion for Googletest’s TEST_F test registration macro, that provides a way to initialize test objects (a fixture) by overriding a SetUp()-method and delete it by overriding a TearDown()-method. Since tests with fixtures are common practice, it seemed important to implement a solution for these too.

The final plug-in was tested on the project Libphonenumber that uses the macros TEST (without fixture) and TEST_F (with fixtures). The plug-in was able to convert all test case files at once, fulfilling the first project goal. Fixture classes could also be converted properly. Some problems remained though, preventing the converted project to compile. First, some advanced Googletest constructs couldn’t be converted (in just one test file). Then, the converted project couldn’t resolve some dependencies, since Libphonenumber uses test classes as C++ “friends” whose names were changed during the conversion. A further remaining problem was a type error comparing pointers with ints (the number 0 representing nullptr) that happened to be used several times in Libphonenumber.

Item Type: Thesis (Student Research Project)
Subjects: Topics > Software > Refactoring
Topics > Software > Testing and Simulation
Area of Application > Development Tools
Technologies > Programming Languages > C++
Metatags > IFS (Institute for Software)
Divisions: Bachelor of Science FHO in Informatik > Student Research Project
Depositing User: OST Deposit User
Thesis advisor
Sommerlad, Peter
Date Deposited: 30 Sep 2019 18:17
Last Modified: 30 Sep 2019 18:17

Actions (login required)

View Item
View Item