[ARVADOS] updated: 5defe6cc7e4a0abdd12d92806b2790f7f485dda6

git at public.curoverse.com git at public.curoverse.com
Tue Dec 9 16:20:22 EST 2014


Summary of changes:
 apps/workbench/Gemfile                           |  3 +++
 apps/workbench/Gemfile.lock                      |  4 +++
 apps/workbench/test/performance/browsing_test.rb | 21 ++++++++++++++-
 apps/workbench/test/performance/search_test.rb   | 34 ++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 apps/workbench/test/performance/search_test.rb

       via  5defe6cc7e4a0abdd12d92806b2790f7f485dda6 (commit)
      from  63f3b6068971a29723fd2b1902a0c71baaffa2f7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5defe6cc7e4a0abdd12d92806b2790f7f485dda6
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Tue Dec 9 16:18:50 2014 -0500

    4754: add rails-perftest and ruby-prof gems to enable performance benchmarking and add search_test.rb

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index f97869b..5870279 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -90,3 +90,6 @@ gem "deep_merge", :require => 'deep_merge/rails_compat'
 
 gem 'morrisjs-rails'
 gem 'raphael-rails'
+
+gem 'rails-perftest'
+gem 'ruby-prof'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index 7575143..d0f38b2 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -170,6 +170,7 @@ GEM
       bundler (>= 1.3.0, < 2.0)
       railties (= 4.1.8)
       sprockets-rails (~> 2.0)
+    rails-perftest (0.0.5)
     railties (4.1.8)
       actionpack (= 4.1.8)
       activesupport (= 4.1.8)
@@ -179,6 +180,7 @@ GEM
     raphael-rails (2.1.2)
     ref (1.0.5)
     ruby-debug-passenger (0.2.0)
+    ruby-prof (0.15.2)
     rubyzip (1.1.6)
     rvm-capistrano (1.5.5)
       capistrano (~> 2.15.4)
@@ -262,8 +264,10 @@ DEPENDENCIES
   piwik_analytics
   poltergeist
   rails (~> 4.1.0)
+  rails-perftest
   raphael-rails
   ruby-debug-passenger
+  ruby-prof
   rvm-capistrano
   sass
   sass-rails (~> 4.0.4)
diff --git a/apps/workbench/test/performance/browsing_test.rb b/apps/workbench/test/performance/browsing_test.rb
index 3fea27b..27b55c4 100644
--- a/apps/workbench/test/performance/browsing_test.rb
+++ b/apps/workbench/test/performance/browsing_test.rb
@@ -1,12 +1,31 @@
+# http://guides.rubyonrails.org/v3.2.13/performance_testing.html
+
 require 'test_helper'
 require 'rails/performance_test_help'
+require 'integration_helper'
+require 'selenium-webdriver'
+require 'headless'
 
 class BrowsingTest < ActionDispatch::PerformanceTest
   # Refer to the documentation for all available options
   # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
   #                          :output => 'tmp/performance', :formats => [:flat] }
 
+  self.profile_options = { :runs => 10,
+                           :metrics => [:wall_time],
+                           :output => 'tmp/performance',
+                           :formats => [:flat] }
+
+  setup do
+    headless = Headless.new
+    headless.start
+    Capybara.current_driver = :selenium
+    Capybara.current_session.driver.browser.manage.window.resize_to(1024, 768)
+  end
+
   def test_homepage
-    get '/'
+    visit page_with_token('active')
+    assert_text 'Dashboard'
+    assert_selector 'a', text: 'Run a pipeline'
   end
 end
diff --git a/apps/workbench/test/performance/search_test.rb b/apps/workbench/test/performance/search_test.rb
new file mode 100644
index 0000000..c84a47b
--- /dev/null
+++ b/apps/workbench/test/performance/search_test.rb
@@ -0,0 +1,34 @@
+# http://guides.rubyonrails.org/v3.2.13/performance_testing.html
+
+require 'test_helper'
+require 'rails/performance_test_help'
+require 'integration_helper'
+require 'selenium-webdriver'
+require 'headless'
+
+class SearchTest < ActionDispatch::PerformanceTest
+  self.profile_options = { :runs => 10,
+                           :metrics => [:wall_time],
+                           :output => 'tmp/performance',
+                           :formats => [:flat] }
+
+  setup do
+    headless = Headless.new
+    headless.start
+    Capybara.current_driver = :selenium
+    Capybara.current_session.driver.browser.manage.window.resize_to(1024, 768)
+  end
+
+  def test_search
+    visit page_with_token('active')
+
+    within('.navbar-fixed-top') do
+      page.find_field('search').set('hash')
+      page.find('.glyphicon-search').click
+    end
+
+    # We should now be in the search dialog. Expect at least one collection in the result display. 
+    assert_text 'Search'
+    assert_text '-8i9sb-'
+  end
+end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list