Commit 9caeaa99 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-sc/gitlab-ci-artifacts' into 'dev'

gitlab-ci; upload artifact when failed

See merge request !805
parents 91d818ed 9e0b9bb9
Pipeline #185676 failed with stages
in 9 minutes and 4 seconds
......@@ -189,6 +189,7 @@ test_browser_unit:
artifacts:
paths:
- browser/
when: always
only:
- /^feature-.*c.*\/.*$/
- /^hotfix-.*c.*\/.*$/
......@@ -208,7 +209,8 @@ test_browser_unit:
- HEADLESS=1 make -C browser/test functional
artifacts:
paths:
- browser/
- browser/
when: always
reports:
junit: browser/test/test/TEST-*.xml
only:
......@@ -235,6 +237,7 @@ test_browser_unit:
artifacts:
paths:
- browser/
when: always
reports:
junit: browser/test/test/TEST-*.xml
only:
......
......@@ -119,4 +119,17 @@ class BrowserTest < MiniTest::Test
end
end
def teardown
#Save image if test fails
unless passed?
#Where to save the image and the file name
folder_path = File.expand_path(File.dirname(__FILE__))
folder_path.sub! '/functional', ''
screenshot_file = folder_path+"/screenshot_teardown_#{Time.now.strftime('%Y%m%d-%H%M%S')}.png"
#Save the image
$b.screenshot.save screenshot_file
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment