Browse Source

Timing-output in Tab corrected (also for TestSteps)

bernhardbuhl 4 years ago
parent
commit
a8a570d0a2
2 changed files with 12 additions and 5 deletions
  1. 5 2
      baangt/TestSteps/TestStepMaster.py
  2. 7 3
      baangt/base/ExportResults/ExportResults.py

+ 5 - 2
baangt/TestSteps/TestStepMaster.py

@@ -37,6 +37,8 @@ class TestStepMaster:
             # in the TestExecutionSteps
             self.executeDirect(lTestStep[1][GC.STRUCTURE_TESTSTEPEXECUTION])
 
+        self.teardown()
+
     def executeDirect(self, executionCommands):
         """
         This will execute single Operations directly
@@ -254,7 +256,7 @@ class TestStepMaster:
             raise BaseException(f"Comparison Operator not supported/unknown {lComparison}")
 
     def execute(self):
-        """Method is overwritten in all children"""
+        """Method is overwritten in all children/subclasses"""
         pass
 
     def teardown(self):
@@ -268,7 +270,8 @@ class TestStepMaster:
                 self.testcaseDataDict = GC.TESTCASESTATUS_ERROR
             else:
                 sys.exit("No idea, what happened here. Unknown condition appeared")
-        self.timing.takeTime(self.timingName)   # Why does this not work?
+
+        self.timing.takeTime(self.timingName)
 
     def replaceVariables(self, expression):
         """

+ 7 - 3
baangt/base/ExportResults/ExportResults.py

@@ -461,7 +461,7 @@ class ExportTiming:
                 for column, key in enumerate(self.sections.keys(),1):
                     if key == section:
                         self.wc(tcNumber, column,
-                                ExportTiming.shortenTimingValue(timingValue[GC.TIMING_DURATION]))
+                                timingValue[GC.TIMING_DURATION])
                         continue
 
     @staticmethod
@@ -506,7 +506,11 @@ class ExportTiming:
         Warten auf Senden an Bestand Button: , since last call: 1.3927149772644043
         Senden an Bestand: , since last call: 9.60469913482666, ZIDs:[66b12fa4869cf8a0, ad1f3d47c4694e26], TS:2020-01-20 21:58:49.472288
 
-        where the first part before ":" is the section, "since last call:" is the duration, TS: is the timestamp"""
+        where the first part before ":" is the section, "since last call:" is the duration, TS: is the timestamp
+
+        Update 29.3.2020: Format changed to "since last call: 00:xx:xx,", rest looks identical.
+        """
+        # Todo: Double-check for VIG, why it works there in the old format while for baangtIA it shows new format!
         lExport = {}
         lLines = lTimeLog.split("\n")
         for line in lLines:
@@ -518,7 +522,7 @@ class ExportTiming:
                 continue
             else:
                 lSection = parts[0].replace(":","").strip()
-                lDuration = parts[1].split(":")[1]
+                lDuration = parts[1].split("since last call: ")[1]
                 lExport[lSection] = {GC.TIMING_DURATION: lDuration}
         return lExport