aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario/scenario_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/scenario/scenario_base.py')
-rw-r--r--src/onaptests/scenario/scenario_base.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/onaptests/scenario/scenario_base.py b/src/onaptests/scenario/scenario_base.py
index ca6d898..f1b4455 100644
--- a/src/onaptests/scenario/scenario_base.py
+++ b/src/onaptests/scenario/scenario_base.py
@@ -47,14 +47,18 @@ class ScenarioBase(testcase.TestCase):
test_phase()
self.result += 50
except OnapTestException as exc:
- self.__logger.exception("%s on %s", exc.error_message, phase_name)
- except SDKException:
- self.__logger.exception("SDK Exception on %s", phase_name)
- except Exception as e:
- self.__logger.exception("General Exception on %s", phase_name)
+ self.__logger.exception("Test Exception %s on %s", str(exc), phase_name)
+ self.__logger.info("ROOT CAUSE")
+ self.__logger.info(exc.root_cause)
+ except SDKException as exc:
+ self.__logger.exception("SDK Exception %s on %s", str(exc), phase_name)
+ self.__logger.info("ROOT CAUSE")
+ self.__logger.info(str(exc))
+ except Exception as exc:
+ self.__logger.exception("General Exception %s on %s", str(exc), phase_name)
if self.general_exception:
- e = ExceptionGroup("General Exceptions", [self.general_exception, e]) # noqa
- self.general_exception = e
+ exc = ExceptionGroup("General Exceptions", [self.general_exception, exc]) # noqa
+ self.general_exception = exc
finally:
self.stop_time = time.time()
self.__logger.info(f"{self.scenario_name} Execution {self.result}% Completed")