From 6fed4b2460954c3b0484b5605e32bf4d3e70cce8 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Tue, 28 Oct 2014 09:49:35 +1000 Subject: [PATCH] Add class name to test start/end logging --- .../zanata/feature/testharness/ZanataTestCase.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/functional-test/src/test/java/org/zanata/feature/testharness/ZanataTestCase.java b/functional-test/src/test/java/org/zanata/feature/testharness/ZanataTestCase.java index 1044ef01a3..6ac4dc8036 100644 --- a/functional-test/src/test/java/org/zanata/feature/testharness/ZanataTestCase.java +++ b/functional-test/src/test/java/org/zanata/feature/testharness/ZanataTestCase.java @@ -59,9 +59,15 @@ public class ZanataTestCase { public DateTime testFunctionStart; + private String getTestDescription() { + return this.getClass().getCanonicalName() + .concat(".") + .concat(testName.getMethodName()); + } + @Before public void testEntry() { - log.info("Starting " + testName.getMethodName()); + log.info("Starting ".concat(getTestDescription())); testFunctionStart = new DateTime(); } @@ -69,7 +75,8 @@ public void testEntry() { public void testExit() { Duration duration = new Duration(testFunctionStart, new DateTime()); PeriodFormatter periodFormatter = new PeriodFormatterBuilder() - .appendLiteral("Finished " + testName.getMethodName() + " in " ) + .appendLiteral("Finished " + .concat(getTestDescription()).concat(" in " )) .printZeroAlways() .appendMinutes() .appendSuffix(" minutes, ")