summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-01-06 11:36:35 +0100
committerNavaL <mnandri@thoughtworks.com>2016-01-06 11:36:35 +0100
commite00701a3d204f3c0120d1e6a6832054e84dc9577 (patch)
tree6bdd6aaf27d24eb65304618c9ed0df9c729c25f9 /service
parent17695c1c9037d9edc927fb5265d380384eb6866a (diff)
moving screenshots to a different folder -- to be saved as artifacts in snap
Diffstat (limited to 'service')
-rw-r--r--service/screenshots/.gitkeep0
-rw-r--r--service/test/functional/features/environment.py3
2 files changed, 3 insertions, 0 deletions
diff --git a/service/screenshots/.gitkeep b/service/screenshots/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/service/screenshots/.gitkeep
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py
index 53b13047..a41329dd 100644
--- a/service/test/functional/features/environment.py
+++ b/service/test/functional/features/environment.py
@@ -25,6 +25,7 @@ from selenium import webdriver
from pixelated.resources.features_resource import FeaturesResource
from steps.common import *
+import os
setup()
@@ -62,8 +63,10 @@ def before_feature(context, feature):
def after_step(context, step):
if step.status == 'failed':
id = str(uuid.uuid4())
+ os.chdir("screenshots")
context.browser.save_screenshot('failed ' + str(step.name) + '_' + id + ".png")
save_source(context, 'failed ' + str(step.name) + '_' + id + ".html")
+ os.chdir("../")
def after_feature(context, feature):