[[TableOfContents]]

= MFC TestRunner =

Here is a screenshot of the MFC based TestRunner:

attachment:mfctestrunner.png

The following documentation pages have more information:
 * http://cppunit.sourceforge.net/doc/lastest/_mfc_test_runner_8h-source.html
 * http://cppunit.sourceforge.net/doc/lastest/class_mfc_test_runner.html

== Microsoft Visual C++ 6.0 ==

The following page contains a good overview of the step required to build an MFC based test project:
http://www.codeproject.com/library/Using_CPPUnit.asp -- BaptisteLepilleur

In case that page goes down, here are the basic steps (please flesh them out if you have MSVC 6.0!):
 * Follow the INSTALL-WIN32.txt instructions to get the libraries built
 * Create a new MFC Application
  * Dialog based (since that appears to be the most minimal)
  * Use MFC in a shared DLL
  * Disable (almost) everything else, since it will probably be thrown out.
 * Try compiling and running, to make sure there are no issues.
 * Add cppunit.lib and testrunner.lib (or the debug versions, cppunitd.lib and testrunnerd.lib) to your Linker dependencies.  These are in the /lib folder.
 * Modify the CWin``App-derived class's Init``Instance  to call the MfcTestRunner, such as: {{{#!cplusplus

#include <cppunit/ui/mfc/MfcTestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>

BOOL CMyMFCApp::InitInstance()
{
	CWinApp::InitInstance();

	CppUnit::MfcTestRunner runner;
	runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
	runner.run();    

	return FALSE;
}
}}}

== Microsoft Visual C++ 7.0 ==
In 1.10.2, the test runner works, but the DSPlug``In doesn't.  This means that you get the pretty graphical test run, test selection, etc., but clicking on the error will not jump to the code.  
It appears that the test runner runs the whole suite twice as well, but that may just be my code.

However, 1.10.4 (as of March 2005, the CVS version) has a version that works, without a plugin, in MSVC 7.0:

http://cvs.sourceforge.net/viewcvs.py/cppunit/cppunit/NEWS?rev=HEAD

== Dead Instructions ==
''Someday, someone will be bold enough to delete this.  Is that person you?''

My notes while playing with CppUnit in Visual Studio .NET 2003 can be found at:
http://www.componentsnotebook.com/agilehacker/blog.html#CppUnit

 > Thank you for that blog entry! It was very helpful to me after 5+ hours reading around online and in the CppUnit documentation. Using your instructions (and what I'd learned about CppUnit in general) I was able to integrate the CppUnitTestApp into my solution (in VS.NET 2003). - Darren Torpey; July 6th, 2004 

The link to the notes seems to be dead. Would you please check this? best regards Stefan Rauch, Feb. 28th, 2005

It's dead for me too, nothing in the Google cache, and the Wayback machine says the site died over a year ago.  I'll try to get it running on my box, and see if I can create some instructions.  If you have some in your back pocket, please post them here -- JohnWhitlock [[DateTime(2005-02-28T19:28:13Z)]]

Seems to be back up again.  I've archived it in case it dies again.  -- MikeHigginbottom [[DateTime(2005-05-14T23:26:00Z)]]

My hosting provider was hacked, after 2 weeks they still didn't have their DNS fixed so I switched to new provider.  I intend to keep that link active, & hopefully update the information. -- Bill Burris [[DateTime(2005-05-25T11:11:00Z)]]

[[http://www.hospitalonline.cn/qiuzhen/yjbt.htm 月经不调]][[http://eden.fx120.net/xabd/index.htm 性]][[http://www.hospitalonline.cn/qiuzhen/yjbtdzl.htm 月经不调的治疗]][[http://eden.fx120.net/xyjb/azbzt/index.htm 艾滋病]]
[[http://eden.fx120.net/xyjb/lb/index.htm 淋病]][[http://eden.fx120.net/rlxz/index.htm 写真]][[http://eden.fx120.net/lxzt/weige/index.htm 伟哥]][[http://www.hospitalonline.cn/qiuzhen/yjbtzl.htm 月经不调治疗]]
[[http://www.hospitalonline.cn/qiuzhen/yjbzc.htm 月经不正常]][[http://www.hospitalonline.cn/qiuzhen/ywzx.htm 阳萎早泄]][[http://www.hospitalonline.cn/qiuzhen/zgxjz.htm 子宫腺肌症]][[http://www.hospitalonline.cn/qiuzhen/bpl.htm 不排卵]][[http://www.hospitalonline.cn/qiuzhen/bsj.htm 不射精]][[http://www.hospitalonline.cn/qiuzhen/zllcnz.htm 治疗卵巢囊肿]]
[[http://www.hospitalonline.cn/qiuzhen/zlpqy.htm 治疗盆腔炎]][[http://www.hospitalonline.cn/qiuzhen/zltj.htm 治疗痛经]][[http://www.hospitalonline.cn/qiuzhen/zlyjbt.htm 治疗月经不调]][[http://www.hospitalonline.cn/qiuzhen/zlzx.htm 治疗早泄]]
[[http://www.hospitalonline.cn/qiuzhen/zxdzl.htm 早泄的治疗]][[http://www.hospitalonline.cn/qiuzhen/zxzl.htm 早泄治疗]][[http://www.hospitalonline.cn/qiuzhen/zyzlnfmst.htm 怎样治疗内分泌失调]][[http://www.hospitalonline.cn/youyu/wjz.htm 无精症]]
[[http://www.hospitalonline.cn/youyu/sy.htm  生育]][[http://eden.fx120.net/xyjb/yfybj/200502011010259039.htm 性病]][[http://www.fx120.net/yh/medicine.htm 医学]][[http://qiuyi.fx120.net/fdoctor/index.htm 医生]][[http://www.fx120.net/JBZT/JB-CRB/fnbl/index.htm 疯牛病]]
[[http://www.fx120.net/news/news-zt/rdzt-SARS/index.htm 非典]][http://www.fx120.net/JBZT/ZHONGL-/SHIGUAN/index.htm 食管癌][[http://www.fx120.net/JBZT/NK-1/XHK-1/GA-1/index.htm 肝癌]][[http://www.fx120.net/JBZT/ZHONGL-/FEIAI/index.htm 肺癌]][[http://www.fx120.net/mrss/index.htm 美容]][[http://www.fx120.net/yh/medicine1.htm 医药]]
[[http://mymy.fx120.com/hos/index.htm 医院]][[http://www.fx120.net/yh/health.htm 健康]][[http://eden.fx120.net/xabd/index.htm 处女]][[http://www.dudoctor.com/zonghe.html 整形]][[http://www.dudoctor.com/Environment.html 美容]]
