crab 0.2.8 → 0.2.9
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/.rvmrc +1 -1
- data/README.md +73 -30
- data/bin/crab-tc-find +5 -1
- data/bin/crab-tc-list +5 -1
- data/bin/crab-tc-ls +5 -1
- data/bin/crab-testcase-find +5 -1
- data/bin/crab-testcase-list +5 -1
- data/bin/crab-testcase-ls +5 -1
- data/lib/crab/rally.rb +6 -4
- data/lib/crab/version.rb +1 -1
- metadata +4 -4
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use --create ree@
|
1
|
+
rvm use --create ree@crab
|
data/README.md
CHANGED
@@ -60,8 +60,8 @@ Thankfully, that part is easy:
|
|
60
60
|
|
61
61
|
...
|
62
62
|
|
63
|
-
If there are any test cases,
|
64
|
-
|
63
|
+
If there are any test cases associated with that story, they get converted
|
64
|
+
into Cucumber scenarios:
|
65
65
|
|
66
66
|
$ crab story show US1001
|
67
67
|
...
|
@@ -73,22 +73,49 @@ steps:
|
|
73
73
|
|
74
74
|
...
|
75
75
|
|
76
|
+
To convert a bunch of stories in one go, this pipe does the trick:
|
77
|
+
|
78
|
+
$ crab story list --iteration "Iteration 7" | cut -f 1 -d : | xargs crab story pull
|
79
|
+
|
80
|
+
They will be saved inside `./features/grooming`, `./features/defined`,
|
81
|
+
etc. The reason for using subdirs named after the status is so that
|
82
|
+
stories can be fleshed out and their scenarios added, moved around and
|
83
|
+
completed without necessarily breaking the build for others.
|
84
|
+
|
85
|
+
To see if there have been any changes to a story in Rally, try this:
|
86
|
+
|
87
|
+
$ crab story diff features/completed/US1010-safely-dispose-of-evidence.feature
|
88
|
+
|
76
89
|
Some data about stories can also be edited straight from the command line.
|
77
|
-
In that sense, `crab` acts more like a command-line interface to Rally
|
78
|
-
bridge between Rally and Cucumber, but the team thought these
|
79
|
-
convenient features to have
|
90
|
+
In that sense, `crab` acts more like a command-line interface to Rally
|
91
|
+
than a bridge between Rally and Cucumber, but the team thought these
|
92
|
+
were *very* convenient features to have.
|
93
|
+
|
94
|
+
Creating:
|
80
95
|
|
81
96
|
$ crab story create "Secure Access to Flying Fortress Controls"
|
82
97
|
US1004: Secure Access to Flying Fortress Controls (grooming)
|
83
98
|
|
99
|
+
Updating and moving:
|
100
|
+
|
84
101
|
$ crab story update US1001 --name "Arms Rockets Upon Successful Boot" --state completed
|
85
102
|
US1001: Arms Rockets Upon Successful Boot (completed)
|
86
103
|
|
104
|
+
$ crab story move US1002
|
105
|
+
US1002: Launches Rockets Upon Command from Evil Mastermind (completed)
|
106
|
+
$ crab story move US1002
|
107
|
+
US1002: Launches Rockets Upon Command from Evil Mastermind (accepted)
|
108
|
+
# eek, found a few problems!
|
109
|
+
$ crab story move US1002 --back
|
110
|
+
US1002: Launches Rockets Upon Command from Evil Mastermind (completed)
|
111
|
+
|
112
|
+
Deleting:
|
113
|
+
|
87
114
|
$ crab story delete US1004 # not in this movie :(
|
88
115
|
Story US1004 deleted.
|
89
116
|
|
90
|
-
It is also possible to create, update and delete test cases inside Rally
|
91
|
-
from the command line:
|
117
|
+
It is also possible to create, update and delete test cases inside Rally
|
118
|
+
straight from the command line:
|
92
119
|
|
93
120
|
$ crab testcase create US1001 "Rocket Silo Is Unlocked"
|
94
121
|
US1001/TC1501: Rocket Silo Is Unlocked (important medium automated acceptance)
|
@@ -99,13 +126,14 @@ from the command line:
|
|
99
126
|
$ crab testcase delete TC1501
|
100
127
|
Test case TC1501 deleted.
|
101
128
|
|
102
|
-
There are more switches. Try `crab --help` to find
|
129
|
+
There are many more switches. Try exploring `crab --help` to find
|
130
|
+
out more.
|
103
131
|
|
104
132
|
i18n Support
|
105
133
|
------------
|
106
134
|
|
107
|
-
`crab` uses [Gherkin][3] internally, so all languages supported by
|
108
|
-
included:
|
135
|
+
`crab` uses [Gherkin][3] internally, so all languages supported by
|
136
|
+
Cucumber are also included:
|
109
137
|
|
110
138
|
$ crab story show US1001 -l ja
|
111
139
|
機能: [US1001] Arms Rockets Upon Successful Boot
|
@@ -114,9 +142,10 @@ included:
|
|
114
142
|
Given a silo where the rockets are stored
|
115
143
|
...
|
116
144
|
|
117
|
-
Unfortunately, we could not think of a decent way to translate the steps
|
118
|
-
(see the `Given` there?), without using Gherkin to parse each
|
119
|
-
check that it can be used, which seemed a little
|
145
|
+
Unfortunately, we could not think of a decent way to translate the steps
|
146
|
+
themselves (see the `Given` there?), without using Gherkin to parse each
|
147
|
+
step individually and check that it can be used, which seemed a little
|
148
|
+
overkill for now.
|
120
149
|
|
121
150
|
Hopefully this will be enough for your case, but if not please let us know!
|
122
151
|
|
@@ -125,13 +154,15 @@ Hopefully this will be enough for your case, but if not please let us know!
|
|
125
154
|
Developing
|
126
155
|
----------
|
127
156
|
|
128
|
-
To develop `crab`, you are going to need [Bundler][4], [Aruba][5]
|
129
|
-
working Rally account with a project set up where you can edit
|
130
|
-
supplied `Gemfile`
|
157
|
+
To develop `crab`, you are going to need [Bundler][4], [Aruba][5]
|
158
|
+
and a working Rally account with a project set up where you can edit
|
159
|
+
things. The supplied `Gemfile` and the `cucumber:setup` task should take
|
160
|
+
care of everything else:
|
131
161
|
|
132
162
|
$ git clone git@github.com:cv/crab.git
|
133
163
|
$ cd crab
|
134
164
|
$ bundle install
|
165
|
+
$ rake cucumber:setup
|
135
166
|
$ rake
|
136
167
|
|
137
168
|
If you have any problems, please let us know.
|
@@ -146,43 +177,55 @@ To do / Roadmap
|
|
146
177
|
|
147
178
|
- `pull` is not very smart and could detect feature files being moved from one dir to another
|
148
179
|
- Recursively look for a `.crab` directory like Git does with `.git`
|
149
|
-
-
|
180
|
+
- Make logging verbosity level configurable using a global command line option
|
181
|
+
- Move more of the code away from the bin/ dir
|
182
|
+
- More thorough automated testing of commands
|
150
183
|
|
151
184
|
### 0.3.0
|
152
185
|
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
156
|
-
- Make it possible to associate defects with Features (essentially treating defects like stories)
|
186
|
+
- Do not add "default" tags to scenarios (`@important`, `@medium`, `@manual` and `@acceptance`)
|
187
|
+
- Figure out how to stub or simulate Rally (tests are taking way too long already)
|
188
|
+
- Make better use of Aruba to make sure generated files are OK
|
157
189
|
- Use the Gherkin models and formatters instead of dumb string templates to generate feature files
|
190
|
+
- Add a `push` subcommand which parses a Cucumber feature and adds or updates it (and test cases) in Rally
|
191
|
+
- Add a config command + `.crab/config` file to hold settings like project, etc
|
192
|
+
- A way to work in batches, or offline -- much faster!
|
158
193
|
|
159
|
-
###
|
194
|
+
### 0.4.0
|
160
195
|
|
161
|
-
-
|
196
|
+
- Error messages are still more cryptic than we'd like
|
162
197
|
- Add a Cucumber Formatter that updates Test Runs in Rally with results from CI
|
198
|
+
- Make it possible to associate defects with Features (essentially treating defects like stories)
|
199
|
+
- Encrypt password in generated `~/.crab/credentials`
|
163
200
|
- Test in Ruby 1.9
|
164
201
|
|
165
|
-
###
|
202
|
+
### Before 1.0.0
|
166
203
|
|
167
204
|
- Bash completion scripts
|
205
|
+
- Man pages
|
206
|
+
- Logo
|
207
|
+
- Website
|
168
208
|
|
169
209
|
Suggestions? Please get in touch!
|
170
210
|
|
171
211
|
Authors and Contributors
|
172
212
|
------------------------
|
173
213
|
|
174
|
-
- Carlos Villela <cvillela@thoughtworks.com>
|
175
|
-
- Rodrigo Kochenburger <rkochen@thoughtworks.com>
|
176
|
-
- Fabio Rehm <frehm@thoughtworks.com>
|
214
|
+
- Carlos Villela <cvillela@thoughtworks.com> (@cv)
|
215
|
+
- Rodrigo Kochenburger <rkochen@thoughtworks.com> (@divoxx)
|
216
|
+
- Fabio Rehm <frehm@thoughtworks.com> (@fgrehm)
|
177
217
|
|
178
|
-
And last but not least, Rodrigo Spohr <rspohr@thoughtworks.com>
|
218
|
+
And last but not least, Rodrigo Spohr <rspohr@thoughtworks.com> and
|
219
|
+
Camilo Ribeiro <cribeiro@thoughtworks.com> for the user testing.
|
179
220
|
|
180
221
|
Disclaimers
|
181
222
|
-----------
|
182
223
|
|
183
|
-
This project and its authors have no affiliation with Rally Software
|
224
|
+
This project and its authors have no affiliation with Rally Software
|
225
|
+
Development Corp. or the Cucumber project.
|
184
226
|
|
185
|
-
It was written as necessity in a real-world project, and by no means
|
227
|
+
It was written as necessity in a real-world project, and by no means
|
228
|
+
should represent endorsement of either product.
|
186
229
|
|
187
230
|
Rally (c) 2003-2011 Rally Software Development Corp.
|
188
231
|
|
data/bin/crab-tc-find
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/bin/crab-tc-list
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/bin/crab-tc-ls
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/bin/crab-testcase-find
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/bin/crab-testcase-list
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/bin/crab-testcase-ls
CHANGED
@@ -33,9 +33,13 @@ Usage: crab testcase find [options*] [text]
|
|
33
33
|
|
34
34
|
find_opts = {}
|
35
35
|
find_opts[:story] = rally.find_story_with_id opts[:story] if opts[:story_given]
|
36
|
+
find_opts[:priority] = opts[:priority].capitalize if opts[:priority_given]
|
37
|
+
find_opts[:method] = opts[:method].capitalize if opts[:method_given]
|
38
|
+
find_opts[:type] = opts[:type].capitalize if opts[:type_given]
|
39
|
+
find_opts[:risk] = opts[:risk].capitalize if opts[:risk_given]
|
36
40
|
|
37
41
|
rally.find_testcases(project, pattern, find_opts).each do |tc|
|
38
|
-
puts "#{tc.story.formatted_id}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
42
|
+
puts "#{tc.story.formatted_id if tc.story.rally_object}/#{tc.formatted_id}: #{tc.name} (#{tc.tags.join(" ")})"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/lib/crab/rally.rb
CHANGED
@@ -47,8 +47,9 @@ module Crab
|
|
47
47
|
equal :type, opts[:type].capitalize if opts[:type]
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
rally_testcases.map {|tc| Crab::TestCase.new(tc, @dry_run) }.tap do |testcases|
|
51
|
+
logger.info "Found #{testcases.size} test cases"
|
52
|
+
end
|
52
53
|
end
|
53
54
|
|
54
55
|
def find_stories(project, pattern, opts)
|
@@ -65,8 +66,9 @@ module Crab
|
|
65
66
|
equal :parent, opts[:parent].rally_object if opts[:parent]
|
66
67
|
end
|
67
68
|
|
68
|
-
|
69
|
-
|
69
|
+
rally_stories.map {|story| Crab::Story.new(story, @dry_run) }.tap do |stories|
|
70
|
+
logger.info "Found #{stories.size} stories"
|
71
|
+
end
|
70
72
|
end
|
71
73
|
|
72
74
|
def find_project(name)
|
data/lib/crab/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 9
|
10
|
+
version: 0.2.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carlos Villela
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-03 00:00:00 -03:00
|
19
19
|
default_executable: crab
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|