From 7200442d081d8bf469379a452c7564b5ad427c42 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 31 Aug 2018 12:02:02 +0530 Subject: Fix verify to report debug info Issue-ID: CLI-122 Change-Id: I692bc084280d7c445afdcf649a630814b9f986a0 Signed-off-by: Kanagaraj Manickam k00365106 --- main/src/main/java/org/onap/cli/main/OnapCli.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main') diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index 30f5ab70..de6d232e 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -268,7 +268,9 @@ public class OnapCli { cmd = OnapCommandRegistrar.getRegistrar().get(args.get(0)); OnapCliArgsParser.populateParams(cmd.getParameters(), (List) sampleTest.get(OnapCommandConstants.VERIFY_INPUT)); + this.print("\n***************Test Command: \n" + sampleTest.get(OnapCommandConstants.VERIFY_INPUT).toString()); + cmd.getParametersMap().get(OnapCommandConstants.DEFAULT_PARAMETER_DEBUG).setValue(Boolean.TRUE); Optional contextOpt = cmd.getParameters().stream() .filter(e -> e.getName().equals(OnapCommandConstants.VERIFY_CONTEXT_PARAM)) @@ -301,7 +303,11 @@ public class OnapCli { } else { resultAtt.getValues().add(OnapCommandConstants.VERIFY_RESULT_FAIL); } + this.print(testResult.getDebugInfo()); + this.print("\n***************Expected Output: \n" + expectedOutput); + this.print("\n***************Actual Output: \n" + actualOutput); } + this.print(testSuiteResult.print()); } /** -- cgit 1.2.3-korg