catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
teamcity reporter should time durations explicitly
- Commit
3afd077b554779607ed8ccbf34c365eb73ba460d- Author
- Alex Glyde ·
- Parents
e95bf48445f6
Changes
include/reporters/catch_reporter_teamcity.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/reporters/catch_reporter_teamcity.hpp b/include/reporters/catch_reporter_teamcity.hpp index 1e633f1d..12403f07 100644 --- a/include/reporters/catch_reporter_teamcity.hpp +++ b/include/reporters/catch_reporter_teamcity.hpp @@ -148,6 +148,7 @@ namespace Catch { } virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE { + testTimer.start(); StreamingReporterBase::testCaseStarting( testInfo ); stream << "##teamcity[testStarted name='" << escape( testInfo.name ) << "']\n"; @@ -164,7 +165,8 @@ namespace Catch { << escape( testCaseStats.testInfo.name ) << "' out='" << escape( testCaseStats.stdErr ) << "']\n"; stream << "##teamcity[testFinished name='" - << escape( testCaseStats.testInfo.name ) << "']\n"; + << escape( testCaseStats.testInfo.name ) << "' duration='" + << testTimer.getElapsedMilliseconds() << "']\n"; } private: @@ -203,7 +205,7 @@ namespace Catch { } private: bool m_headerPrintedForThisSection; - + Timer testTimer; }; #ifdef CATCH_IMPL