I am written unit tests using google test in C++. I have following output shown, which is quite difficult to interpret. Is there is way in google test settings in framework or any design idea how to get results output in write format. Note: I want logs to print in original functions which are tested with google test while executing in real time at customer site for debugging purpose.
Any inputs or suggestions are helpful.
Thanks in advance for your time.
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv); // This allows the user to override the flag on the command line.
return RUN_ALL_TESTS();
}
[==========] Running 8 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 4 tests from ConfigDataContainerTest
[ RUN ] ConfigDataContainerTest.CheckNumberOfPortsConfigured
I 2019-10-19 11:30:28.813 [INF_LOGGING](10692/13916) LoggerWork Logging started...[ OK ] ConfigDataContainerTest.CheckNumberOfPortsConfigured (47 ms)
[ RUN ] ConfigDataContainerTest.CheckPortDataIsReadCorreclty
[ OK ] ConfigDataContainerTest.CheckPortDataIsReadCorreclty (0 ms)
[ RUN ] ConfigDataContainerTest.CheckWrongPortIDReturnsNull
I 2019-10-19 11:30:28.813 [INF_COMMON](10692/3300) BuildVersion: 20190314.9239[ OK ] ConfigDataContainerTest.CheckWrongPortIDReturnsNull
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:0, destructor called (0 ms)
[ RUN ] ConfigDataContainerTest.RemovePortObjWithGivenPortID
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:0, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) Number of configured ports are: 2
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:1, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:2, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:1, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:2, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:0, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:1, destructor called
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:2, destructor called [ OK ] ConfigDataContainerTest.RemovePortObjWithGivenPortID (0 ms)
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) Number of configured ports are: 2 [----------] 4 tests from ConfigDataContainerTest (47 ms total)
[----------] 4 tests from ConfigDataParserFileTest
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:1, destructor called [ RUN ] ConfigDataParserFileTest.ConfigFilesPresent
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) Number of configured ports are: 1 [ OK ] ConfigDataParserFileTest.ConfigFilesPresent (0 ms)
[ RUN ] ConfigDataParserFileTest.ConfigFilesNotPresent
[ OK ] ConfigDataParserFileTest.ConfigFilesNotPresent (0 ms)
[ RUN ] ConfigDataParserFileTest.ConfigDataAccordingToSchema
[ OK ] ConfigDataParserFileTest.ConfigDataAccordingToSchema (0 ms)
[ RUN ] ConfigDataParserFileTest.ConfigDataParsedCorrectly
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:0, destructor called [ OK ] ConfigDataParserFileTest.ConfigDataParsedCorrectly (0 ms)
[----------] 4 tests from ConfigDataParserFileTest (0 ms total)
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~Port portID:2, destructor called [----------] Global test environment tear-down
[==========] 8 tests from 2 test cases ran. (47 ms total)
[ PASSED ] 8 tests.
I 2019-10-19 11:30:28.813 [APPS_ModbusTCPSigTrans](10692/3300) ~ConfigDataContainer, destructor called
Aucun commentaire:
Enregistrer un commentaire