Setting up boost unit testing visual studio project

1. Header

#define BOOST_TEST_MODULE TestExample
using namespace boost::unit_test;

2. Linked library


3. Global fixture

struct TestGlobalInitFixture
		BOOST_TEST_MESSAGE("### Global initialization for testing ###");

		BOOST_TEST_MESSAGE("### Global deinitialization for testing ###");

4. Fixture

struct BuisnessLogicTestSuiteFixture


BOOST_FIXTURE_TEST_SUITE(TestSuite_BusinessLogic, BuisnessLogicTestSuiteFixture)

5. Test case example


6. run a specific test case example


7. change log level

--result_code=no --report_level=no
This entry was posted in C++, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s