aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario/clearwater_ims.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/scenario/clearwater_ims.py')
-rw-r--r--src/onaptests/scenario/clearwater_ims.py34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/onaptests/scenario/clearwater_ims.py b/src/onaptests/scenario/clearwater_ims.py
index 83a654e..0177e02 100644
--- a/src/onaptests/scenario/clearwater_ims.py
+++ b/src/onaptests/scenario/clearwater_ims.py
@@ -29,19 +29,27 @@ class ClearwaterIms(testcase.TestCase):
"""Run vIMS test."""
self.start_time = time.time()
self.__logger.debug("start time")
- self.test.execute()
- self.__logger.info("VNF clearwater IMS successfully created")
- self.stop_time = time.time()
- # The cleanup is part of the test, not only a teardown action
- if settings.CLEANUP_FLAG:
- self.__logger.info("VNF clearwater IMS cleanup called")
- time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
- self.test.cleanup()
- self.result = 100
- else:
- self.__logger.info("No cleanup requested. Test completed.")
- self.result = 100
+ try:
+ self.test.execute()
+ self.__logger.info("VNF clearwater IMS successfully created")
+ # The cleanup is part of the test, not only a teardown action
+ if settings.CLEANUP_FLAG:
+ self.__logger.info("VNF clearwater IMS cleanup called")
+ time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
+ self.test.cleanup()
+ self.result = 100
+ else:
+ self.__logger.info("No cleanup requested. Test completed.")
+ self.result = 100
+ self.stop_time = time.time()
+ except:
+ self.__logger.error("Clearwater IMS test case failed.")
+ self.result = 0
+ self.stop_time = time.time()
def clean(self):
"""Clean Additional resources if needed."""
- pass
+ try:
+ self.test.reports_collection.generate_report()
+ except:
+ self.__logger.error("Impossible to generate reporting")