Reputation: 20643
I have a couple of MFC applications. I don't want to unit-test UI but test all logics in the application for TDD. According to my research, I found two ways
I was almost sold to MSTest approach but changed my mind after reading comments on a blog about it. I want to spend my time to debug my application but not my tests for the application.
I am sure there are a lot of developers who are practicing TDD in C++. I would like to hear from them which way above is a good practice.
Upvotes: 2
Views: 296
Reputation: 2079
I would suggest looking into Catch (C++ Adaptive Test Cases in Headers). Since it is header based it is very easy to get started with. In my experience it is also very easy to work with and I find that I write tests much faster in Catch than any other framework I have tried so far. The following blog post by the author is a very good starting point: Unit Testing in C++ and Objective-C just got easier.
Upvotes: 0
Reputation: 141
The Google C++ testing framework is well worth looking into, I've used it on a number of projects. You should be able to mock the UI classed you don't want to use.
Upvotes: 4