uttk 0.3.1.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.
- data/AUTHORS +36 -0
- data/COPYING +18 -0
- data/ChangeLog +7673 -0
- data/GUIDELINES +86 -0
- data/LGPL +504 -0
- data/NEWS +158 -0
- data/NORM +137 -0
- data/README +180 -0
- data/Rakefile +8 -0
- data/SPEC.gemspec +15 -0
- data/SPEC.yml +60 -0
- data/TODO +23 -0
- data/TODO.old +31 -0
- data/VERSION +5 -0
- data/bin/getopts/uttk.rb +390 -0
- data/bin/uttk +188 -0
- data/bin/uttk-unit +125 -0
- data/lib/uttk.rb +288 -0
- data/lib/uttk/dumpers/Basic.rb +23 -0
- data/lib/uttk/dumpers/BasicColor.rb +35 -0
- data/lib/uttk/dumpers/Dumper.rb +77 -0
- data/lib/uttk/dumpers/Html.rb +271 -0
- data/lib/uttk/dumpers/Path.rb +24 -0
- data/lib/uttk/dumpers/Xml.rb +88 -0
- data/lib/uttk/dumpers/Yaml.rb +138 -0
- data/lib/uttk/filters.rb +128 -0
- data/lib/uttk/filters/Buffer.rb +119 -0
- data/lib/uttk/filters/Compact.rb +75 -0
- data/lib/uttk/filters/Default.rb +27 -0
- data/lib/uttk/filters/DefaultColor.rb +27 -0
- data/lib/uttk/filters/Filter.rb +53 -0
- data/lib/uttk/filters/Id.rb +30 -0
- data/lib/uttk/filters/JustStatus.rb +25 -0
- data/lib/uttk/filters/KeepSkipBased.rb +38 -0
- data/lib/uttk/filters/NodeCut.rb +97 -0
- data/lib/uttk/filters/RPathFilter.rb +134 -0
- data/lib/uttk/filters/Saver.rb +53 -0
- data/lib/uttk/filters/TextFilter.rb +69 -0
- data/lib/uttk/generators/dumper_generator.rb +28 -0
- data/lib/uttk/generators/filter_generator.rb +28 -0
- data/lib/uttk/generators/generator.rb +86 -0
- data/lib/uttk/generators/generator_generator.rb +26 -0
- data/lib/uttk/generators/loader_generator.rb +28 -0
- data/lib/uttk/generators/path_filter_generator.rb +28 -0
- data/lib/uttk/generators/strategy_generator.rb +28 -0
- data/lib/uttk/generators/templates/dumper.rb +50 -0
- data/lib/uttk/generators/templates/filter.rb +50 -0
- data/lib/uttk/generators/templates/generator.rb +28 -0
- data/lib/uttk/generators/templates/loader.rb +26 -0
- data/lib/uttk/generators/templates/path_filter.rb +28 -0
- data/lib/uttk/generators/templates/strategy.rb +59 -0
- data/lib/uttk/generators/templates/strategy.yml +28 -0
- data/lib/uttk/generators/templates/unit_test.rb +46 -0
- data/lib/uttk/loaders/Loader.rb +180 -0
- data/lib/uttk/loaders/Ruby.rb +28 -0
- data/lib/uttk/loaders/Yaml.rb +98 -0
- data/lib/uttk/logger.rb +306 -0
- data/lib/uttk/logger/backend.rb +170 -0
- data/lib/uttk/logger/path.rb +202 -0
- data/lib/uttk/logger/section_node.rb +214 -0
- data/lib/uttk/logger/severity.rb +63 -0
- data/lib/uttk/logger/to_uttk_log.rb +127 -0
- data/lib/uttk/logger/verbosity.rb +61 -0
- data/lib/uttk/logger_factory.rb +55 -0
- data/lib/uttk/path_filters/ColorStatus.rb +57 -0
- data/lib/uttk/path_filters/PathFilter.rb +27 -0
- data/lib/uttk/path_filters/RemoveTypes.rb +25 -0
- data/lib/uttk/status.rb +146 -0
- data/lib/uttk/strategies/Abort.rb +24 -0
- data/lib/uttk/strategies/Assert.rb +44 -0
- data/lib/uttk/strategies/Authors.rb +45 -0
- data/lib/uttk/strategies/Block.rb +113 -0
- data/lib/uttk/strategies/Bootstrap.rb +55 -0
- data/lib/uttk/strategies/Checkout.rb +64 -0
- data/lib/uttk/strategies/Clean.rb +29 -0
- data/lib/uttk/strategies/Cmd.rb +60 -0
- data/lib/uttk/strategies/CmdBase.rb +130 -0
- data/lib/uttk/strategies/Collection.rb +158 -0
- data/lib/uttk/strategies/Compile.rb +59 -0
- data/lib/uttk/strategies/Composite.rb +201 -0
- data/lib/uttk/strategies/Composite/contents_eval.rb +40 -0
- data/lib/uttk/strategies/Configure.rb +66 -0
- data/lib/uttk/strategies/Error.rb +23 -0
- data/lib/uttk/strategies/Fail.rb +26 -0
- data/lib/uttk/strategies/IOBased.rb +159 -0
- data/lib/uttk/strategies/Import.rb +60 -0
- data/lib/uttk/strategies/Iterate.rb +139 -0
- data/lib/uttk/strategies/JUnit.rb +205 -0
- data/lib/uttk/strategies/KillAll.rb +62 -0
- data/lib/uttk/strategies/Make.rb +94 -0
- data/lib/uttk/strategies/Package.rb +129 -0
- data/lib/uttk/strategies/PackageCollection.rb +78 -0
- data/lib/uttk/strategies/Pass.rb +24 -0
- data/lib/uttk/strategies/Pool.rb +104 -0
- data/lib/uttk/strategies/ProbabilityThreshold.rb +46 -0
- data/lib/uttk/strategies/Proxy.rb +42 -0
- data/lib/uttk/strategies/RMatch.rb +92 -0
- data/lib/uttk/strategies/RUnit.rb +132 -0
- data/lib/uttk/strategies/SignalCmd.rb +85 -0
- data/lib/uttk/strategies/Sleep.rb +36 -0
- data/lib/uttk/strategies/SqlQuery.rb +120 -0
- data/lib/uttk/strategies/Strategy.rb +683 -0
- data/lib/uttk/strategies/Stub.rb +37 -0
- data/lib/uttk/strategies/SubCmd.rb +77 -0
- data/lib/uttk/strategies/Suite.rb +71 -0
- data/lib/uttk/strategies/Test.rb +89 -0
- data/lib/uttk/streams.rb +69 -0
- data/lib/uttk/streams/Diff.rb +60 -0
- data/lib/uttk/streams/HexaDiff.rb +35 -0
- data/lib/uttk/streams/Stream.rb +76 -0
- data/lib/uttk/weights.rb +17 -0
- data/lib/uttk/weights/WExpr.rb +68 -0
- data/lib/uttk/weights/WFloat.rb +23 -0
- data/lib/uttk/weights/WMin.rb +22 -0
- data/lib/uttk/weights/Weight.rb +105 -0
- data/lib/www/javascripts/uttk.js +185 -0
- data/misc/expandtab.rb +29 -0
- data/misc/header.rb +44 -0
- data/misc/renaming +57 -0
- data/misc/textile_compiler +194 -0
- data/misc/uttk-grep.sh +8 -0
- data/misc/uttk-line-count.rb +143 -0
- data/test/examples-suite.yml +8 -0
- data/test/examples/README +68 -0
- data/test/examples/basic.rb +10 -0
- data/test/examples/basic.yml +9 -0
- data/test/examples/cache/cache_and_fatal.yml +5 -0
- data/test/examples/cache/simple.yml +30 -0
- data/test/examples/sql/basic.yml +24 -0
- data/test/examples/students-suite.yml +9 -0
- data/test/examples/students/ball.yml +11 -0
- data/test/examples/students/glob_stud.yml +20 -0
- data/test/examples/students/mini-lib.yml +61 -0
- data/test/examples/students/pool_stud.yml +31 -0
- data/test/examples/students/stud.yml +21 -0
- data/test/fixtures/ball/20040804-exam_a1-zapngo-tessar_m.tar.gz +0 -0
- data/test/fixtures/ball/Makefile +24 -0
- data/test/fixtures/ball/bar_p-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/bar_p-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/bar_p-mini-lib/my_strlen.c +13 -0
- data/test/fixtures/ball/foo_s-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/foo_s-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/foo_s-mini-lib/configure +2 -0
- data/test/fixtures/ball/foo_s-mini-lib/my_strlen.c +10 -0
- data/test/fixtures/ball/hello.tar.bz2 +0 -0
- data/test/fixtures/ball/hello.tar.gz +0 -0
- data/test/fixtures/ball/hello/Makefile +14 -0
- data/test/fixtures/ball/hello/hello.c +7 -0
- data/test/fixtures/ball/jack-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/jack-exit/Makefile +14 -0
- data/test/fixtures/ball/jack-exit/exit.c +16 -0
- data/test/fixtures/ball/joe-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/joe-exit/Makefile +14 -0
- data/test/fixtures/ball/joe-exit/exit.c +8 -0
- data/test/fixtures/ball/joe_i-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/joe_i-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/joe_i-mini-lib/configure +2 -0
- data/test/fixtures/ball/joe_i-mini-lib/my_strlen.c +10 -0
- data/test/fixtures/ball/john-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/john-exit/Makefile +14 -0
- data/test/fixtures/ball/john-exit/exit.c +6 -0
- data/test/fixtures/ball/qux_j-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/qux_j-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/qux_j-mini-lib/my_strlen.c +12 -0
- data/test/fixtures/binaries/segv +0 -0
- data/test/fixtures/binaries/segv.c +10 -0
- data/test/fixtures/binaries/segv.rb +2 -0
- data/test/fixtures/demo/command-tutorial/steps/1/check.yml +5 -0
- data/test/fixtures/demo/command-tutorial/steps/1/pluralizer.rb +10 -0
- data/test/fixtures/demo/command-tutorial/steps/2/bad_check.yml +7 -0
- data/test/fixtures/demo/command-tutorial/steps/2/check.yml +7 -0
- data/test/fixtures/demo/command-tutorial/steps/2/pluralizer.rb +10 -0
- data/test/fixtures/demo/command-tutorial/steps/3.1/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/3/check.yml +14 -0
- data/test/fixtures/demo/command-tutorial/steps/4.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/4.1/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/4/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/4/pluralizer.rb +12 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/check.yml +17 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/5/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/5/check.yml +16 -0
- data/test/fixtures/demo/command-tutorial/steps/5/pluralizer.rb +16 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/check.yml +22 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/6/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/6/check.yml +21 -0
- data/test/fixtures/demo/command-tutorial/steps/6/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/7/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/7/check.yml +22 -0
- data/test/fixtures/demo/command-tutorial/steps/7/pluralizer.rb +17 -0
- data/test/fixtures/demo/filter-tutorial/check.yml +20 -0
- data/test/fixtures/demo/filter-tutorial/filters/CutSkip100.rb +19 -0
- data/test/fixtures/demo/filter-tutorial/pluralizer.rb +17 -0
- data/test/fixtures/java/unit/MultiRight/Foo/Foo.java +11 -0
- data/test/fixtures/java/unit/MultiRight/Foo/FooTest.java +15 -0
- data/test/fixtures/java/unit/MultiRight/MultiRight.java +13 -0
- data/test/fixtures/java/unit/MultiRight/MultiRightTest.java +12 -0
- data/test/fixtures/java/unit/MultiRight/bar/Bar.java +11 -0
- data/test/fixtures/java/unit/MultiRight/bar/BarTest.java +21 -0
- data/test/fixtures/java/unit/MultiRight/build.sh +7 -0
- data/test/fixtures/java/unit/SimpleException/SimpleExceptionTest.java +11 -0
- data/test/fixtures/java/unit/SimpleException/build.sh +4 -0
- data/test/fixtures/java/unit/build.sh +9 -0
- data/test/fixtures/java/unit/multibar.yml +6 -0
- data/test/fixtures/java/unit/multifoo.yml +6 -0
- data/test/fixtures/java/unit/multiright.yml +8 -0
- data/test/fixtures/java/unit/simple_exception.yml +6 -0
- data/test/fixtures/mini-lib/Makefile +9 -0
- data/test/fixtures/mini-lib/strlen.c +15 -0
- data/test/fixtures/package/pkg_foo.tar.gz +0 -0
- data/test/fixtures/package/pkg_foo/Makefile +20 -0
- data/test/fixtures/package/pkg_foo/bootstrap +3 -0
- data/test/fixtures/package/pkg_foo/configure +3 -0
- data/test/fixtures/package/pkg_foo/foo.sh +2 -0
- data/test/fixtures/text/1.txt +4 -0
- data/test/fixtures/unit/bad.rb +26 -0
- data/test/fixtures/unit/error.rb +6 -0
- data/test/fixtures/unit/good.rb +26 -0
- data/test/functional-suite.yml +10 -0
- data/test/functional/author.yml +11 -0
- data/test/functional/base.yml +119 -0
- data/test/functional/base_pool.yml +13 -0
- data/test/functional/block.yml +13 -0
- data/test/functional/cat.yml +16 -0
- data/test/functional/cmd.yml +17 -0
- data/test/functional/diff.yml +27 -0
- data/test/functional/env_cmd.yml +53 -0
- data/test/functional/exit.yml +15 -0
- data/test/functional/fatal.yml +23 -0
- data/test/functional/glob.yml +11 -0
- data/test/functional/hexa-diff.yml +25 -0
- data/test/functional/import.yml +41 -0
- data/test/functional/iterate.yml +99 -0
- data/test/functional/killall.yml +31 -0
- data/test/functional/pkg.yml +14 -0
- data/test/functional/probability_threshold.yml +35 -0
- data/test/functional/r_unit.yml +26 -0
- data/test/functional/rmatch.yml +122 -0
- data/test/functional/signal_cmd.yml +22 -0
- data/test/functional/sub.yml +15 -0
- data/test/functional/test.yml +25 -0
- data/test/functional/timeout.yml +20 -0
- data/test/functional/wc.yml +26 -0
- data/test/functional/weight.yml +152 -0
- data/test/pkg-suite.yml +8 -0
- data/test/pkg/cmdline.yml +80 -0
- data/test/pool-suite.yml +8 -0
- data/test/pool/base.yml +12 -0
- data/test/pool/pool.yml +25 -0
- data/test/ruby-suite.rb +10 -0
- data/test/ruby-suite.yml +5 -0
- data/test/ruby/base.rb +119 -0
- data/test/ruby/iterate.rb +21 -0
- data/test/ruby/wc.rb +43 -0
- data/test/unit-suite.yml +10 -0
- data/test/unit/dumpers/path_test.rb +46 -0
- data/test/unit/dumpers/xml_test.rb +65 -0
- data/test/unit/dumpers/yaml_test.rb +65 -0
- data/test/unit/filters/buffer_test.rb +168 -0
- data/test/unit/filters/keep_skip_based_test.rb +46 -0
- data/test/unit/filters/node_cut_test.rb +72 -0
- data/test/unit/filters/rpath_filter_test.rb +191 -0
- data/test/unit/filters/text_filter_test.rb +46 -0
- data/test/unit/filters_test.rb +119 -0
- data/test/unit/logger/section_node_test.rb +120 -0
- data/test/unit/logger/severity_test.rb +37 -0
- data/test/unit/logger/to_uttk_log_test.rb +113 -0
- data/test/unit/logger/verbosity_test.rb +44 -0
- data/test/unit/logger_test.rb +203 -0
- data/test/unit/strategies/suite_test.rb +151 -0
- data/test/uttk-check.yml +8 -0
- data/test/uttk-distcheck.yml +18 -0
- metadata +399 -0
data/NEWS
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
= New in 0.3, 2006-02-25:
|
|
2
|
+
|
|
3
|
+
This release is a minor which provides also some interesting improvements:
|
|
4
|
+
|
|
5
|
+
* Compatibility:
|
|
6
|
+
|
|
7
|
+
Uttk is now fully compatible with Ruby 1.8.4. Backward compatibility with
|
|
8
|
+
older version of Ruby is no longer maintained.
|
|
9
|
+
|
|
10
|
+
* Templates:
|
|
11
|
+
|
|
12
|
+
They are now managed by the Rails generator. So, you need Rails installed
|
|
13
|
+
to use them.
|
|
14
|
+
|
|
15
|
+
* Select your test from the command line:
|
|
16
|
+
|
|
17
|
+
Use the --rpath option to select the tests you want to run.
|
|
18
|
+
|
|
19
|
+
* Logger/Dumpers/Filters:
|
|
20
|
+
|
|
21
|
+
Bunch all together in a powerful back-end set. Filters are reloaded!
|
|
22
|
+
|
|
23
|
+
* Distributed mode:
|
|
24
|
+
|
|
25
|
+
Not included in this release. Will be back soon!
|
|
26
|
+
|
|
27
|
+
* Uttk binary:
|
|
28
|
+
Clean the help option, split in two --help and --long-help.
|
|
29
|
+
|
|
30
|
+
* Loaders:
|
|
31
|
+
|
|
32
|
+
* Ruby: You can use the Ruby's syntax (and power) to write your test suite.
|
|
33
|
+
|
|
34
|
+
* Strategies:
|
|
35
|
+
|
|
36
|
+
* Strategy: Provides benchmark measurement.
|
|
37
|
+
* Assert:
|
|
38
|
+
This new strategy based on the strategy S::Block provides to the user
|
|
39
|
+
many assertions methods to easily define Ruby verifications. The
|
|
40
|
+
strategy S::Assert mixes-in Test::Unit::Assertions to do this job.
|
|
41
|
+
* Iterate:
|
|
42
|
+
This new strategy aims to provide a generic way to iterate over objects
|
|
43
|
+
to factor your test suite. It's based on ruby's `each'.
|
|
44
|
+
* CmdBase:
|
|
45
|
+
The command can now support a special argument %i, which is replaced by
|
|
46
|
+
the name of the input file.
|
|
47
|
+
|
|
48
|
+
* Miscellaneous:
|
|
49
|
+
|
|
50
|
+
* Ruby is now in the symbol table:
|
|
51
|
+
In your tests you now must use <<ruby>> instead of just ruby.
|
|
52
|
+
This will permit to easily control and change the running ruby.
|
|
53
|
+
|
|
54
|
+
= New in 0.2, 2005-05-06:
|
|
55
|
+
|
|
56
|
+
This release is mainly a BugFix release but it provides also some improvements:
|
|
57
|
+
|
|
58
|
+
* Add templates to easily create your own loaders, dumpers, strategies...:
|
|
59
|
+
|
|
60
|
+
* new_strategy.rb
|
|
61
|
+
* new_dumper.rb
|
|
62
|
+
* new_loader.rb
|
|
63
|
+
* new_runit_test.rb
|
|
64
|
+
|
|
65
|
+
* Strategies:
|
|
66
|
+
|
|
67
|
+
* RUnit: Add an option to make the core_ex require optional.
|
|
68
|
+
Add an `args' attribute.
|
|
69
|
+
* PackageCollection: Add a documentation.
|
|
70
|
+
* SubCmd: Use the new D::Notif output stream.
|
|
71
|
+
* CmdBase: Declare a father hook.
|
|
72
|
+
* Authors: Fix the regexp.
|
|
73
|
+
* Composite: Update to the new testify.
|
|
74
|
+
* Collection: Update testify, and log.
|
|
75
|
+
* Checkout: Set :checkout_dir like :extract_dir.
|
|
76
|
+
* RemoteCmd: Include its HostDispatcher.
|
|
77
|
+
|
|
78
|
+
* Dumpers:
|
|
79
|
+
|
|
80
|
+
* Notif: Output is now a Yaml stream.
|
|
81
|
+
* Any dumpers can now easily support flushable outputs.
|
|
82
|
+
|
|
83
|
+
* Logger:
|
|
84
|
+
|
|
85
|
+
* Improve the Logger adding sugars.
|
|
86
|
+
* Skip the message when the block returns nil.
|
|
87
|
+
* LoggerFactory: Make section_tree available, and clean
|
|
88
|
+
create_section_tree.
|
|
89
|
+
|
|
90
|
+
= New in 0.1, 2005-04-12:
|
|
91
|
+
|
|
92
|
+
* Strategies:
|
|
93
|
+
|
|
94
|
+
Many strategies are already available.
|
|
95
|
+
|
|
96
|
+
* Concrete strategies
|
|
97
|
+
- Suite strategies: Suite, Pool, Glob
|
|
98
|
+
- Command based strategies: Cmd, SubCmd, SignalCmd
|
|
99
|
+
- Unit test strategies: RUnit, JUnit
|
|
100
|
+
- Packaging strategies: Package, Checkout, Make, PackageCollection,
|
|
101
|
+
Bootstrap, Authors, Configure, Compile, Clean
|
|
102
|
+
- Distributed mode strategies:
|
|
103
|
+
- unstable/testing: DistDuplicate, DistDelegate, Distribute
|
|
104
|
+
- stable: Tester, Fetch, Fetcher
|
|
105
|
+
- Basic and useful strategies: Sleep, Block, KillAll, Import
|
|
106
|
+
- Elementary strategies: Pass, Abort, Error, Fail, Stub
|
|
107
|
+
- Test strategies: Test, ProbabilityThreshold
|
|
108
|
+
- Database strategies: SqlQuery
|
|
109
|
+
|
|
110
|
+
* Abstract strategies:
|
|
111
|
+
- Strategy
|
|
112
|
+
- Composite
|
|
113
|
+
- Collection
|
|
114
|
+
- Proxy
|
|
115
|
+
- IOBased
|
|
116
|
+
- CmdBase
|
|
117
|
+
- DistStrategy
|
|
118
|
+
|
|
119
|
+
* Loaders:
|
|
120
|
+
|
|
121
|
+
A YAML loader is provided to easily write the test suite.
|
|
122
|
+
|
|
123
|
+
* Dumper:
|
|
124
|
+
|
|
125
|
+
A YAML dumper which follow the same format than the YAML loader provides a
|
|
126
|
+
human/script readable way to dump the suite result. An XML dumper is also
|
|
127
|
+
available to easily put online the suite result.
|
|
128
|
+
|
|
129
|
+
* Logger:
|
|
130
|
+
|
|
131
|
+
A specific Logger which manage a severity level, a verbosity level and
|
|
132
|
+
a section tree. Dumpers and/or Filters can be plugged to it.
|
|
133
|
+
|
|
134
|
+
* Filters:
|
|
135
|
+
|
|
136
|
+
Only two basic filters: Saver and BasicLogger. The filtering system is not
|
|
137
|
+
yet very developed.
|
|
138
|
+
|
|
139
|
+
* Statistics computation system:
|
|
140
|
+
|
|
141
|
+
Uttk computes a weighted average of the succeed test of the test suite. This
|
|
142
|
+
system is extensible to allow other kinds of computation.
|
|
143
|
+
|
|
144
|
+
* A functional environment which handle shared values between strategies.
|
|
145
|
+
|
|
146
|
+
* Distributed mode:
|
|
147
|
+
|
|
148
|
+
This feature of Uttk is still unstable but already provides some interesting
|
|
149
|
+
result. It is based on a specific daemon running on remote machine.
|
|
150
|
+
|
|
151
|
+
* Cache system:
|
|
152
|
+
|
|
153
|
+
Uttk remembers the successful test across session. Not yet fully tested, but
|
|
154
|
+
already usable.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
--
|
|
158
|
+
Uttk's Maintainers
|
data/NORM
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
-*- outline -*-
|
|
2
|
+
|
|
3
|
+
/*---------------------------------------.
|
|
4
|
+
| Coding style of Unified Test Tool Kit |
|
|
5
|
+
`---------------------------------------*/
|
|
6
|
+
|
|
7
|
+
/*------------------------------------------------------------------.
|
|
8
|
+
| This document consists of a set of rules which must be respect by |
|
|
9
|
+
| every maintainers of Unified Unified Test Tool Kit. |
|
|
10
|
+
`------------------------------------------------------------------*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* Introduction
|
|
14
|
+
|
|
15
|
+
This text deals with the norm applied to all official Unified Test Tool Kit
|
|
16
|
+
source files included in the distribution. Everyone who write a peace of code
|
|
17
|
+
into Unified Test Tool Kit must follow the rules below.
|
|
18
|
+
Every rules mentioned below are not about the layout of uttk's source file.
|
|
19
|
+
In this document some part of the ruby's standard library may be forbidden and
|
|
20
|
+
some features of Ruby too. We do so for stability/security and efficiency
|
|
21
|
+
reasons.
|
|
22
|
+
If you want to add a rule to this file you have to justify it with at least
|
|
23
|
+
one strong and objective argument. Any subjective rules will not be allowed in
|
|
24
|
+
this document. The summary of every rules must be scared to allow fast
|
|
25
|
+
reading.
|
|
26
|
+
|
|
27
|
+
* Coding style rules
|
|
28
|
+
|
|
29
|
+
** String evaluation
|
|
30
|
+
|
|
31
|
+
/*--------------------------------------------------------------.
|
|
32
|
+
| You have to use the double quoted string the least possible. |
|
|
33
|
+
`--------------------------------------------------------------*/
|
|
34
|
+
|
|
35
|
+
Ruby has two level of string evaluation: double quoted string and single
|
|
36
|
+
quoted string. The single quoted version is faster since less substitution are
|
|
37
|
+
allowed by Ruby. So, as soon as, you do not need a full evaluation of your
|
|
38
|
+
string you have to use the single quoted version for efficiency reason.
|
|
39
|
+
|
|
40
|
+
** Logger utilization
|
|
41
|
+
|
|
42
|
+
/*------------------------------------------------------.
|
|
43
|
+
| You have to write your log messages using the block. |
|
|
44
|
+
`------------------------------------------------------*/
|
|
45
|
+
|
|
46
|
+
Ruby's logger provides two ways to write your log messages. You can pass
|
|
47
|
+
your log string to the logger either as a function argument or as a block
|
|
48
|
+
which return a string. The second version is prefered since the block, thought
|
|
49
|
+
the string, will not be evaluated by Ruby if the log level severity is higher
|
|
50
|
+
than the level of your message. This way, time is saved for every debug
|
|
51
|
+
messages when your severity level is fatal, for instance.
|
|
52
|
+
|
|
53
|
+
** Using blocks
|
|
54
|
+
|
|
55
|
+
/*----------------------------------------------.
|
|
56
|
+
| Do not use yield, block_given?, iterator? |
|
|
57
|
+
| block.call (but []) and try minimize block[]. |
|
|
58
|
+
`-----------------------------------------------*/
|
|
59
|
+
|
|
60
|
+
*** Do not use yield
|
|
61
|
+
|
|
62
|
+
Ruby provides sevral ways to use blocks, and we retain the most efficient.
|
|
63
|
+
|
|
64
|
+
Examples:
|
|
65
|
+
|
|
66
|
+
# Bad | # Good
|
|
67
|
+
|
|
|
68
|
+
class A | class A
|
|
69
|
+
def each | def each ( &block )
|
|
70
|
+
@a.each { |k, v| yield k, v } | @a.each(&block)
|
|
71
|
+
end | end
|
|
72
|
+
|
|
|
73
|
+
def each_key | def each_key ( &block )
|
|
74
|
+
@a.each { |k, v| yield k } | @a.each_key(&block)
|
|
75
|
+
end | end
|
|
76
|
+
|
|
|
77
|
+
def each_value | def each_value ( &block )
|
|
78
|
+
@a.each { |k, v| yield v } | @a.each_value(&block)
|
|
79
|
+
end | end
|
|
80
|
+
end | end
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
*** Try to minimize block.call or block[]
|
|
84
|
+
|
|
85
|
+
# Bad | # Good
|
|
86
|
+
|
|
|
87
|
+
def each2 ( &block ) | def each2 ( &block )
|
|
88
|
+
@a.each do |k, v| | @a.each(&block)
|
|
89
|
+
block.call(k, v) | end
|
|
90
|
+
end |
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
*** No block_given? nor iterator?
|
|
94
|
+
|
|
95
|
+
Since we do not use yield, block_given? and iterator? are useless.
|
|
96
|
+
Example:
|
|
97
|
+
|
|
98
|
+
def foo ( &block )
|
|
99
|
+
if block # instead of block_given? or iterator?
|
|
100
|
+
...
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def foo ( &block )
|
|
105
|
+
if block.nil? # instead of not block_given? or not iterator?
|
|
106
|
+
...
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
*** No block.call but block[]
|
|
111
|
+
|
|
112
|
+
The methods [] and call are aliases. But the [] one is closer to a real
|
|
113
|
+
function call.
|
|
114
|
+
|
|
115
|
+
* Layout rules
|
|
116
|
+
|
|
117
|
+
** Try to respect the orginal style
|
|
118
|
+
|
|
119
|
+
** No Tabulations
|
|
120
|
+
|
|
121
|
+
Don't use tabulations. They pollute the code since editors and/or users are
|
|
122
|
+
not agree on the width of a tabulation. Tell your editor to replace them by
|
|
123
|
+
spaces. Expect in the ChangeLog which is handled automatically by Vcs.
|
|
124
|
+
|
|
125
|
+
*** Vim
|
|
126
|
+
Just type (or add it to your .vimrc): `:set expandtab'
|
|
127
|
+
|
|
128
|
+
*** Emacs
|
|
129
|
+
FIXME: FILL ME
|
|
130
|
+
|
|
131
|
+
** No trailling whitespaces
|
|
132
|
+
|
|
133
|
+
Do not let trailling whitespaces in your files !!!
|
|
134
|
+
|
|
135
|
+
** Newline required at the end of file
|
|
136
|
+
|
|
137
|
+
Do not let last line of file without a newline !!!
|
data/README
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
= Uttk - Unified Test Tool Kit
|
|
4
|
+
|
|
5
|
+
Unified Test Tool Kit, aka Uttk, is designed to ease the test stage of the
|
|
6
|
+
development of your projects.
|
|
7
|
+
|
|
8
|
+
Testing is as important as design and implementation of a project. But it's
|
|
9
|
+
very cumbersome to write tests and tester scripts. That's why a project such
|
|
10
|
+
as Uttk can help you. It is written in Ruby, which is a high level object
|
|
11
|
+
oriented scripting language. Unified Test Tool Kit allows two ways of test
|
|
12
|
+
writing: a configuration file way (using YAML: an XML plain text format) and a
|
|
13
|
+
class extension way where you can extend an already made class to specialize
|
|
14
|
+
it for your own project case.
|
|
15
|
+
|
|
16
|
+
Uttk's philosophy follows the principle that you can always extend already
|
|
17
|
+
made test strategy to specialize/extend it. Initially, Uttk comes with a few
|
|
18
|
+
test strategies and provides specially, abstract test strategies. Thus, Uttk
|
|
19
|
+
will become bigger only by contributions from its users who publish their test
|
|
20
|
+
strategies. At the end, it will provide enough test strategies that almost
|
|
21
|
+
everybody will find the test strategy he needs.
|
|
22
|
+
|
|
23
|
+
Uttk comes with a set of classic test strategies, statistics computation, a
|
|
24
|
+
test suite manager, a loader architecture, and a back-end that supports a
|
|
25
|
+
powerful filtering system.
|
|
26
|
+
|
|
27
|
+
Previous releases were shipped with a distributed mode. This is no longer the
|
|
28
|
+
case. Uttk's architecture has changed and the former distributed mode doesn't
|
|
29
|
+
work any more to be almost rewritten from scratch. That's why we decided to
|
|
30
|
+
not include it in this release. It will be back soon!
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
= Roadmap
|
|
34
|
+
|
|
35
|
+
- If you want to use Uttk to test your command line based program, see the
|
|
36
|
+
Uttk::Strategies::Cmd strategy documentation.
|
|
37
|
+
- If you want to use Uttk to wrap your unit test suite, see the
|
|
38
|
+
Uttk::Strategies::RUnit strategy documentation.
|
|
39
|
+
- If you want to try writing your own strategy, see the Uttk::Strategies module
|
|
40
|
+
documentation.
|
|
41
|
+
- If you want to try writing your own loader, see the Uttk::Loaders module
|
|
42
|
+
documentation.
|
|
43
|
+
- If you want to try writing your own dumper, see the Uttk::Dumpers module
|
|
44
|
+
documentation.
|
|
45
|
+
- If you want to try writing your own filter, see the Uttk::Filters module
|
|
46
|
+
documentation.
|
|
47
|
+
- If you want to try writing your own filter, see the Uttk::Weights module
|
|
48
|
+
documentation.
|
|
49
|
+
- If you want to use Uttk as a library and to write your own driver, see the Uttk
|
|
50
|
+
module documentation.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
= Usage
|
|
54
|
+
|
|
55
|
+
Uttk is invoked from the command line using:
|
|
56
|
+
|
|
57
|
+
% uttk <options> [files...]
|
|
58
|
+
|
|
59
|
+
Strategies described in the files are instantiated and run. The files format
|
|
60
|
+
must follow the one the chosen loader understand. By default, Uttk uses the
|
|
61
|
+
YAML loader. Use the -L option to use another loader.
|
|
62
|
+
|
|
63
|
+
You can have a description of all Uttk's options using this command:
|
|
64
|
+
|
|
65
|
+
% uttk --long-help
|
|
66
|
+
|
|
67
|
+
A shorter help message is printed by:
|
|
68
|
+
|
|
69
|
+
% uttk -h
|
|
70
|
+
|
|
71
|
+
Uttk can show you a list of all dynamic strategies available, this way:
|
|
72
|
+
|
|
73
|
+
% uttk --strategy-list
|
|
74
|
+
|
|
75
|
+
If you want to have a description of all the available attributes of a given
|
|
76
|
+
strategy, use this command:
|
|
77
|
+
|
|
78
|
+
% uttk -H <the-given-strategy>
|
|
79
|
+
|
|
80
|
+
If you want to see the list of all the available loader, type this command:
|
|
81
|
+
|
|
82
|
+
% uttk -L
|
|
83
|
+
|
|
84
|
+
For the filters/dumpers do that:
|
|
85
|
+
|
|
86
|
+
% uttk -F
|
|
87
|
+
|
|
88
|
+
And, for weight classes:
|
|
89
|
+
|
|
90
|
+
% uttk -W
|
|
91
|
+
|
|
92
|
+
To set the level of severity of the Uttk's logger use the -d option. Without
|
|
93
|
+
argument, it will show you all the available levels:
|
|
94
|
+
|
|
95
|
+
% uttk -d
|
|
96
|
+
|
|
97
|
+
Otherwise, give a correct level as argument to the -d option:
|
|
98
|
+
|
|
99
|
+
% uttk -d debug
|
|
100
|
+
|
|
101
|
+
By default, the severity level is _fatal_.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
= Examples
|
|
105
|
+
|
|
106
|
+
Some examples are available in the test/examples directory. These examples
|
|
107
|
+
are written for the default loader of Uttk (the YAML loader). If you want to
|
|
108
|
+
learn more about YAML, see its cookbook at
|
|
109
|
+
http://yaml4r.sourceforge.net/cookbook/.
|
|
110
|
+
|
|
111
|
+
A detailed description of these examples is available in the
|
|
112
|
+
test/examples/README file.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
= Stable and unstable parts
|
|
116
|
+
|
|
117
|
+
Uttk is still under development. Thus, there are some part of it which are
|
|
118
|
+
still unstable. Of course, even some stable part are not bug free: Perfection
|
|
119
|
+
doesn't exist!
|
|
120
|
+
|
|
121
|
+
* Stable parts:
|
|
122
|
+
- The loaders, filters, dumpers, strategies and logger architecture.
|
|
123
|
+
- The YAML and Ruby loader.
|
|
124
|
+
- The YAML, XML and HTML dumper.
|
|
125
|
+
- All strategies are considered stable except if a special warning is
|
|
126
|
+
mentioned in its documentation.
|
|
127
|
+
|
|
128
|
+
* Unstable parts:
|
|
129
|
+
- The timeout features provided by the abstract strategy _Strategy_ tend to
|
|
130
|
+
be stable but it may block some times. You can use it, since it works most
|
|
131
|
+
of the time.
|
|
132
|
+
- The {pre,post}_assertion features provided by the abstract strategy
|
|
133
|
+
_Strategy_ doesn't work yet.
|
|
134
|
+
- Some old YAML loader are still in the repository, for backward
|
|
135
|
+
compatibility reasons, but we discourage their usage.
|
|
136
|
+
|
|
137
|
+
= Repository tree description
|
|
138
|
+
|
|
139
|
+
[NEWS] What's new in each release of Uttk.
|
|
140
|
+
[AUTHORS] Present all authors and what they have done for Uttk.
|
|
141
|
+
[bin] Contains all drivers provided by Uttk.
|
|
142
|
+
[ChangeLog] Keep track of the changes of Uttk for all revisions.
|
|
143
|
+
[COPYING] Describe the license.
|
|
144
|
+
[LGPL] The Gnu Lesser General Public license.
|
|
145
|
+
[GUIDELINES] Some guide lines for the developers.
|
|
146
|
+
[doc] Documentation directory.
|
|
147
|
+
[doc/html] RDoc output directory.
|
|
148
|
+
[doc/demo] Some tutorials.
|
|
149
|
+
[doc/presentation] Slides of presentation.
|
|
150
|
+
[lib] Contains the library.
|
|
151
|
+
[misc] Some useful miscellaneous scripts when developing Uttk.
|
|
152
|
+
[NORM] Everybody who write code for Uttk must follow the rules written in this
|
|
153
|
+
file.
|
|
154
|
+
[Rakefile] For rubygem, doc generation and more generaly packaging operations.
|
|
155
|
+
[README] This file.
|
|
156
|
+
[script] Useful script for the end users and the developers similar to Rails
|
|
157
|
+
script directory).
|
|
158
|
+
[test] Contains Uttk's tests.
|
|
159
|
+
[TODO] What maintainers have to do.
|
|
160
|
+
[VERSION] The current version of Uttk.
|
|
161
|
+
|
|
162
|
+
= Bugs reports, features requests, and known bugs
|
|
163
|
+
|
|
164
|
+
If you want to send us a bug report or a feature request, have a look at the
|
|
165
|
+
TODO file.
|
|
166
|
+
|
|
167
|
+
An exhaustive list of known bugs is available at
|
|
168
|
+
http://dev.uttk.org.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
= License
|
|
172
|
+
|
|
173
|
+
Uttk is copyright (C) 2004-2005 Uttk's maintainers. It is free software, and may
|
|
174
|
+
be redistributed under the terms specified in the COPYING file of the Uttk
|
|
175
|
+
distribution. Uttk's maintainers refers to the people mentioned in the AUTHORS
|
|
176
|
+
file.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
--
|
|
180
|
+
Uttk's maintainers
|