
Does anyone know how to use boost test library with MFC programs? All the examples & documentation only covers CONSOLE programs. Would be good if there was an MFC example.

Andrew Wan
Does anyone know how to use boost test library with MFC programs?
All the examples & documentation only covers CONSOLE programs.
Would be good if there was an MFC example.
Is it still alive? ;o) You can use Boost.Test in setup like this you you use shared version library variant and invoke unit test runner manually from the WinMain somewhere. It's possible to do the same with other variants, but may require a bit more explaining. Gennadiy

I have a massive MFC app that uses a username/password login system.
I managed to get something in the main app ::InitInstance function. I want
to start running the test suite/cases AFTER logging into the system.
TestCases such as create/delete folder, etc.
I understand that TestUnits are suppose to be testing individual units
(class objects) functionality. This is a bit program in my massive MFC app
where everything depends on everything else. I guess what am looking for is
integration testing. My main app is already instantiated and the test runner
runs within the main app. Is it possible to execute commands (create/delete
folder) to do integration testing... and add them into the testsuite/runner?
"Gennadiy Rozental"
Andrew Wan
writes: Does anyone know how to use boost test library with MFC programs?
All the examples & documentation only covers CONSOLE programs.
Would be good if there was an MFC example.
Is it still alive? ;o)
You can use Boost.Test in setup like this you you use shared version library variant and invoke unit test runner manually from the WinMain somewhere. It's possible to do the same with other variants, but may require a bit more explaining.
Gennadiy

Andrew Wan wrote:
I have a massive MFC app that uses a username/password login system.
I managed to get something in the main app ::InitInstance function. I want to start running the test suite/cases AFTER logging into the system. TestCases such as create/delete folder, etc.
I understand that TestUnits are suppose to be testing individual units (class objects) functionality. This is a bit program in my massive MFC app where everything depends on everything else. I guess what am looking for is integration testing. My main app is already instantiated and the test runner runs within the main app. Is it possible to execute commands (create/delete folder) to do integration testing... and add them into the testsuite/runner?
Not sure I follow what you are saying, but it *is* possible to invoke unit_test_main() from your own main or any other point in your application. You will need to use dynamic library variant of UTF. Let me know if you have any problems with this approach. Gennadiy
participants (2)
-
Andrew Wan
-
Gennadiy Rozental