summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):