Add a timer for each e2e test
This commit is contained in:
@@ -333,6 +333,8 @@ class BiboumiTest:
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
start_datetime = datetime.datetime.now()
|
||||||
|
|
||||||
# Start the XMPP component and biboumi
|
# Start the XMPP component and biboumi
|
||||||
biboumi = BiboumiRunner(self.scenario.name)
|
biboumi = BiboumiRunner(self.scenario.name)
|
||||||
xmpp = XMPPComponent(self.scenario, biboumi)
|
xmpp = XMPPComponent(self.scenario, biboumi)
|
||||||
@@ -344,13 +346,16 @@ class BiboumiTest:
|
|||||||
code = asyncio.get_event_loop().run_until_complete(biboumi.wait())
|
code = asyncio.get_event_loop().run_until_complete(biboumi.wait())
|
||||||
xmpp.biboumi = None
|
xmpp.biboumi = None
|
||||||
self.scenario.steps.clear()
|
self.scenario.steps.clear()
|
||||||
|
|
||||||
|
delta = datetime.datetime.now() - start_datetime
|
||||||
|
|
||||||
failed = False
|
failed = False
|
||||||
if not xmpp.failed:
|
if not xmpp.failed:
|
||||||
if code != self.expected_code:
|
if code != self.expected_code:
|
||||||
xmpp.error("Wrong return code from biboumi's process: %d" % (code,))
|
xmpp.error("Wrong return code from biboumi's process: %d" % (code,))
|
||||||
failed = True
|
failed = True
|
||||||
else:
|
else:
|
||||||
print("[32;1mSuccess![0m")
|
print("[32;1mSuccess![0m ({}s)".format(round(delta.total_seconds(), 2)))
|
||||||
else:
|
else:
|
||||||
failed = True
|
failed = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user