Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
9caeaa99
Commit
9caeaa99
authored
Nov 11, 2020
by
Mathieu Giraud
Browse files
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9caeaa99
...
...
@@ -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
:
...
...
browser/test/functional/browser_test.rb
View file @
9caeaa99
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment