rutema 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,9 +1,12 @@
1
+ == 1.0.3 / 2008-10-28
2
+ * The name of the configuration file is added in the context information - can be used to group results together in cases where there are multiple configurations
3
+ * Context is now stored as a Hash
4
+ * EmailReporter now displays a footer as defined in it's configuration
1
5
  == 1.0.2 / 2008-10-23
2
6
  * Bugfix in ActiveRecordReporter: \000 sequences produce exceptions when inserting.
3
7
  * Output and error from commands is now more strctly sanitized.
4
8
  == 1.0.1 / 2008-10-13
5
9
  * rutema_upgrader - Bug: update not performed - fixed
6
-
7
10
  == 1.0.0 / 2008-10-06
8
11
  * DB schema change: title and description added to scenario table
9
12
  * footer parameter for the email reporter
data/Rakefile CHANGED
@@ -18,8 +18,8 @@ Hoe.new('rutema', "#{Rutema::Version::STRING}") do |p|
18
18
  p.extra_deps<<['highline']
19
19
  p.extra_deps<<['mailfactory']
20
20
  p.extra_deps<<['activerecord','=2.1.1']
21
- p.extra_deps<<['ruport']
22
- p.extra_deps<<['acts_as_reportable']
21
+ p.extra_deps<<['ruport','>=1.6.1']
22
+ p.extra_deps<<['acts_as_reportable','>=1.1.1']
23
23
  p.spec_extras={:executables=>["rutemax","rutema_upgrader"],
24
24
  :default_executable=>"rutemax"}
25
25
  end
@@ -136,7 +136,7 @@ module Rutema
136
136
  @configuration.setup=@setup
137
137
  @configuration.teardown=@teardown
138
138
  @configuration.check=@check
139
- @configuration.context=OpenStruct.new(@context)
139
+ @configuration.context=@context
140
140
  @configuration.parser=@parser
141
141
  raise Patir::ConfigurationException,"No parser defined" unless @configuration.parser
142
142
  raise Patir::ConfigurationException,"Syntax error in parser definition - missing :class" unless @configuration.parser[:class]
@@ -55,8 +55,9 @@ module Rutema
55
55
 
56
56
  def report specifications,runner_states,parse_errors,configuration
57
57
  @mail.subject = "#{@subject}"
58
- @mail.text = TextReporter.new.report(specifications,runner_states,parse_errors,configuration)
59
- @mail.text << "\n\n#{@footer}"
58
+ txt=TextReporter.new.report(specifications,runner_states,parse_errors,configuration)
59
+ txt<<"\n\n#{@footer}"
60
+ @mail.text = txt
60
61
  begin
61
62
  if @recipients.empty?
62
63
  @logger.error("No recipients for the report mail")
@@ -135,6 +135,22 @@ module Rutema
135
135
  #cmd - the command associated with this step. This should quack like Patir::Command.
136
136
  #
137
137
  #status - one of :not_executed, :success, :warning, :error. Encapsulates the underlying command's status
138
+ #
139
+ #==Dynamic behaviour
140
+ #
141
+ #A TestStep can be queried dynamicaly about the attributes it posesses:
142
+ # step.has_script? - will return true if script is step's attribute.
143
+ #Attribute's are mostly assigned by the parser, i.e. the Rutema::BaseXMLParser from the XML element
144
+ # <test script="some_script"/>
145
+ #will create a TestStep instance with step_type=="test" and script="some_script". In this case
146
+ #
147
+ # step.has_script? returns true
148
+ # step.script returns "some_script"
149
+ #
150
+ #Just like an OpenStruct, TestStep attributes will be created by direct assignment:
151
+ # step.script="some_script" creates the script attribute if it does not exist.
152
+ #
153
+ #See Rutema::SpecificationElement for the implementation details.
138
154
  class TestStep
139
155
  include SpecificationElement
140
156
  include Patir::Command
data/lib/rutema/system.rb CHANGED
@@ -11,7 +11,7 @@ module Rutema
11
11
  module Version
12
12
  MAJOR=1
13
13
  MINOR=0
14
- TINY=2
14
+ TINY=3
15
15
  STRING=[ MAJOR, MINOR, TINY ].join( "." )
16
16
  end
17
17
  #The Elements module provides the namespace for the various modules adding parser functionality
@@ -282,7 +282,7 @@ module Rutema
282
282
  #mode can be :all, :attended, :unattended or a test filename
283
283
  def run mode
284
284
  @runner||=create_runner
285
- @configuration.context.start_time=Time.now
285
+ @configuration.context[:start_time]=Time.now
286
286
  @logger.info("Run started in mode '#{mode}'")
287
287
  begin
288
288
  case mode
@@ -314,8 +314,8 @@ module Rutema
314
314
  @logger.fatal("Runner error: #{$!.message}")
315
315
  exit 1
316
316
  end
317
- @configuration.context.end_time=Time.now
318
- @logger.info("Run completed in #{@configuration.context.end_time-@configuration.context.start_time}s")
317
+ @configuration.context[:end_time]=Time.now
318
+ @logger.info("Run completed in #{@configuration.context[:end_time]-@configuration.context[:start_time]}s")
319
319
  end
320
320
 
321
321
  #Parses all specification files defined in the configuration
@@ -606,6 +606,7 @@ module Rutema
606
606
  begin
607
607
  raise "No configuration file defined!" if !@config_file
608
608
  @configuration=RutemaXConfigurator.new(@config_file,@logger).configuration
609
+ @configuration.context[:config_file]=File.basename(@config_file)
609
610
  @configuration.use_step_by_step=@step
610
611
  Dir.chdir(File.dirname(@config_file)) do
611
612
  @coordinator=Coordinator.new(@configuration,@logger)
data/test/migration.spec CHANGED
@@ -3,7 +3,7 @@
3
3
  <description>Test that the database migration code is succesfull between versions 0.9.0 and 1.0.0</description>
4
4
  <scenario>
5
5
  <command cmd="cp data/sample09.db data/test.db"/>
6
- <command cmd="rutema_upgrader data/test.db"/>
6
+ <command cmd="rutema_upgrader data/migration.rutema"/>
7
7
  <command cmd="rm data/test.db"/>
8
8
  </scenario>
9
9
  </specification>
Binary file
data/test/test_system.rb CHANGED
@@ -122,7 +122,7 @@ EOT
122
122
  :paths=>{},
123
123
  :tests=>["distro_test/specs/sample.spec","distro_test/specs/duplicate_name.spec"],
124
124
  :reporters=>[],
125
- :context=>OpenStruct.new)
125
+ :context=>{})
126
126
  coord=nil
127
127
  assert_nothing_raised() do
128
128
  coord=Rutema::Coordinator.new(conf)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rutema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vassilis Rizopoulos
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-23 00:00:00 +02:00
12
+ date: 2008-11-05 00:00:00 +01:00
13
13
  default_executable: rutemax
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: "0"
63
+ version: 1.6.1
64
64
  version:
65
65
  - !ruby/object:Gem::Dependency
66
66
  name: acts_as_reportable
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: "0"
73
+ version: 1.1.1
74
74
  version:
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: hoe
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.8.1
83
+ version: 1.8.2
84
84
  version:
85
85
  description: "== DESCRIPTION: rutema is a test execution tool with a twist. 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. It's purpose is to make testing in heterogeneous environments easier. For more information look at http://patir.rubyforge.org/rutema == FEATURES/PROBLEMS: * Unified test execution environment for automated and manual tests * Extensible reports and notifications in various formats (email, rss, pdf, html etc.) * Web frontend and command line report generation tools for browsing the test results database (with rutemaweb) * Comprehensive history of test execution * A well defined way to create a project specific test specification format == SYNOPSIS: See http://patir.rubyforge.org/rutema/distro_test.html for an introductory example. == REQUIREMENTS: * patir (http://patir.rubyforge.org) * mailfactory (http://rubyforge.org/projects/mailfactory/) * activerecord (http://ar.rubyonrails.com/) * sqlite3 (http://rubyforge.org/projects/sqlite-ruby/) * ruport (http://rubyreports.org/) * acts_as_reportable * highline"
86
86
  email: riva@braveworld.net
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  requirements: []
160
160
 
161
161
  rubyforge_project: patir
162
- rubygems_version: 1.3.0
162
+ rubygems_version: 1.3.1
163
163
  signing_key:
164
164
  specification_version: 2
165
165
  summary: rutema is a test execution and management framework for heterogeneous testing environments