[Boost-bugs] [Boost C++ Libraries] #11845: Ability to generate the unique and stable test name for every data set in BOOST_DATA_TEST_CASE

Subject: [Boost-bugs] [Boost C++ Libraries] #11845: Ability to generate the unique and stable test name for every data set in BOOST_DATA_TEST_CASE
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-14 17:40:43


#11845: Ability to generate the unique and stable test name for every data set in
BOOST_DATA_TEST_CASE
------------------------------+---------------------
 Reporter: mikhail@… | Owner: rogeeff
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 Ability to generate the unique and stable test name for every data item in
 BOOST_DATA_TEST_CASE.

 In this example will be run 3 tests with name "T":
 {{{
 BOOST_DATA_TEST_CASE(TTT, std::vector<char const *>({"A", "B", "C"}), PPP)
 {
 }
 }}}
 There is no way to understand which parameter `PPP` was used for every
 test until test will be failed (our case is `log_level::log_test_units`,
 because `log_level::log_successful_tests` generate too many unnecessary
 messages).

 Output for `log_level::log_test_units`:
 {{{
 Entering test case "TTT"
 Leaving test case "TTT"; testing time: 1ms
 Entering test case "TTT"
 Leaving test case "TTT"; testing time: 1ms
 Entering test case "TTT"
 Leaving test case "TTT"; testing time: 1ms
 }}}

 Almost all continues integration tools can collect test statistics by its
 name. But `test_unit_start()/test_unit_finish()` from
 `boost::unit_test::unit_test_log_formatter` has no test data and has no
 access to the test context. It means that continues integration tools can
 receive only the information about test `TTT` which was run 3 times. It's
 not truth.

 It's possible to inject test name customizer for `m_tc_name`
 [https://github.com/boostorg/test/blob/9dead6da674e919710e670a75e9d23805842a415/include/boost/test/data/test_case.hpp#L102
 here].

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11845>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC