rutema 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/.gemtest +0 -0
  2. data/History.txt +9 -1
  3. data/Manifest.txt +20 -21
  4. data/README.md +1 -10
  5. data/README.txt +1 -10
  6. data/Rakefile +12 -12
  7. data/bin/rutema +1 -2
  8. data/bin/rutemax +1 -2
  9. data/examples/README.md +7 -0
  10. data/{test/distro_test → examples}/config/database.rutema +2 -1
  11. data/examples/config/full.rutema +27 -0
  12. data/{test/distro_test → examples}/config/minimal.rutema +0 -0
  13. data/{test/distro_test → examples}/specs/T001.spec +0 -0
  14. data/{test/distro_test → examples}/specs/T002.spec +0 -0
  15. data/{test/distro_test → examples}/specs/T003.spec +0 -0
  16. data/{test/distro_test → examples}/specs/T004.spec +0 -0
  17. data/{test/distro_test → examples}/specs/T005.spec +0 -0
  18. data/{test/distro_test → examples}/specs/T006.spec +0 -0
  19. data/{test/distro_test → examples}/specs/check.spec +0 -0
  20. data/{test/distro_test → examples}/specs/fail.spec +0 -0
  21. data/{test/distro_test → examples}/specs/include.scenario +0 -0
  22. data/examples/specs/rutema.spec +10 -0
  23. data/{test/distro_test → examples}/specs/setup.spec +0 -0
  24. data/{test/distro_test → examples}/specs/teardown.spec +0 -0
  25. data/lib/rutema/models/activerecord.rb +1 -6
  26. data/lib/rutema/objectmodel.rb +2 -2
  27. data/lib/rutema/parsers/base.rb +7 -7
  28. data/lib/rutema/reporters/activerecord.rb +2 -2
  29. data/lib/rutema/system.rb +3 -3
  30. data/test/{distro_test/specs → data}/duplicate_name.spec +0 -0
  31. data/test/{distro_test/specs → data}/no_title.spec +0 -0
  32. data/test/{distro_test/specs → data}/sample.spec +0 -0
  33. data/test/{distro_test/config → data}/test_identifiers.rutema +2 -2
  34. data/test/test_activerecord.rb +0 -0
  35. data/test/test_configuration.rb +2 -2
  36. data/test/test_couchdb.rb +4 -2
  37. data/test/test_objectmodel.rb +2 -2
  38. data/test/test_parsers.rb +3 -7
  39. data/test/test_runners.rb +4 -4
  40. data/test/test_system.rb +4 -3
  41. metadata +126 -178
  42. data/lib/rutema/gems.rb +0 -4
  43. data/test/distro_test/config/full.rutema +0 -18
  44. data/test/rutema.rutema +0 -3
  45. data/test/rutema.spec +0 -10
data/.gemtest ADDED
File without changes
data/History.txt CHANGED
@@ -1,10 +1,18 @@
1
+ == 1.2.4 /2011-11-29
2
+ * fixed a regression in parsing the configuration
3
+ * updated gem dependencies
4
+ * added Bundler configuration for development purposes
5
+ * activerecord now loaded on demand to improve startup times
6
+ * 1.9 compatibility!
7
+ * the mixed sample/tests are now clearly split between examples and test data
8
+ * Documentation overhaul started. 4 years of cruft to get rid of
1
9
  == 1.2.3 /2011-05-03
2
10
  * parser interface expanded for configuration validation
3
11
  * parser interface expanded to allow separate parsing of setup and teardown scripts
4
12
  == 1.2.2 /2011-04-05
5
13
  * Actually fixed all the places where path expansion takes place.
6
14
  == 1.2.1 /2011-04-04
7
- * The configuration code no longer assumes that you are passing files. configuration.tests= now assumes you're passing an array of strings and it is the responsibility of the parser to make heads or tails from that. The configuraiton is clever enough to detect paths relative to the configuration file and expand them.
15
+ * The configuration code no longer assumes that you are passing files. configuration.tests= now assumes you're passing an array of strings and it is the responsibility of the parser to make heads or tails from that. The configuration is clever enough to detect paths relative to the configuration file and expand them.
8
16
  * some minor cosmetic changes in the documentation
9
17
  == 1.2.0 /2011-04-01
10
18
  * refactored library structure
data/Manifest.txt CHANGED
@@ -2,9 +2,24 @@ bin/rutema
2
2
  bin/rutemax
3
3
  COPYING.txt
4
4
  History.txt
5
+ examples/config/database.rutema
6
+ examples/config/full.rutema
7
+ examples/config/minimal.rutema
8
+ examples/README.md
9
+ examples/specs/check.spec
10
+ examples/specs/fail.spec
11
+ examples/specs/include.scenario
12
+ examples/specs/rutema.spec
13
+ examples/specs/setup.spec
14
+ examples/specs/T001.spec
15
+ examples/specs/T002.spec
16
+ examples/specs/T003.spec
17
+ examples/specs/T004.spec
18
+ examples/specs/T005.spec
19
+ examples/specs/T006.spec
20
+ examples/specs/teardown.spec
5
21
  lib/rutema/configuration.rb
6
22
  lib/rutema/elements/minimal.rb
7
- lib/rutema/gems.rb
8
23
  lib/rutema/models/activerecord.rb
9
24
  lib/rutema/models/base.rb
10
25
  lib/rutema/objectmodel.rb
@@ -23,26 +38,10 @@ Manifest.txt
23
38
  Rakefile
24
39
  README.md
25
40
  README.txt
26
- test/distro_test/config/database.rutema
27
- test/distro_test/config/full.rutema
28
- test/distro_test/config/minimal.rutema
29
- test/distro_test/config/test_identifiers.rutema
30
- test/distro_test/specs/check.spec
31
- test/distro_test/specs/duplicate_name.spec
32
- test/distro_test/specs/fail.spec
33
- test/distro_test/specs/include.scenario
34
- test/distro_test/specs/no_title.spec
35
- test/distro_test/specs/sample.spec
36
- test/distro_test/specs/setup.spec
37
- test/distro_test/specs/T001.spec
38
- test/distro_test/specs/T002.spec
39
- test/distro_test/specs/T003.spec
40
- test/distro_test/specs/T004.spec
41
- test/distro_test/specs/T005.spec
42
- test/distro_test/specs/T006.spec
43
- test/distro_test/specs/teardown.spec
44
- test/rutema.rutema
45
- test/rutema.spec
41
+ test/data/duplicate_name.spec
42
+ test/data/no_title.spec
43
+ test/data/sample.spec
44
+ test/data/test_identifiers.rutema
46
45
  test/test_activerecord.rb
47
46
  test/test_configuration.rb
48
47
  test/test_objectmodel.rb
data/README.md CHANGED
@@ -14,16 +14,7 @@ For more information look at http://patir.rubyforge.org/rutema
14
14
  * A well defined way to create a project specific test specification format
15
15
 
16
16
  ## SYNOPSIS:
17
- See http://patir.rubyforge.org/rutema/distro_test.html for an introductory example.
18
-
19
- ## REQUIREMENTS:
20
- * patir (http://patir.rubyforge.org)
21
- * mailfactory (http://rubyforge.org/projects/mailfactory/)
22
- * activerecord (http://ar.rubyonrails.com/)
23
- * sqlite3 (http://rubyforge.org/projects/sqlite-ruby/)
24
- * ruport (http://rubyreports.org/)
25
- * acts_as_reportable
26
- * highline
17
+ See http://patir.rubyforge.org/rutema/examples.html for an introductory example.
27
18
 
28
19
  ## INSTALL:
29
20
  * gem install rutema
data/README.txt CHANGED
@@ -14,16 +14,7 @@ For more information look at http://patir.rubyforge.org/rutema
14
14
  * A well defined way to create a project specific test specification format
15
15
 
16
16
  == SYNOPSIS:
17
- See http://patir.rubyforge.org/rutema/distro_test.html for an introductory example.
18
-
19
- == REQUIREMENTS:
20
- * patir (http://patir.rubyforge.org)
21
- * mailfactory (http://rubyforge.org/projects/mailfactory/)
22
- * activerecord (http://ar.rubyonrails.com/)
23
- * sqlite3 (http://rubyforge.org/projects/sqlite-ruby/)
24
- * ruport (http://rubyreports.org/)
25
- * acts_as_reportable
26
- * highline
17
+ See http://patir.rubyforge.org/rutema/examples.html for an introductory example.
27
18
 
28
19
  == INSTALL:
29
20
  * gem install rutema
data/Rakefile CHANGED
@@ -1,27 +1,27 @@
1
1
  # Copyright (c) 2007-2010 Vassilis Rizopoulos. All rights reserved.
2
2
  # -*- ruby -*-
3
3
  $:.unshift File.join(File.dirname(__FILE__),"lib")
4
- $:.unshift File.join(File.dirname(__FILE__),"ext")
5
4
  require 'rutema/system'
6
5
  require 'rubygems'
7
6
  require 'hoe'
7
+
8
8
  Hoe.spec('rutema') do |p|
9
9
  p.version=Rutema::Version::STRING
10
10
  p.rubyforge_name = 'patir'
11
11
  p.author = "Vassilis Rizopoulos"
12
- p.email = "riva@braveworld.net"
12
+ p.email = "vassilisrizopoulos@gmail.com"
13
13
  p.summary = 'rutema is a test execution and management framework for heterogeneous testing environments'
14
- p.description = p.paragraphs_of('README.md', 1..5).join("\n\n")
14
+ p.description = p.paragraphs_of('README.md', 1..4).join("\n\n")
15
15
  p.url = "http://patir.rubyforge.org/rutema"
16
16
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
17
- p.extra_deps<<['patir',">=0.6.4"]
18
- p.extra_deps<<['highline','1.6.1']
19
- p.extra_deps<<['mailfactory','1.4.0']
20
- p.extra_deps<<['activerecord','3.0.5']
21
- p.extra_deps<<['ruport','1.6.3']
22
- p.extra_deps<<['acts_as_reportable','1.1.1']
23
- #p.extra_deps<<['couchrest','=1.0.1']
24
- p.spec_extras={:executables=>["rutemax","rutema"],:default_executable=>"rutema"}
17
+ p.extra_deps<<["activerecord", "~>3.0.9"]
18
+ p.extra_deps<<["patir", "~>0.7.2"]
19
+ p.extra_deps<<["highline","~>1.6.2"]
20
+ p.extra_deps<<["mailfactory","~>1.4.0"]
21
+ p.extra_deps<<["mocha","~>0.9.12"]
22
+ p.extra_deps<<["sqlite3","~>1.3.4"]
23
+ p.spec_extras={:executables=>["rutemax","rutema"]}
25
24
  end
26
25
 
27
- # vim: syntax=Ruby
26
+ # vim: syntax=Ruby
27
+
data/bin/rutema CHANGED
@@ -1,6 +1,5 @@
1
- # Copyright (c) 2007-2010 Vassilis Rizopoulos. All rights reserved.
1
+ # Copyright (c) 2007-2011 Vassilis Rizopoulos. All rights reserved.
2
2
  require 'rubygems'
3
- require 'rutema/gems'
4
3
  require 'rutema/system'
5
4
  begin
6
5
  Rutema::RutemaX.new(ARGV)
data/bin/rutemax CHANGED
@@ -1,6 +1,5 @@
1
- # Copyright (c) 2007-2010 Vassilis Rizopoulos. All rights reserved.
1
+ # Copyright (c) 2007-2011 Vassilis Rizopoulos. All rights reserved.
2
2
  require 'rubygems'
3
- require 'rutema/gems'
4
3
  require 'rutema/system'
5
4
  begin
6
5
  puts "rutemax is deprecated and will be removed in the near future, use rutema instead"
@@ -0,0 +1,7 @@
1
+ ## rutema examples
2
+ The examples included herein are also used to test the rutema functionality, so you know they work.
3
+
4
+ ## Structure
5
+ The basic structure we follow in rutema usage (and this has been "in production" for a good 5 years now) is a config/ directory where each suite is configured, a specs/ directory to store the test specifications and a scritps/ directory for any scripts and data files used by the steps in the scripts directory.
6
+
7
+ We also usually add any custom code used in the configuration files in config/lib so that it can be required in the configuration files without much trouble.
@@ -3,7 +3,8 @@ configuration.parser={:class=>Rutema::MinimalXMLParser}
3
3
  #Use the AR-Reporter.
4
4
  #In case of reporters the whole Hash is passed to the reporter initializer, so any keys are dependent on the reporter to use
5
5
  #Check the appropriate RDoc entries
6
- configuration.reporter={:class=>Rutema::ActiveRecordReporter, :db=>{:adpater=>"sqlite3",:database=>"sample.db"}}
6
+ #Also note that any relative paths are relative to __the location of the configuration file__
7
+ configuration.reporter={:class=>Rutema::ActiveRecordReporter, :db=>{:adapter=>"sqlite3",:database=>"../example.db"}}
7
8
  configuration.tests=[
8
9
  "../specs/T001.spec",
9
10
  "../specs/T002.spec",
@@ -0,0 +1,27 @@
1
+ require 'rutema/parsers/xml'
2
+ require 'rutema/reporters/activerecord'
3
+ #Configures the parser to use. You can only use one parser and the last entry wins
4
+ configuration.parser={:class=>Rutema::MinimalXMLParser}
5
+ #Configures the reporters to use. You can define as many reporters as you wish (there are stdout, email, active record and couchdb reporters included). The Hash defined here is passed in it's entirety over to the reporter so each reporter defines different keys.
6
+ #Check each reporter's RDoc entry for details
7
+ configuration.reporter={:class=>Rutema::ActiveRecordReporter, :db=>{:adapter=>"sqlite3",:database=>"sample.db"}}
8
+ configuration.tests=[
9
+ "../specs/T001.spec",
10
+ "../specs/T002.spec",
11
+ "../specs/T003.spec",
12
+ "../specs/T004.spec",
13
+ "../specs/T005.spec",
14
+ "../specs/T006.spec"
15
+ ]
16
+ #This is a way to centrally configure tools and commands used to implement test steps.
17
+ #When building command lines for test steps in the parser it is a good idea to have things like paths, IP addresses and other environment specific parameters in a single place. Using tool= and path= entries you can then access this information in the parser i.e. configuration.tool.test[:path]
18
+ configuration.tool={:name=>"test",:path=>".",:configuration=>{:key=>"value"}}
19
+ configuration.path={:name=>"test",:path=>"."}
20
+ #The context Hash is used to pass general information to the rutema components (parser, runner, reporters). It's the easiest way to pass versioning information etc. Since the configuration file is Ruby code nothing prevents you from programmatically generating the context content here.
21
+ configuration.context={:key=>"value"}
22
+ #The test specification that runs as a sanity check before the entire suite. If it fails then the rest of the tests are not executed
23
+ configuration.check="../specs/check.spec"
24
+ #Teardown script
25
+ configuration.teardown="../specs/teardown.spec"
26
+ #Setup script
27
+ configuration.setup="../specs/setup.spec"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ <specification name="TR001">
2
+ <title>Rutema self hosting test</title>
3
+ <description>Test that rutema is usable as a step in a specification using the distro test example</description>
4
+ <scenario>
5
+ <command cmd="bundle exec ruby -I../../lib ../../bin/rutema -c ../config/minimal.rutema"/>
6
+ <command cmd="bundle exec ruby -I../../lib ../../bin/rutema -c ../config/database.rutema"/>
7
+ <command cmd="bundle exec ruby -I../../lib ../../bin/rutema -c ../config/database.rutema ../specs/T001.spec"/>
8
+ <command cmd="bundle exec ruby -I../../lib ../../bin/rutema -c ../config/full.rutema"/>
9
+ </scenario>
10
+ </specification>
File without changes
File without changes
@@ -2,7 +2,6 @@
2
2
  $:.unshift File.join(File.dirname(__FILE__),'..','..')
3
3
  require 'rutema/models/base'
4
4
  require 'active_record'
5
- require 'ruport/acts_as_reportable'
6
5
 
7
6
  #this fixes the AR Logger hack that annoys me sooooo much
8
7
  class Logger
@@ -55,21 +54,17 @@ module Rutema
55
54
  class Run< ::ActiveRecord::Base
56
55
  has_many :scenarios
57
56
  has_many :parse_errors
58
- serialize :context
59
- acts_as_reportable
57
+ serialize :context
60
58
  end
61
59
  class Scenario< ::ActiveRecord::Base
62
60
  belongs_to :run
63
61
  has_many :steps
64
- acts_as_reportable
65
62
  end
66
63
  class Step< ::ActiveRecord::Base
67
64
  belongs_to :scenario
68
- acts_as_reportable
69
65
  end
70
66
  class ParseError< ::ActiveRecord::Base
71
67
  belongs_to :run
72
- acts_as_reportable
73
68
  end
74
69
  #Exports the contents of the database/model as a yaml dump
75
70
  class Export
@@ -13,8 +13,8 @@ module Rutema
13
13
  def attribute symbol,value
14
14
  @attributes||=Hash.new
15
15
  case symbol
16
- when String : @attributes[:"#{symbol}"]=value
17
- when Symbol : @attributes[symbol]=value
16
+ when String then @attributes[:"#{symbol}"]=value
17
+ when Symbol then @attributes[symbol]=value
18
18
  end
19
19
  end
20
20
  #allows us to call object.attribute, object.attribute=, object.attribute? and object.has_attribute?
@@ -7,21 +7,21 @@ module Rutema
7
7
  end
8
8
  #Base class that bombs out when used.
9
9
  #
10
- #Initialze expects a hash and as a base implementation assigns :logger as the internal logger.
11
- #
12
10
  #By default the internal logger will log to the console if no logger is provided.
13
- #
14
- #At the end validate_configuration is called
15
11
  class SpecificationParser
16
12
  attr_reader :configuration
13
+ #Expects a hash with at least {:configuration, :logger}
14
+ #
15
+ #At the end validate_configuration is called
17
16
  def initialize params
18
- @configuration=params
19
- @logger.warn("No system configuration provided to the parser") unless @configuration
20
- @logger=@configuration[:logger]
17
+ @configuration=params[:configuration]
18
+ @logger=params[:logger]
21
19
  unless @logger
22
20
  @logger=Patir.setup_logger
21
+ @configuration||={}
23
22
  @configuration[:logger]=@logger
24
23
  end
24
+ @logger.warn("No system configuration provided to the parser") unless @configuration
25
25
  validate_configuration
26
26
  end
27
27
  #parses a specification
@@ -1,7 +1,5 @@
1
1
  # Copyright (c) 2007-2010 Vassilis Rizopoulos. All rights reserved.
2
2
  $:.unshift File.join(File.dirname(__FILE__),"..","..")
3
- require 'yaml'
4
- require 'rutema/models/activerecord'
5
3
 
6
4
  module Rutema
7
5
  #The ActiveRecordReporter will store the results of a test run in a database using ActiveRecord.
@@ -14,6 +12,8 @@ module Rutema
14
12
  @logger||=Patir.setup_logger
15
13
  database_configuration = definition[:db]
16
14
  raise "No database configuration defined, missing :db configuration key." unless database_configuration
15
+ $:.unshift File.join(File.dirname(__FILE__),"..","..")
16
+ require 'rutema/models/activerecord'
17
17
  Rutema::ActiveRecord.connect(database_configuration,@logger)
18
18
  @logger.info("Reporter #{self.to_s} registered")
19
19
  end
data/lib/rutema/system.rb CHANGED
@@ -22,7 +22,7 @@ module Rutema
22
22
  module Version
23
23
  MAJOR=1
24
24
  MINOR=2
25
- TINY=3
25
+ TINY=4
26
26
  STRING=[ MAJOR, MINOR, TINY ].join( "." )
27
27
  end
28
28
  #This class coordinates parsing, execution and reporting of test specifications
@@ -251,8 +251,8 @@ module Rutema
251
251
  args.options do |opt|
252
252
  opt.on("Options:")
253
253
  opt.on("--debug", "-d","Turns on debug messages") { $DEBUG=true }
254
- opt.on("--config FILE", "-c FILE",String,"Loads the configuration from FILE") { |@config_file|}
255
- opt.on("--log FILE", "-l FILE",String,"Redirects the log output to FILE") { |@log_file|}
254
+ opt.on("--config FILE", "-c FILE",String,"Loads the configuration from FILE") { |config_file| @config_file=config_file}
255
+ opt.on("--log FILE", "-l FILE",String,"Redirects the log output to FILE") { |log_file| @log_file=logfile}
256
256
  opt.on("--check","Runs just the check test"){@check=true}
257
257
  opt.on("--step","Runs test cases step by step"){@step=true}
258
258
  opt.on("-v", "--version","Displays the version") { $stdout.puts("rutema v#{Version::STRING}");exit 0 }
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  require 'rutema/parsers/xml'
2
2
  configuration.parser={:class=>Rutema::MinimalXMLParser}
3
3
  configuration.tests=[
4
- "../specs/T001.spec",
4
+ "../examples/specs/T001.spec",
5
5
  "22345",
6
- "../specs/T003.spec",
6
+ "../examples/specs/T003.spec",
7
7
  ]
Binary file
@@ -16,7 +16,7 @@ module TestRutema
16
16
  def test_rutema_configuration
17
17
  cfg=nil
18
18
  #load the valid configuration
19
- assert_nothing_raised() { cfg=Rutema::RutemaConfigurator.new("distro_test/config/full.rutema").configuration}
19
+ assert_nothing_raised() { cfg=Rutema::RutemaConfigurator.new("../examples/config/full.rutema").configuration}
20
20
  assert_not_nil(cfg.parser)
21
21
  assert_not_nil(cfg.reporters)
22
22
  assert_equal(1, cfg.reporters.size)
@@ -34,7 +34,7 @@ module TestRutema
34
34
  end
35
35
 
36
36
  def test_specification_paths
37
- cfg=Rutema::RutemaConfigurator.new("distro_test/config/test_identifiers.rutema").configuration
37
+ cfg=Rutema::RutemaConfigurator.new("data/test_identifiers.rutema").configuration
38
38
  assert_not_nil(cfg.tests)
39
39
  assert(File.exists?(cfg.tests[0]))
40
40
  assert(File.exists?(cfg.tests[2]))
data/test/test_couchdb.rb CHANGED
@@ -1,10 +1,12 @@
1
- $:.unshift File.join(File.dirname(__FILE__),"..","lib")
1
+ $:.unshift File.join(File.dirname(__FILE__),"..")
2
2
  require 'rubygems'
3
3
  require 'test/unit'
4
4
  require 'ostruct'
5
- require 'rutema/reporters/couchdb'
6
5
  require 'patir/command'
6
+ require 'couchrest_model'
7
7
  require 'mocha'
8
+ require 'lib/rutema/reporters/couchdb'
9
+
8
10
  #$DEBUG=true
9
11
  module TestRutema
10
12
  class MockCommand
@@ -1,7 +1,7 @@
1
- $:.unshift File.join(File.dirname(__FILE__),"..","lib")
1
+ $:.unshift File.join(File.dirname(__FILE__),"..")
2
2
  require 'test/unit'
3
3
  require 'rubygems'
4
- require 'rutema/objectmodel'
4
+ require 'lib/rutema/objectmodel'
5
5
  module TestRutema
6
6
  class DummyCommand
7
7
  include Patir::Command
data/test/test_parsers.rb CHANGED
@@ -1,13 +1,9 @@
1
- $:.unshift File.join(File.dirname(__FILE__),'..','lib')
1
+ $:.unshift File.join(File.dirname(__FILE__),'..')
2
2
  require 'test/unit'
3
3
  require 'ostruct'
4
-
5
- require 'rubygems'
6
4
  require 'patir/command'
7
5
  require 'mocha'
8
-
9
- require 'rutema/parsers/base'
10
- require 'rutema/parsers/xml'
6
+ require 'lib/rutema/parsers/xml'
11
7
 
12
8
  #$DEBUG=true
13
9
  module TestRutema
@@ -37,7 +33,7 @@ module TestRutema
37
33
  <description>Description</description>
38
34
  <scenario>
39
35
  <step/>
40
- <include_scenario file="#{File.expand_path(File.dirname(__FILE__))}/distro_test/specs/include.scenario"/>
36
+ <include_scenario file="#{File.expand_path(File.dirname(__FILE__))}/../examples/specs/include.scenario"/>
41
37
  </scenario>
42
38
  </specification>
43
39
  EOT
data/test/test_runners.rb CHANGED
@@ -1,4 +1,4 @@
1
- $:.unshift File.join(File.dirname(__FILE__),"..","lib")
1
+ $:.unshift File.join(File.dirname(__FILE__),"..")
2
2
  require 'test/unit'
3
3
  require 'ostruct'
4
4
 
@@ -6,9 +6,9 @@ require 'rubygems'
6
6
  require 'patir/command'
7
7
  require 'mocha'
8
8
 
9
- require 'rutema/objectmodel'
10
- require 'rutema/runners/default'
11
- require 'rutema/runners/step'
9
+ require 'lib/rutema/objectmodel'
10
+ require 'lib/rutema/runners/default'
11
+ require 'lib/rutema/runners/step'
12
12
 
13
13
  #$DEBUG=true
14
14
  module TestRutema
data/test/test_system.rb CHANGED
@@ -21,7 +21,7 @@ module TestRutema
21
21
  conf=OpenStruct.new(:parser=>{:class=>Rutema::BaseXMLParser},
22
22
  :tools=>{},
23
23
  :paths=>{},
24
- :tests=>["distro_test/specs/sample.spec","distro_test/specs/duplicate_name.spec"],
24
+ :tests=>["data/sample.spec","data/duplicate_name.spec"],
25
25
  :reporters=>[],
26
26
  :context=>{})
27
27
  coord=nil
@@ -36,10 +36,11 @@ module TestRutema
36
36
  coord.run(:unattended)
37
37
  assert_equal(1,coord.parse_errors.size)
38
38
  coord=Rutema::Coordinator.new(conf)
39
- coord.run("distro_test/specs/sample.spec")
39
+ coord.run("data/sample.spec")
40
+ p coord.parse_errors
40
41
  assert_equal(0,coord.parse_errors.size)
41
42
  coord=Rutema::Coordinator.new(conf)
42
- coord.run("distro_test/specs/no_title.spec")
43
+ coord.run("data/no_title.spec")
43
44
  assert_equal(1,coord.parse_errors.size)
44
45
  end
45
46
  puts coord.to_s if $DEBUG
metadata CHANGED
@@ -1,179 +1,147 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rutema
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.4
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 3
10
- version: 1.2.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Vassilis Rizopoulos
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-05-05 00:00:00 +02:00
19
- default_executable: rutema
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: patir
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2011-11-29 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activerecord
16
+ requirement: &2158912300 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 0
32
- - 6
33
- - 4
34
- version: 0.6.4
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.9
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: highline
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2158912300
25
+ - !ruby/object:Gem::Dependency
26
+ name: patir
27
+ requirement: &2158911420 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
43
- - - "="
44
- - !ruby/object:Gem::Version
45
- hash: 13
46
- segments:
47
- - 1
48
- - 6
49
- - 1
50
- version: 1.6.1
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.7.2
51
33
  type: :runtime
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: mailfactory
55
34
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2158911420
36
+ - !ruby/object:Gem::Dependency
37
+ name: highline
38
+ requirement: &2158909860 !ruby/object:Gem::Requirement
57
39
  none: false
58
- requirements:
59
- - - "="
60
- - !ruby/object:Gem::Version
61
- hash: 7
62
- segments:
63
- - 1
64
- - 4
65
- - 0
66
- version: 1.4.0
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.6.2
67
44
  type: :runtime
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: activerecord
71
45
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2158909860
47
+ - !ruby/object:Gem::Dependency
48
+ name: mailfactory
49
+ requirement: &2158908860 !ruby/object:Gem::Requirement
73
50
  none: false
74
- requirements:
75
- - - "="
76
- - !ruby/object:Gem::Version
77
- hash: 13
78
- segments:
79
- - 3
80
- - 0
81
- - 5
82
- version: 3.0.5
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.4.0
83
55
  type: :runtime
84
- version_requirements: *id004
85
- - !ruby/object:Gem::Dependency
86
- name: ruport
87
56
  prerelease: false
88
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *2158908860
58
+ - !ruby/object:Gem::Dependency
59
+ name: mocha
60
+ requirement: &2158908000 !ruby/object:Gem::Requirement
89
61
  none: false
90
- requirements:
91
- - - "="
92
- - !ruby/object:Gem::Version
93
- hash: 9
94
- segments:
95
- - 1
96
- - 6
97
- - 3
98
- version: 1.6.3
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 0.9.12
99
66
  type: :runtime
100
- version_requirements: *id005
101
- - !ruby/object:Gem::Dependency
102
- name: acts_as_reportable
103
67
  prerelease: false
104
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *2158908000
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: &2158906940 !ruby/object:Gem::Requirement
105
72
  none: false
106
- requirements:
107
- - - "="
108
- - !ruby/object:Gem::Version
109
- hash: 17
110
- segments:
111
- - 1
112
- - 1
113
- - 1
114
- version: 1.1.1
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 1.3.4
115
77
  type: :runtime
116
- version_requirements: *id006
117
- - !ruby/object:Gem::Dependency
78
+ prerelease: false
79
+ version_requirements: *2158906940
80
+ - !ruby/object:Gem::Dependency
118
81
  name: hoe
82
+ requirement: &2158905580 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ~>
86
+ - !ruby/object:Gem::Version
87
+ version: '2.12'
88
+ type: :development
119
89
  prerelease: false
120
- requirement: &id007 !ruby/object:Gem::Requirement
90
+ version_requirements: *2158905580
91
+ - !ruby/object:Gem::Dependency
92
+ name: rdoc
93
+ requirement: &2158590960 !ruby/object:Gem::Requirement
121
94
  none: false
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- hash: 47
126
- segments:
127
- - 2
128
- - 8
129
- - 0
130
- version: 2.8.0
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: '3.10'
131
99
  type: :development
132
- version_requirements: *id007
133
- description: |-
134
- ## DESCRIPTION:
135
- rutema is a test execution tool with a twist.
136
- It allows you to combine test tools while it takes care of logging, reporting, archiving of results and formalizes execution of automated and manual tests.
137
- It's purpose is to make testing in heterogeneous environments easier.
138
-
139
- For more information look at http://patir.rubyforge.org/rutema
140
-
141
- ## FEATURES/PROBLEMS:
142
- * Unified test execution environment for automated and manual tests
143
- * Extensible reports and notifications in various formats (email, rss, pdf, html etc.)
144
- * Comprehensive history of test execution
145
- * A well defined way to create a project specific test specification format
146
-
147
- ## SYNOPSIS:
148
- See http://patir.rubyforge.org/rutema/distro_test.html for an introductory example.
149
-
150
- ## REQUIREMENTS:
151
- * patir (http://patir.rubyforge.org)
152
- * mailfactory (http://rubyforge.org/projects/mailfactory/)
153
- * activerecord (http://ar.rubyonrails.com/)
154
- * sqlite3 (http://rubyforge.org/projects/sqlite-ruby/)
155
- * ruport (http://rubyreports.org/)
156
- * acts_as_reportable
157
- * highline
158
- email: riva@braveworld.net
159
- executables:
100
+ prerelease: false
101
+ version_requirements: *2158590960
102
+ description: ! "## DESCRIPTION:\nrutema is a test execution tool with a twist.\nIt
103
+ allows you to combine test tools while it takes care of logging, reporting, archiving
104
+ of results and formalizes execution of automated and manual tests.\nIt's purpose
105
+ is to make testing in heterogeneous environments easier. \n\nFor more information
106
+ look at http://patir.rubyforge.org/rutema\n\n## FEATURES/PROBLEMS:\n* Unified test
107
+ execution environment for automated and manual tests\n* Extensible reports and notifications
108
+ in various formats (email, rss, pdf, html etc.)\n* Comprehensive history of test
109
+ execution\n* A well defined way to create a project specific test specification
110
+ format\n\n## SYNOPSIS:\nSee http://patir.rubyforge.org/rutema/examples.html for
111
+ an introductory example."
112
+ email: vassilisrizopoulos@gmail.com
113
+ executables:
160
114
  - rutemax
161
115
  - rutema
162
116
  extensions: []
163
-
164
- extra_rdoc_files:
117
+ extra_rdoc_files:
165
118
  - COPYING.txt
166
119
  - History.txt
167
120
  - Manifest.txt
168
121
  - README.txt
169
- files:
122
+ files:
170
123
  - bin/rutema
171
124
  - bin/rutemax
172
125
  - COPYING.txt
173
126
  - History.txt
127
+ - examples/config/database.rutema
128
+ - examples/config/full.rutema
129
+ - examples/config/minimal.rutema
130
+ - examples/README.md
131
+ - examples/specs/check.spec
132
+ - examples/specs/fail.spec
133
+ - examples/specs/include.scenario
134
+ - examples/specs/rutema.spec
135
+ - examples/specs/setup.spec
136
+ - examples/specs/T001.spec
137
+ - examples/specs/T002.spec
138
+ - examples/specs/T003.spec
139
+ - examples/specs/T004.spec
140
+ - examples/specs/T005.spec
141
+ - examples/specs/T006.spec
142
+ - examples/specs/teardown.spec
174
143
  - lib/rutema/configuration.rb
175
144
  - lib/rutema/elements/minimal.rb
176
- - lib/rutema/gems.rb
177
145
  - lib/rutema/models/activerecord.rb
178
146
  - lib/rutema/models/base.rb
179
147
  - lib/rutema/objectmodel.rb
@@ -192,26 +160,10 @@ files:
192
160
  - Rakefile
193
161
  - README.md
194
162
  - README.txt
195
- - test/distro_test/config/database.rutema
196
- - test/distro_test/config/full.rutema
197
- - test/distro_test/config/minimal.rutema
198
- - test/distro_test/config/test_identifiers.rutema
199
- - test/distro_test/specs/check.spec
200
- - test/distro_test/specs/duplicate_name.spec
201
- - test/distro_test/specs/fail.spec
202
- - test/distro_test/specs/include.scenario
203
- - test/distro_test/specs/no_title.spec
204
- - test/distro_test/specs/sample.spec
205
- - test/distro_test/specs/setup.spec
206
- - test/distro_test/specs/T001.spec
207
- - test/distro_test/specs/T002.spec
208
- - test/distro_test/specs/T003.spec
209
- - test/distro_test/specs/T004.spec
210
- - test/distro_test/specs/T005.spec
211
- - test/distro_test/specs/T006.spec
212
- - test/distro_test/specs/teardown.spec
213
- - test/rutema.rutema
214
- - test/rutema.spec
163
+ - test/data/duplicate_name.spec
164
+ - test/data/no_title.spec
165
+ - test/data/sample.spec
166
+ - test/data/test_identifiers.rutema
215
167
  - test/test_activerecord.rb
216
168
  - test/test_configuration.rb
217
169
  - test/test_objectmodel.rb
@@ -220,42 +172,38 @@ files:
220
172
  - test/test_runners.rb
221
173
  - test/test_system.rb
222
174
  - test/test_couchdb.rb
223
- has_rdoc: true
175
+ - .gemtest
224
176
  homepage: http://patir.rubyforge.org/rutema
225
177
  licenses: []
226
-
227
178
  post_install_message:
228
- rdoc_options:
179
+ rdoc_options:
229
180
  - --main
230
181
  - README.txt
231
- require_paths:
182
+ require_paths:
232
183
  - lib
233
- required_ruby_version: !ruby/object:Gem::Requirement
184
+ required_ruby_version: !ruby/object:Gem::Requirement
234
185
  none: false
235
- requirements:
236
- - - ">="
237
- - !ruby/object:Gem::Version
238
- hash: 3
239
- segments:
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ segments:
240
191
  - 0
241
- version: "0"
242
- required_rubygems_version: !ruby/object:Gem::Requirement
192
+ hash: 4133070417366984509
193
+ required_rubygems_version: !ruby/object:Gem::Requirement
243
194
  none: false
244
- requirements:
245
- - - ">="
246
- - !ruby/object:Gem::Version
247
- hash: 3
248
- segments:
249
- - 0
250
- version: "0"
195
+ requirements:
196
+ - - ! '>='
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
251
199
  requirements: []
252
-
253
200
  rubyforge_project: patir
254
- rubygems_version: 1.5.0
201
+ rubygems_version: 1.8.8
255
202
  signing_key:
256
203
  specification_version: 3
257
- summary: rutema is a test execution and management framework for heterogeneous testing environments
258
- test_files:
204
+ summary: rutema is a test execution and management framework for heterogeneous testing
205
+ environments
206
+ test_files:
259
207
  - test/test_activerecord.rb
260
208
  - test/test_configuration.rb
261
209
  - test/test_couchdb.rb
data/lib/rutema/gems.rb DELETED
@@ -1,4 +0,0 @@
1
- gem 'activerecord','3.0.5'
2
- gem 'patir',">=0.6.4"
3
- gem 'ruport','=1.6.3'
4
- gem 'acts_as_reportable','>=1.1.1'
@@ -1,18 +0,0 @@
1
- require 'rutema/parsers/xml'
2
- require 'rutema/reporters/activerecord'
3
- configuration.parser={:class=>Rutema::MinimalXMLParser}
4
- configuration.reporter={:class=>Rutema::ActiveRecordReporter, :db=>{:adapter=>"sqlite3",:database=>"sample.db"}}
5
- configuration.tests=[
6
- "../specs/T001.spec",
7
- "../specs/T002.spec",
8
- "../specs/T003.spec",
9
- "../specs/T004.spec",
10
- "../specs/T005.spec",
11
- "../specs/T006.spec"
12
- ]
13
- configuration.tool={:name=>"test",:path=>".",:configuration=>{:key=>"value"}}
14
- configuration.path={:name=>"test",:path=>"."}
15
- configuration.context={:key=>"value"}
16
- configuration.check="../specs/check.spec"
17
- configuration.teardown="../specs/teardown.spec"
18
- configuration.setup="../specs/setup.spec"
data/test/rutema.rutema DELETED
@@ -1,3 +0,0 @@
1
- configuration.parser={:class=>Rutema::MinimalXMLParser}
2
- configuration.reporter={:class=>Rutema::ActiveRecordReporter, :db=>{:adapter=>"sqlite3",:database=>"rutema.db"}}
3
- configuration.tests=["rutema.spec"]
data/test/rutema.spec DELETED
@@ -1,10 +0,0 @@
1
- <specification name="TR001">
2
- <title>Rutema self hosting test</title>
3
- <description>Test that rutema is usable as a step in a specification using the distro test example</description>
4
- <scenario>
5
- <command cmd="rutema -c distro_test/config/minimal.rutema"/>
6
- <command cmd="rutema -c distro_test/config/database.rutema"/>
7
- <command cmd="rutema -c distro_test/config/database.rutema distro_test/specs/T001.spec"/>
8
- <command cmd="rutema -c distro_test/config/full.rutema"/>
9
- </scenario>
10
- </specification>