how to write UnitTest for a class derived from MFC class like CWinApp?
-
Hi, I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application. I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility. Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle? Kindly help me out. Thanks in advance :)
-
Hi, I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application. I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility. Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle? Kindly help me out. Thanks in advance :)
Since nobody answered so far... I've looked around some time ago, and found that almost all frameworks available for Windows require .NET, or at least managed C++. One of the few that doesn't is WinUnit: It requires some work for you (creating test classes for each class to test), but otherwise saves a lot of work by extracting the test cases directly from the binaries. I haven't yet tried it out myself because it wasn't really what I required, but it may be useful for your purposes. Should be easy enuogh to google for, and IIRC the documentation even contains references of alternate solutions.