googletest
googletest copied to clipboard
[FR]: Can millisecond data be added to the timestamp information in the output XML file?
Does the feature exist in the most recent commit?
Currently, the timestamp is only precise to the second level. Can millisecond data be added?
Why do we need this feature?
The test case runs too quickly, and the time precision at the second level is insufficient, making it difficult to find the corresponding log of the tested application using this time.
Describe the proposal.
change to 2025-06-25T20:54:29.123
%Y-%m-%dT%H:%M:%S.%f
Is the feature specific to an operating system, compiler, or build system version?
no
Hi, it seems that this enhancement is already implemented at commit af1e75ce0b3429d70790c049d8dbb0aae3e2480f by Abseil Team. After compiling googletest and running the following basic test program with the xml output flag
#include <gtest/gtest.h>
TEST(SampleTest, BasicAssertion) {
EXPECT_EQ(1, 1);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
<!-- Failed to upload "sample_test.cpp" -->
return RUN_ALL_TESTS();
}
it results in the file report.xml which content have now datetime with milliseconds resolution.
I suggest to close this issue.