testability-driver-runner 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. data/bin/sierra +19 -0
  2. data/bin/tdrunner +17 -0
  3. data/lib/tdrunner.rb +208 -0
  4. data/lib/tdrunner.yml +1 -0
  5. data/lib/tdrunner_cucumber.rb +222 -0
  6. data/lib/tdrunner_cucumber_runners.rb +35 -0
  7. data/lib/tdrunner_file_finder.rb +45 -0
  8. data/lib/tdrunner_monitor.rb +473 -0
  9. data/lib/tdrunner_profile.rb +416 -0
  10. data/lib/tdrunner_test_unit.rb +433 -0
  11. data/rakefile +135 -0
  12. data/readme +186 -0
  13. data/websi/README +243 -0
  14. data/websi/Rakefile +10 -0
  15. data/websi/app/controllers/application_controller.rb +29 -0
  16. data/websi/app/controllers/report_editor/test_run/cases_controller.rb +307 -0
  17. data/websi/app/controllers/report_editor_controller.rb +25 -0
  18. data/websi/app/controllers/websi_controller.rb +478 -0
  19. data/websi/app/controllers/websi_script.rb +26 -0
  20. data/websi/app/controllers/websi_support.rb +142 -0
  21. data/websi/app/helpers/application_helper.rb +22 -0
  22. data/websi/app/helpers/report_editor/report_editor_helper.rb +26 -0
  23. data/websi/app/helpers/report_editor/test_run/cases_helper.rb +26 -0
  24. data/websi/app/helpers/websi_helper.rb +21 -0
  25. data/websi/app/views/layouts/application.rhtml +17 -0
  26. data/websi/app/views/websi/execution.html.erb +28 -0
  27. data/websi/app/views/websi/index.html.erb +23 -0
  28. data/websi/app/views/websi/profile.html.erb +30 -0
  29. data/websi/app/views/websi/results.html.erb +30 -0
  30. data/websi/app/views/websi/tests.html.erb +23 -0
  31. data/websi/app/views/websi/weights.html.erb +16 -0
  32. data/websi/config/boot.rb +129 -0
  33. data/websi/config/database.yml +22 -0
  34. data/websi/config/environment.rb +60 -0
  35. data/websi/config/environments/development.rb +36 -0
  36. data/websi/config/environments/production.rb +47 -0
  37. data/websi/config/environments/test.rb +47 -0
  38. data/websi/config/initializers/backtrace_silencers.rb +26 -0
  39. data/websi/config/initializers/inflections.rb +29 -0
  40. data/websi/config/initializers/mime_types.rb +24 -0
  41. data/websi/config/initializers/new_rails_defaults.rb +40 -0
  42. data/websi/config/initializers/session_store.rb +34 -0
  43. data/websi/config/locales/en.yml +5 -0
  44. data/websi/config/routes.rb +62 -0
  45. data/websi/db/development.sqlite3 +0 -0
  46. data/websi/db/seeds.rb +26 -0
  47. data/websi/doc/README_FOR_APP +2 -0
  48. data/websi/log/development.log +0 -0
  49. data/websi/log/production.log +0 -0
  50. data/websi/log/server.log +0 -0
  51. data/websi/log/test.log +0 -0
  52. data/websi/public/report_editor/test_run/_index.html +12 -0
  53. data/websi/public/robots.txt +5 -0
  54. data/websi/public/stylesheets/tdriver_report_style.css +220 -0
  55. data/websi/public/tests/config/web_profile.sip +0 -0
  56. data/websi/public/tests/example_profile.sip +8 -0
  57. data/websi/public/tests/tdrunner.yml +3 -0
  58. data/websi/public/tests/web_profile.sip +8 -0
  59. data/websi/public/tests/websi_parameters.xml +4 -0
  60. data/websi/script/about +4 -0
  61. data/websi/script/console +3 -0
  62. data/websi/script/dbconsole +3 -0
  63. data/websi/script/destroy +3 -0
  64. data/websi/script/generate +3 -0
  65. data/websi/script/performance/benchmarker +3 -0
  66. data/websi/script/performance/profiler +3 -0
  67. data/websi/script/plugin +3 -0
  68. data/websi/script/runner +3 -0
  69. data/websi/script/server +3 -0
  70. data/websi/test/functional/websi_controller_test.rb +27 -0
  71. data/websi/test/performance/browsing_test.rb +28 -0
  72. data/websi/test/test_helper.rb +57 -0
  73. data/websi/test/unit/helpers/websi_helper_test.rb +23 -0
  74. metadata +199 -0
@@ -0,0 +1,129 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Don't change this file!
21
+ # Configure your app in config/environment.rb and config/environments/*.rb
22
+
23
+ RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
24
+
25
+ module Rails
26
+ class << self
27
+ def boot!
28
+ unless booted?
29
+ preinitialize
30
+ pick_boot.run
31
+ end
32
+ end
33
+
34
+ def booted?
35
+ defined? Rails::Initializer
36
+ end
37
+
38
+ def pick_boot
39
+ (vendor_rails? ? VendorBoot : GemBoot).new
40
+ end
41
+
42
+ def vendor_rails?
43
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
44
+ end
45
+
46
+ def preinitialize
47
+ load(preinitializer_path) if File.exist?(preinitializer_path)
48
+ end
49
+
50
+ def preinitializer_path
51
+ "#{RAILS_ROOT}/config/preinitializer.rb"
52
+ end
53
+ end
54
+
55
+ class Boot
56
+ def run
57
+ load_initializer
58
+ Rails::Initializer.run(:set_load_path)
59
+ end
60
+ end
61
+
62
+ class VendorBoot < Boot
63
+ def load_initializer
64
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
65
+ Rails::Initializer.run(:install_gem_spec_stubs)
66
+ Rails::GemDependency.add_frozen_gem_path
67
+ end
68
+ end
69
+
70
+ class GemBoot < Boot
71
+ def load_initializer
72
+ self.class.load_rubygems
73
+ load_rails_gem
74
+ require 'initializer'
75
+ end
76
+
77
+ def load_rails_gem
78
+ if version = self.class.gem_version
79
+ gem 'rails', version
80
+ else
81
+ gem 'rails'
82
+ end
83
+ rescue Gem::LoadError => load_error
84
+ $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
85
+ exit 1
86
+ end
87
+
88
+ class << self
89
+ def rubygems_version
90
+ Gem::RubyGemsVersion rescue nil
91
+ end
92
+
93
+ def gem_version
94
+ if defined? RAILS_GEM_VERSION
95
+ RAILS_GEM_VERSION
96
+ elsif ENV.include?('RAILS_GEM_VERSION')
97
+ ENV['RAILS_GEM_VERSION']
98
+ else
99
+ parse_gem_version(read_environment_rb)
100
+ end
101
+ end
102
+
103
+ def load_rubygems
104
+ min_version = '1.3.2'
105
+ require 'rubygems'
106
+ unless rubygems_version >= min_version
107
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
108
+ exit 1
109
+ end
110
+
111
+ rescue LoadError
112
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
113
+ exit 1
114
+ end
115
+
116
+ def parse_gem_version(text)
117
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
118
+ end
119
+
120
+ private
121
+ def read_environment_rb
122
+ File.read("#{RAILS_ROOT}/config/environment.rb")
123
+ end
124
+ end
125
+ end
126
+ end
127
+
128
+ # All that for this:
129
+ Rails.boot!
@@ -0,0 +1,22 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
+ development:
4
+ adapter: sqlite3
5
+ database: db/development.sqlite3
6
+ pool: 5
7
+ timeout: 5000
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test:
13
+ adapter: sqlite3
14
+ database: db/test.sqlite3
15
+ pool: 5
16
+ timeout: 5000
17
+
18
+ production:
19
+ adapter: sqlite3
20
+ database: db/production.sqlite3
21
+ pool: 5
22
+ timeout: 5000
@@ -0,0 +1,60 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Be sure to restart your server when you modify this file
21
+
22
+ # Specifies gem version of Rails to use when vendor/rails is not present
23
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
24
+
25
+ # Bootstrap the Rails environment, frameworks, and default configuration
26
+ require File.join(File.dirname(__FILE__), 'boot')
27
+
28
+ Rails::Initializer.run do |config|
29
+ # Settings in config/environments/* take precedence over those specified here.
30
+ # Application configuration should go into files in config/initializers
31
+ # -- all .rb files in that directory are automatically loaded.
32
+
33
+ # Add additional load paths for your own custom dirs
34
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
35
+
36
+ # Specify gems that this application depends on and have them installed with rake gems:install
37
+ # config.gem "bj"
38
+ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
39
+ # config.gem "sqlite3-ruby", :lib => "sqlite3"
40
+ # config.gem "aws-s3", :lib => "aws/s3"
41
+
42
+ # Only load the plugins named here, in the order given (default is alphabetical).
43
+ # :all can be used as a placeholder for all plugins not explicitly named
44
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
45
+
46
+ # Skip frameworks you're not going to use. To use Rails without a database,
47
+ # you must remove the Active Record framework.
48
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
49
+
50
+ # Activate observers that should always be running
51
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
52
+
53
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
54
+ # Run "rake -D time" for a list of tasks for finding time zone names.
55
+ config.time_zone = 'UTC'
56
+
57
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
58
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
59
+ # config.i18n.default_locale = :de
60
+ end
@@ -0,0 +1,36 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Settings specified here will take precedence over those in config/environment.rb
21
+
22
+ # In the development environment your application's code is reloaded on
23
+ # every request. This slows down response time but is perfect for development
24
+ # since you don't have to restart the webserver when you make code changes.
25
+ config.cache_classes = false
26
+
27
+ # Log error messages when you accidentally call methods on nil.
28
+ config.whiny_nils = true
29
+
30
+ # Show full error reports and disable caching
31
+ config.action_controller.consider_all_requests_local = true
32
+ config.action_view.debug_rjs = true
33
+ config.action_controller.perform_caching = false
34
+
35
+ # Don't care if the mailer can't send
36
+ config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,47 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Settings specified here will take precedence over those in config/environment.rb
21
+
22
+ # The production environment is meant for finished, "live" apps.
23
+ # Code is not reloaded between requests
24
+ config.cache_classes = true
25
+
26
+ # Full error reports are disabled and caching is turned on
27
+ config.action_controller.consider_all_requests_local = false
28
+ config.action_controller.perform_caching = true
29
+ config.action_view.cache_template_loading = true
30
+
31
+ # See everything in the log (default is :info)
32
+ # config.log_level = :debug
33
+
34
+ # Use a different logger for distributed setups
35
+ # config.logger = SyslogLogger.new
36
+
37
+ # Use a different cache store in production
38
+ # config.cache_store = :mem_cache_store
39
+
40
+ # Enable serving of images, stylesheets, and javascripts from an asset server
41
+ # config.action_controller.asset_host = "http://assets.example.com"
42
+
43
+ # Disable delivery errors, bad email addresses will be ignored
44
+ # config.action_mailer.raise_delivery_errors = false
45
+
46
+ # Enable threaded mode
47
+ # config.threadsafe!
@@ -0,0 +1,47 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Settings specified here will take precedence over those in config/environment.rb
21
+
22
+ # The test environment is used exclusively to run your application's
23
+ # test suite. You never need to work with it otherwise. Remember that
24
+ # your test database is "scratch space" for the test suite and is wiped
25
+ # and recreated between test runs. Don't rely on the data there!
26
+ config.cache_classes = true
27
+
28
+ # Log error messages when you accidentally call methods on nil.
29
+ config.whiny_nils = true
30
+
31
+ # Show full error reports and disable caching
32
+ config.action_controller.consider_all_requests_local = true
33
+ config.action_controller.perform_caching = false
34
+ config.action_view.cache_template_loading = true
35
+
36
+ # Disable request forgery protection in test environment
37
+ config.action_controller.allow_forgery_protection = false
38
+
39
+ # Tell Action Mailer not to deliver emails to the real world.
40
+ # The :test delivery method accumulates sent emails in the
41
+ # ActionMailer::Base.deliveries array.
42
+ config.action_mailer.delivery_method = :test
43
+
44
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
45
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
46
+ # like if you have constraints or database-specific column types
47
+ # config.active_record.schema_format = :sql
@@ -0,0 +1,26 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Be sure to restart your server when you modify this file.
21
+
22
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
23
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
24
+
25
+ # You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
26
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,29 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Be sure to restart your server when you modify this file.
21
+
22
+ # Add new inflection rules using the following format
23
+ # (all these examples are active by default):
24
+ # ActiveSupport::Inflector.inflections do |inflect|
25
+ # inflect.plural /^(ox)$/i, '\1en'
26
+ # inflect.singular /^(ox)en/i, '\1'
27
+ # inflect.irregular 'person', 'people'
28
+ # inflect.uncountable %w( fish sheep )
29
+ # end
@@ -0,0 +1,24 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Be sure to restart your server when you modify this file.
21
+
22
+ # Add new mime types for use in respond_to blocks:
23
+ # Mime::Type.register "text/richtext", :rtf
24
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,40 @@
1
+ ############################################################################
2
+ ##
3
+ ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
+ ## All rights reserved.
5
+ ## Contact: Nokia Corporation (testabilitydriver@nokia.com)
6
+ ##
7
+ ## This file is part of Testability Driver.
8
+ ##
9
+ ## If you have questions regarding the use of this file, please contact
10
+ ## Nokia at testabilitydriver@nokia.com .
11
+ ##
12
+ ## This library is free software; you can redistribute it and/or
13
+ ## modify it under the terms of the GNU Lesser General Public
14
+ ## License version 2.1 as published by the Free Software Foundation
15
+ ## and appearing in the file LICENSE.LGPL included in the packaging
16
+ ## of this file.
17
+ ##
18
+ ############################################################################
19
+
20
+ # Be sure to restart your server when you modify this file.
21
+
22
+ # These settings change the behavior of Rails 2 apps and will be defaults
23
+ # for Rails 3. You can remove this initializer when Rails 3 is released.
24
+
25
+ if defined?(ActiveRecord)
26
+ # Include Active Record class name as root for JSON serialized output.
27
+ ActiveRecord::Base.include_root_in_json = true
28
+
29
+ # Store the full class name (including module namespace) in STI type column.
30
+ ActiveRecord::Base.store_full_sti_class = true
31
+ end
32
+
33
+ ActionController::Routing.generate_best_match = false
34
+
35
+ # Use ISO 8601 format for JSON serialized times and dates.
36
+ ActiveSupport.use_standard_json_time_format = true
37
+
38
+ # Don't escape HTML entities in JSON, leave that for the #json_escape helper.
39
+ # if you're including raw json in an HTML page.
40
+ ActiveSupport.escape_html_entities_in_json = false