for automated software tests I would recommend the Google test. There is a very good q & a on this platform, which you can find here.
In addition, there is CPPUnitLite, which was developed by the author of Effective Work with Obsolete Code , Michael Pers.
I used AutoIt scripts to test the MFC application just a little, but it was not so easy to maintain them properly and create an efficient logging system for failed tests.
However, unit tests depend heavily on the architecture of your program and the structure of your class — especially on dependencies on other components / classes. Therefore, if you already have an existing MFC application that was not built with unit tests in mind, you will probably have to reorganize a lot of things. Therefore, I would recommend this book. You can also use the classic Martin Fowler Refactoring .
source share