Skip to content

Commit

Permalink
travis: upload snapshots of failing selenium scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliobo committed Mar 12, 2016
1 parent 5386b39 commit b03d4c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -24,6 +24,9 @@ addons:
- libreadline-dev
- libsqlite3-dev
- libxslt1-dev
artifacts:
paths:
- $(ls tmp/artifact* | tr "\n" ":")

# workaround for https://github.com/travis-ci/travis-ci/issues/4536
before_install:
Expand Down
9 changes: 9 additions & 0 deletions features/support/snapshot.rb
@@ -0,0 +1,9 @@

After do |scenario|
if scenario.failed?
if ENV['TRAVIS']
build = ENV['TRAVIS_BUILD_NUMBER']
page.driver.save_screenshot "./tmp/artifact-travis-#{build}-#{scenario.name.parameterize}.png"
end
end
end

0 comments on commit b03d4c3

Please sign in to comment.