boost::unit_test::framework::current_test_case_id — This function provides an access to an id of the test case currently being executed.
// In header: <boost/test/framework.hpp> test_unit_id current_test_case_id();
This function safer than current_test_case, cause if wont throw if no test case is being executed.
See Also:
current_test_case