rutema 2.0.0.pre5 → 2.0.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +220 -213
- data/Manifest.txt +17 -18
- data/README.md +55 -55
- data/bin/rutema +7 -7
- data/lib/rutema/application.rb +61 -60
- data/lib/rutema/core/configuration.rb +207 -194
- data/lib/rutema/core/engine.rb +192 -185
- data/lib/rutema/core/framework.rb +88 -27
- data/lib/rutema/core/objectmodel.rb +0 -0
- data/lib/rutema/core/parser.rb +34 -34
- data/lib/rutema/core/reporter.rb +133 -129
- data/lib/rutema/core/runner.rb +93 -83
- data/lib/rutema/elements/minimal.rb +47 -47
- data/lib/rutema/parsers/xml.rb +156 -154
- data/lib/rutema/reporters/json.rb +34 -34
- data/lib/rutema/reporters/junit.rb +101 -97
- data/lib/rutema/version.rb +8 -8
- metadata +5 -7
- data/.gemtest +0 -0
- data/lib/rutema/reporters/nunit.rb +0 -103
data/README.md
CHANGED
@@ -1,56 +1,56 @@
|
|
1
|
-
##rutema
|
2
|
-
[![Build Status](https://secure.travis-ci.org/damphyr/rutema.png)](http://travis-ci.org/damphyr/rutema) [![Coverage Status](https://coveralls.io/repos/damphyr/rutema/badge.svg)](https://coveralls.io/r/damphyr/rutema) [![Code Climate](https://codeclimate.com/github/damphyr/rutema.png)](https://codeclimate.com/github/damphyr/rutema)
|
3
|
-
|
4
|
-
rutema [http://github.com/damphyr/rutema](http://github.com/damphyr/rutema)
|
5
|
-
|
6
|
-
rutema is a test execution tool and a framework for organizing and managing test execution across different tools.
|
7
|
-
|
8
|
-
It enables the combination of different test tools while it takes care of logging, reporting, archiving of results and formalizes execution of automated and manual tests.
|
9
|
-
|
10
|
-
It's purpose is to make testing in heterogeneous environments easier.
|
11
|
-
|
12
|
-
###Why?
|
13
|
-
Require consistency, repeatability and reliability from your test infrastructure while gathering data on every run.
|
14
|
-
|
15
|
-
Whether running through a checklist of manual steps, or executing a sequence of fully automated commands we always want to know if a test has failed, where it failed and what was the state of the system at that time.
|
16
|
-
|
17
|
-
rutema will gather all logs, timestamp them, store them and report on them.
|
18
|
-
|
19
|
-
Rutema core provides a reference implementation of a parser for a simple but extensible XML test specification format which works well out of the box but the framework provides clearly defined interfaces so you can write the parser for your own format and add reporters that log wherever is needed.
|
20
|
-
|
21
|
-
###The dry stuff
|
22
|
-
* Unified test execution environment for automated and manual tests
|
23
|
-
* Extensible reports and notifications in various formats (email, rss, pdf, html etc.)
|
24
|
-
* A well defined way to create a project specific test specification format
|
25
|
-
|
26
|
-
## Installation:
|
27
|
-
* gem install rutema
|
28
|
-
|
29
|
-
## Dependencies
|
30
|
-
The core functionality of rutema depends on the following gems:
|
31
|
-
* [patir](http://github.com/damphyr/patir)
|
32
|
-
* [highline](http://highline.rubyforge.org/)
|
33
|
-
|
34
|
-
## License:
|
35
|
-
(The MIT License)
|
36
|
-
|
37
|
-
Copyright (c) 2007-2015 Vassilis Rizopoulos
|
38
|
-
|
39
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
40
|
-
a copy of this software and associated documentation files (the
|
41
|
-
'Software'), to deal in the Software without restriction, including
|
42
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
43
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
44
|
-
permit persons to whom the Software is furnished to do so, subject to
|
45
|
-
the following conditions:
|
46
|
-
|
47
|
-
The above copyright notice and this permission notice shall be
|
48
|
-
included in all copies or substantial portions of the Software.
|
49
|
-
|
50
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
51
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
52
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
53
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
54
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
55
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
1
|
+
##rutema
|
2
|
+
[![Build Status](https://secure.travis-ci.org/damphyr/rutema.png)](http://travis-ci.org/damphyr/rutema) [![Coverage Status](https://coveralls.io/repos/damphyr/rutema/badge.svg)](https://coveralls.io/r/damphyr/rutema) [![Code Climate](https://codeclimate.com/github/damphyr/rutema.png)](https://codeclimate.com/github/damphyr/rutema)
|
3
|
+
|
4
|
+
rutema [http://github.com/damphyr/rutema](http://github.com/damphyr/rutema)
|
5
|
+
|
6
|
+
rutema is a test execution tool and a framework for organizing and managing test execution across different tools.
|
7
|
+
|
8
|
+
It enables the combination of different test tools while it takes care of logging, reporting, archiving of results and formalizes execution of automated and manual tests.
|
9
|
+
|
10
|
+
It's purpose is to make testing in heterogeneous environments easier.
|
11
|
+
|
12
|
+
###Why?
|
13
|
+
Require consistency, repeatability and reliability from your test infrastructure while gathering data on every run.
|
14
|
+
|
15
|
+
Whether running through a checklist of manual steps, or executing a sequence of fully automated commands we always want to know if a test has failed, where it failed and what was the state of the system at that time.
|
16
|
+
|
17
|
+
rutema will gather all logs, timestamp them, store them and report on them.
|
18
|
+
|
19
|
+
Rutema core provides a reference implementation of a parser for a simple but extensible XML test specification format which works well out of the box but the framework provides clearly defined interfaces so you can write the parser for your own format and add reporters that log wherever is needed.
|
20
|
+
|
21
|
+
###The dry stuff
|
22
|
+
* Unified test execution environment for automated and manual tests
|
23
|
+
* Extensible reports and notifications in various formats (email, rss, pdf, html etc.)
|
24
|
+
* A well defined way to create a project specific test specification format
|
25
|
+
|
26
|
+
## Installation:
|
27
|
+
* gem install rutema
|
28
|
+
|
29
|
+
## Dependencies
|
30
|
+
The core functionality of rutema depends on the following gems:
|
31
|
+
* [patir](http://github.com/damphyr/patir)
|
32
|
+
* [highline](http://highline.rubyforge.org/)
|
33
|
+
|
34
|
+
## License:
|
35
|
+
(The MIT License)
|
36
|
+
|
37
|
+
Copyright (c) 2007-2015 Vassilis Rizopoulos
|
38
|
+
|
39
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
40
|
+
a copy of this software and associated documentation files (the
|
41
|
+
'Software'), to deal in the Software without restriction, including
|
42
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
43
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
44
|
+
permit persons to whom the Software is furnished to do so, subject to
|
45
|
+
the following conditions:
|
46
|
+
|
47
|
+
The above copyright notice and this permission notice shall be
|
48
|
+
included in all copies or substantial portions of the Software.
|
49
|
+
|
50
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
51
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
52
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
53
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
54
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
55
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
56
56
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/rutema
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# Copyright (c) 2007-2015 Vassilis Rizopoulos. All rights reserved.
|
2
|
-
require 'rutema/application'
|
3
|
-
begin
|
4
|
-
Rutema::App.new(ARGV)
|
5
|
-
rescue Rutema::RutemaError
|
6
|
-
puts $!.message
|
7
|
-
exit 1
|
1
|
+
# Copyright (c) 2007-2015 Vassilis Rizopoulos. All rights reserved.
|
2
|
+
require 'rutema/application'
|
3
|
+
begin
|
4
|
+
Rutema::App.new(ARGV)
|
5
|
+
rescue Rutema::RutemaError
|
6
|
+
puts $!.message
|
7
|
+
exit 1
|
8
8
|
end
|
data/lib/rutema/application.rb
CHANGED
@@ -1,61 +1,62 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
require_relative "core/configuration"
|
3
|
-
require_relative "core/engine"
|
4
|
-
|
5
|
-
module Rutema
|
6
|
-
#Parses the commandline, sets up the configuration and launches Rutema::Engine
|
7
|
-
class App
|
8
|
-
def initialize command_line_args
|
9
|
-
parse_command_line(command_line_args)
|
10
|
-
@configuration=Rutema::Configuration.new(@config_file)
|
11
|
-
@configuration.context||={}
|
12
|
-
@configuration.context[:config_file]=File.expand_path(@config_file)
|
13
|
-
@configuration.context[:config_name]=File.basename(@config_file)
|
14
|
-
@configuration.context[:start_time]=Time.now
|
15
|
-
@configuration.reporters||={}
|
16
|
-
@configuration.reporters[Rutema::Reporters::Console]||={:class=>Rutema::Reporters::Console, "silent"=>@silent} unless @bare
|
17
|
-
@configuration.reporters[Rutema::Reporters::Summary]||={:class=>Rutema::Reporters::Summary, "silent"=>(@silent||@bare)}
|
18
|
-
@engine=Rutema::Engine.new(@configuration)
|
19
|
-
application_flow
|
20
|
-
end
|
21
|
-
private
|
22
|
-
def parse_command_line args
|
23
|
-
args.options do |opt|
|
24
|
-
opt.on("rutema v#{Version::STRING}")
|
25
|
-
opt.on("Options:")
|
26
|
-
opt.on("--config FILE", "-c FILE",String,"Loads the configuration from FILE") { |config_file| @config_file=config_file}
|
27
|
-
opt.on("--check","Runs just the check test"){@check=true}
|
28
|
-
#opt.on("--step","Runs test cases step by step"){@step=true}
|
29
|
-
opt.on("--silent","Suppresses console output (only for the default reporters)") { @silent=true}
|
30
|
-
opt.on("--bare","No default reporters whatsoever") { @bare=true}
|
31
|
-
#opt.on("--color","Adds color to the Console reporter") { @color=true}
|
32
|
-
opt.on("-v", "--version","Displays the version") { $stdout.puts("rutema v#{Version::STRING}");exit 0 }
|
33
|
-
opt.on("--help", "-h", "-?", "This text") { $stdout.puts opt; exit 0 }
|
34
|
-
opt.on("
|
35
|
-
opt.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
1
|
+
require 'optparse'
|
2
|
+
require_relative "core/configuration"
|
3
|
+
require_relative "core/engine"
|
4
|
+
|
5
|
+
module Rutema
|
6
|
+
#Parses the commandline, sets up the configuration and launches Rutema::Engine
|
7
|
+
class App
|
8
|
+
def initialize command_line_args
|
9
|
+
parse_command_line(command_line_args)
|
10
|
+
@configuration=Rutema::Configuration.new(@config_file)
|
11
|
+
@configuration.context||={}
|
12
|
+
@configuration.context[:config_file]=File.expand_path(@config_file)
|
13
|
+
@configuration.context[:config_name]=File.basename(@config_file)
|
14
|
+
@configuration.context[:start_time]=Time.now
|
15
|
+
@configuration.reporters||={}
|
16
|
+
@configuration.reporters[Rutema::Reporters::Console]||={:class=>Rutema::Reporters::Console, "silent"=>@silent} unless @bare
|
17
|
+
@configuration.reporters[Rutema::Reporters::Summary]||={:class=>Rutema::Reporters::Summary, "silent"=>(@silent||@bare)}
|
18
|
+
@engine=Rutema::Engine.new(@configuration)
|
19
|
+
application_flow
|
20
|
+
end
|
21
|
+
private
|
22
|
+
def parse_command_line args
|
23
|
+
args.options do |opt|
|
24
|
+
opt.on("rutema v#{Version::STRING}")
|
25
|
+
opt.on("Options:")
|
26
|
+
opt.on("--config FILE", "-c FILE",String,"Loads the configuration from FILE") { |config_file| @config_file=config_file}
|
27
|
+
opt.on("--check","Runs just the check test"){@check=true}
|
28
|
+
#opt.on("--step","Runs test cases step by step"){@step=true}
|
29
|
+
opt.on("--silent","Suppresses console output (only for the default reporters)") { @silent=true}
|
30
|
+
opt.on("--bare","No default reporters whatsoever") { @bare=true}
|
31
|
+
#opt.on("--color","Adds color to the Console reporter") { @color=true}
|
32
|
+
opt.on("-v", "--version","Displays the version") { $stdout.puts("rutema v#{Version::STRING}");exit 0 }
|
33
|
+
opt.on("--help", "-h", "-?", "This text") { $stdout.puts opt; exit 0 }
|
34
|
+
opt.on("--debug", "-d", "Turn on debug messages") { $DEBUG=true }
|
35
|
+
opt.on("You can provide a specification filename in order to run a single test")
|
36
|
+
opt.parse!
|
37
|
+
#and now the rest
|
38
|
+
unless @config_file
|
39
|
+
puts "No configuration file defined!\n"
|
40
|
+
$stdout.puts opt
|
41
|
+
exit 1
|
42
|
+
end
|
43
|
+
if !args.empty?
|
44
|
+
@test_identifier=args.shift
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
def application_flow
|
49
|
+
if @check
|
50
|
+
#run just the check test
|
51
|
+
if @configuration.check
|
52
|
+
exit @engine.run(@configuration.check)
|
53
|
+
else
|
54
|
+
raise Rutema::RutemaError,"There is no check test defined in the configuration."
|
55
|
+
end
|
56
|
+
else
|
57
|
+
#run everything
|
58
|
+
exit @engine.run(@test_identifier)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
61
62
|
end
|