[Git][noosfero/noosfero][master] travis: upload snapshots of failing selenium scenarios

Bráulio Bhavamitra gitlab at mg.gitlab.com
Sat Mar 12 11:50:25 BRT 2016


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
b03d4c32 by Braulio Bhavamitra at 2016-03-12T11:49:45-03:00
travis: upload snapshots of failing selenium scenarios

- - - - -


2 changed files:

- .travis.yml
- + features/support/snapshot.rb


Changes:

=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:


=====================================
features/support/snapshot.rb
=====================================
--- /dev/null
+++ b/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



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/b03d4c32d31cddc2664940da69dd8e4ad2b73ab2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160312/fb954998/attachment.html>


More information about the Noosfero-dev mailing list