Opened 7 years ago
Closed 6 years ago
#11845 closed Feature Requests (fixed)
Ability to generate the unique and stable test name for every data set in BOOST_DATA_TEST_CASE
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.62.0 | Component: | test |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
here.
Change History (11)
comment:1 by , 7 years ago
Version: | Boost 1.59.0 → Boost 1.61.0 |
---|
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.61.0 |
---|---|
Version: | Boost 1.61.0 → Boost 1.59.0 |
comment:3 by , 7 years ago
Milestone: | Boost 1.61.0 → Boost 1.62.0 |
---|
comment:5 by , 6 years ago
Owner: | changed from | to
---|
comment:6 by , 6 years ago
Status: | new → assigned |
---|
comment:8 by , 6 years ago
Milestone: | Boost 1.62.0 → Boost 1.63.0 |
---|---|
Resolution: | fixed |
Severity: | Problem → Regression |
Status: | closed → reopened |
Type: | Feature Requests → Bugs |
Version: | Boost 1.59.0 → Boost 1.62.0 |
I was very upset when have seen the result. There is no more test name! I got numbers from 0 to 74 for my 7 data case tests in one test suite. There is more ability to understand which test was failed! Could you please return the test name back and keep numbers? But please make separate numeration for each data case test! This is very important!
comment:9 by , 6 years ago
Sorry for mistake: There is NO more ability to understand which test was failed!
comment:10 by , 6 years ago
Milestone: | Boost 1.63.0 → Boost 1.62.0 |
---|---|
Severity: | Regression → Problem |
Type: | Bugs → Feature Requests |
Version: | Boost 1.62.0 → Boost 1.59.0 |
I'm very very sorry. I haven't seen that you create virtual test suite with test name. Unfortunately, I can't close the ticket. Could you please close it again?
comment:11 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Hi,
Next time I suggest you read the change log more carefully. Thanks.
Each data test case now has its own name:
Currently on develop and master (rev a8fa08b9b78516b78458ecb8b005d520a0c173f7)