allure-cucumber 0.5.7 → 0.5.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e1e30aa13bb2f52221b8dd367132874231d185d
4
- data.tar.gz: 65207976a85fd0ca75f193272d1b5e06cfc6c770
3
+ metadata.gz: 6f97bda72289702d62c88bce96cd1e84eab6e065
4
+ data.tar.gz: f1ab2dfbec3c25a134621a756c8e7ce3289f1122
5
5
  SHA512:
6
- metadata.gz: 608d60f3647894420f1acde7b4a38381ce6ff1d7b41d641331ffac10f417f4acc8df8d989cf13af184751585725481b6cc75b3527034044fc0d8dd4f675946f7
7
- data.tar.gz: 2c6e4ce896f0d619f18d1991be4712e0b0586474023be8efd331c4d58470bac67f065288d4c498dfed7aff0725568708fe41537134a03f340bd05f5d378c55c2
6
+ metadata.gz: 4858c91721f5ea6c224e050ff4bfe2e1c8520f8ed30eb3ea7cbb974b9d68997e7101f5fc2e8db5a50e6dba72115a054c8cfc6d9753e505a0ee23ac8ba3b18d1b
7
+ data.tar.gz: 58b3e4ad28c151c2ce4fbb3b7e9d1502b74e1c3166ae7d81a168f96fd29da8878a3f7732b1d0dd9d3cfbc0b99c581fe21e75da4e083243fd617028134cd48a81
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .idea
data/README.md CHANGED
@@ -80,7 +80,7 @@ Put the following in your `features/support/env.rb` file:
80
80
  require 'allure-cucumber'
81
81
  ```
82
82
 
83
- Use `--format AllureCucumber::Formatter` while running cucumber or add it to `cucumber.yml`
83
+ Use `--format AllureCucumber::Formatter --out where/you-want-results` while running cucumber or add it to `cucumber.yml`
84
84
 
85
85
  You can also [attach screenshots](https://github.com/allure-framework/allure-core/wiki/Glossary#attachment), logs or test data to [steps](https://github.com/allure-framework/allure-core/wiki/Glossary#test-step).
86
86
 
@@ -21,5 +21,6 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.5"
23
23
  spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "aruba", '~> 0.14.2'
24
25
 
25
26
  end
@@ -0,0 +1,452 @@
1
+ @feature1
2
+ @dsl_attach_file
3
+ Feature: "AllureCucumber::DSL#attach_file' method should work correctly in all possible cases
4
+
5
+ In order to be sure that attaching a file works correctly
6
+ I want to verify all possible ways how a file can be attached to Allure report
7
+
8
+ Variations how a file can be attached:
9
+ by place of 'attach_file' code: [
10
+ in a step of Scenario,
11
+ in a step of Scenario Outline,
12
+ in a step of Background,
13
+ in hook 'Before',
14
+ in hook 'After',
15
+ in Around if call 'attach_file' before block.call,
16
+ in Around if call 'attach_file' after block.call
17
+ ]
18
+
19
+ by using '--expand': [
20
+ expand yes,
21
+ expand no
22
+ ]
23
+
24
+ by attach_file's step position: [
25
+ first step ,
26
+ second step
27
+ ]
28
+
29
+ Generated combinations for testing using 'pairwise' Ruby gem:
30
+
31
+ | by attach_file's step position | by place of 'attach_file' code | by using '--expand' |
32
+ | first step | in a step of Scenario | expand yes | @scenario_pw_2_01
33
+ | first step | in a step of Scenario Outline | expand no | @scenario_pw_2_02
34
+ | first step | in a step of Background | expand no | @scenario_pw_2_03
35
+ | first step | in hook 'Before' | expand no | @scenario_pw_2_04
36
+ | first step | in hook 'After' | expand no | @scenario_pw_2_05
37
+ | first step | in Around if call 'attach_file' before block.call | expand no | @scenario_pw_2_06
38
+ | first step | in Around if call 'attach_file' after block.call | expand no | @scenario_pw_2_07
39
+ | second step | in a step of Scenario | expand no | @scenario_pw_2_08
40
+ | second step | in a step of Scenario Outline | expand yes | @scenario_pw_2_09
41
+ | second step | in a step of Background | expand yes | @scenario_pw_2_10
42
+ | second step | in hook 'Before' | expand yes | @scenario_pw_2_11
43
+ | second step | in hook 'After' | expand yes | @scenario_pw_2_12
44
+ | second step | in Around if call 'attach_file' before block.call | expand yes | @scenario_pw_2_13
45
+ | second step | in Around if call 'attach_file' after block.call | expand yes | @scenario_pw_2_14
46
+
47
+
48
+
49
+ Background:
50
+ Given I use a fixture named "minimal_cucumber_app"
51
+ Given a file named "features/lib/step_definitions/steps.rb" with:
52
+ """
53
+ When /^I attach file$/ do
54
+ File.write('temp_file', 'some_text')
55
+ file = File.open('temp_file')
56
+ file.close
57
+ attach_file('some_title', file)
58
+ end
59
+
60
+ Given /^This step is passed$/ do
61
+ puts 'This is a message from passed step'
62
+ end
63
+
64
+ """
65
+
66
+ And a file named "features/lib/support/env.rb" with:
67
+ """
68
+ require 'bundler/setup'
69
+ require 'allure-cucumber'
70
+
71
+ AllureCucumber.configure do |c|
72
+ c.output_dir = "reports"
73
+ end
74
+
75
+ World(AllureCucumber::DSL)
76
+
77
+ """
78
+
79
+ @scenario1
80
+ Scenario: Should not raise error message if "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameters were not passed. BUT DOES IT
81
+ Given a file named "features/docs/attach_file.feature" with:
82
+ """
83
+ Feature: title
84
+ Scenario: attach_file
85
+ When I attach file
86
+ """
87
+
88
+ When I run `cucumber --expand`
89
+ Then the output from "cucumber --expand" should contain "1 scenario (1 passed)"
90
+ And the exit status should be 0
91
+
92
+ @scenario2
93
+ @scenario_pw_2_01
94
+ Scenario: Should not put 'Cannot attach...' message if "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified. BUT DOES IT
95
+ Given a file named "features/docs/attach_file.feature" with:
96
+ """
97
+ Feature: title
98
+ Scenario: attach_file
99
+ When I attach file
100
+ """
101
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
102
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
103
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
104
+ And the exit status should be 0
105
+
106
+
107
+ # This scenario illustrates an incorrect behaviour for scenario '@scenario2'.
108
+ @scenario3
109
+ @scenario_pw_2_08
110
+ Scenario: Should not be difference how much steps was run before attaching file. BUT THE DIFFERENCE IS PRESENT
111
+ Given a file named "features/docs/attach_file.feature" with:
112
+ """
113
+ Feature: title
114
+ Scenario: attach_file
115
+ Given This step is passed
116
+ When I attach file
117
+ """
118
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
119
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
120
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
121
+ And the exit status should be 0
122
+
123
+
124
+ @scenario4
125
+ @scenario_pw_2_02
126
+ @known_defect
127
+ Scenario: Should not put 'Cannot attach...' message if file was attached into Scenario outline and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified. BUT DOES IT
128
+ Given a file named "features/docs/attach_file.feature" with:
129
+ """
130
+ Feature: title
131
+ Scenario Outline: attach_file
132
+ When I attach file
133
+ Examples:
134
+ |run_count|
135
+ | 1 |
136
+ | 2 |
137
+
138
+ """
139
+ When I run "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty"
140
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
141
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "2 scenarios (2 passed)"
142
+ And the exit status should be 0
143
+
144
+
145
+
146
+ # This scenario illustrates an incorrect behaviour for scenario '@scenario4'.
147
+ @scenario5
148
+ Scenario: Should not be difference how much steps was run before attaching file in Scenario Outline. BUT THE DIFFERENCE IS PRESENT
149
+ Given a file named "features/docs/attach_file.feature" with:
150
+ """
151
+ Feature: title
152
+ Scenario Outline: attach_file
153
+ Given This step is passed
154
+ When I attach file
155
+ Examples:
156
+ |run_count|
157
+ | 1 |
158
+ | 2 |
159
+
160
+ """
161
+ When I run "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty"
162
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
163
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "2 scenarios (2 passed)"
164
+ And the exit status should be 0
165
+
166
+
167
+
168
+ @scenario_6
169
+ @scenario_pw_2_03
170
+ Scenario: Should not put 'Cannot attach...' if file was attached into Background's step and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
171
+ Given a file named "features/docs/attach_file.feature" with:
172
+ """
173
+ Feature: title
174
+ Background:
175
+ When I attach file
176
+
177
+ Scenario: attach_file
178
+ Given This step is passed
179
+ """
180
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
181
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
182
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
183
+ And the exit status should be 0
184
+
185
+
186
+ @scenario_7
187
+ @scenario_pw_2_04
188
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Before and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
189
+ Given a file named "features/docs/attach_file.feature" with:
190
+ """
191
+ Feature: title
192
+ Scenario: attach_file
193
+ Given This step is passed
194
+ """
195
+ And a file named "features/lib/support/hooks.rb" with:
196
+ """
197
+ Before do
198
+ File.write('temp_file', 'some_text')
199
+ file = File.open('temp_file')
200
+ file.close
201
+ attach_file('some_title', file)
202
+
203
+ end
204
+ """
205
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
206
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
207
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
208
+ And the exit status should be 0
209
+
210
+ @scenario_8
211
+ @scenario_pw_2_05
212
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook After and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
213
+ Given a file named "features/docs/attach_file.feature" with:
214
+ """
215
+ Feature: title
216
+ Scenario: attach_file
217
+ Given This step is passed
218
+ """
219
+ And a file named "features/lib/support/hooks.rb" with:
220
+ """
221
+ After do
222
+ File.write('temp_file', 'some_text')
223
+ file = File.open('temp_file')
224
+ file.close
225
+ attach_file('some_title', file)
226
+
227
+ end
228
+ """
229
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
230
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
231
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
232
+ And the exit status should be 0
233
+
234
+
235
+ @scenario_9
236
+ @scenario_pw_2_07
237
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Around when 'attach_file' is called AFTER 'block.call' and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
238
+ Given a file named "features/docs/attach_file.feature" with:
239
+ """
240
+ Feature: title
241
+ Scenario: attach_file
242
+ Given This step is passed
243
+ """
244
+ And a file named "features/lib/support/hooks.rb" with:
245
+ """
246
+ Around do |scenario, block|
247
+ block.call
248
+ File.write('temp_file', 'some_text')
249
+ file = File.open('temp_file')
250
+ file.close
251
+ attach_file('some_title', file)
252
+
253
+ end
254
+ """
255
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
256
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
257
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
258
+ And the exit status should be 0
259
+
260
+
261
+ @scenario_10
262
+ @scenario_pw_2_06
263
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Around when 'attach_file' is called BEFORE 'block.call' and "--format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
264
+ Given a file named "features/docs/attach_file.feature" with:
265
+ """
266
+ Feature: title
267
+ Scenario: attach_file
268
+ Given This step is passed
269
+ """
270
+ And a file named "features/lib/support/hooks.rb" with:
271
+ """
272
+ Around do |scenario, block|
273
+ File.write('temp_file', 'some_text')
274
+ file = File.open('temp_file')
275
+ file.close
276
+ attach_file('some_title', file)
277
+ block.call
278
+ end
279
+ """
280
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
281
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
282
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
283
+ And the exit status should be 0
284
+
285
+ @scenario_11
286
+ @scenario_pw_2_09
287
+ @known_defect
288
+ Scenario: Should not put 'Cannot attach...' message if file was attached into second step of Scenario Outline and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
289
+ Given a file named "features/docs/attach_file.feature" with:
290
+ """
291
+ Feature: title
292
+ Scenario Outline: attach_file
293
+ Given This step is passed
294
+ When I attach file
295
+ Examples:
296
+ |run_count|
297
+ | 1 |
298
+ | 2 |
299
+
300
+ """
301
+ When I run "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty"
302
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
303
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "2 scenarios (2 passed)"
304
+ And the exit status should be 0
305
+
306
+ @scenario_12
307
+ @scenario_pw_2_10
308
+ Scenario: Should not put 'Cannot attach...' if file was attached into Background's second step and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
309
+ Given a file named "features/docs/attach_file.feature" with:
310
+ """
311
+ Feature: title
312
+ Background:
313
+ Given This step is passed
314
+ And I attach file
315
+
316
+ Scenario: attach_file
317
+ Given This step is passed
318
+ """
319
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
320
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
321
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
322
+ And the exit status should be 0
323
+
324
+
325
+ @scenario_13
326
+ @scenario_pw_2_11
327
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Before and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
328
+ Given a file named "features/docs/attach_file.feature" with:
329
+ """
330
+ Feature: title
331
+ Scenario: attach_file
332
+ Given This step is passed
333
+ """
334
+ And a file named "features/lib/support/hooks.rb" with:
335
+ """
336
+ Before do
337
+ File.write('temp_file', 'some_text')
338
+ file = File.open('temp_file')
339
+ file.close
340
+ attach_file('some_title', file)
341
+
342
+ end
343
+ """
344
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
345
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
346
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
347
+ And the exit status should be 0
348
+
349
+
350
+ @scenario_14
351
+ @scenario_pw_2_12
352
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook After and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
353
+ Given a file named "features/docs/attach_file.feature" with:
354
+ """
355
+ Feature: title
356
+ Scenario: attach_file
357
+ Given This step is passed
358
+ """
359
+ And a file named "features/lib/support/hooks.rb" with:
360
+ """
361
+ After do
362
+ File.write('temp_file', 'some_text')
363
+ file = File.open('temp_file')
364
+ file.close
365
+ attach_file('some_title', file)
366
+
367
+ end
368
+ """
369
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
370
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
371
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
372
+ And the exit status should be 0
373
+
374
+
375
+ @scenario_15
376
+ @scenario_pw_2_14
377
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Around when 'attach_file' is called AFTER 'block.call' and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
378
+ Given a file named "features/docs/attach_file.feature" with:
379
+ """
380
+ Feature: title
381
+ Scenario: attach_file
382
+ Given This step is passed
383
+ """
384
+ And a file named "features/lib/support/hooks.rb" with:
385
+ """
386
+ Around do |scenario, block|
387
+ block.call
388
+ File.write('temp_file', 'some_text')
389
+ file = File.open('temp_file')
390
+ file.close
391
+ attach_file('some_title', file)
392
+
393
+ end
394
+ """
395
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
396
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
397
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
398
+ And the exit status should be 0
399
+
400
+
401
+
402
+ @scenario_16
403
+ @scenario_pw_2_13
404
+ Scenario: Should not put 'Cannot attach...' if file was attached in hook Around when 'attach_file' is called BEFORE 'block.call' and "--expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" parameter was specified.
405
+ Given a file named "features/docs/attach_file.feature" with:
406
+ """
407
+ Feature: title
408
+ Scenario: attach_file
409
+ Given This step is passed
410
+ """
411
+ And a file named "features/lib/support/hooks.rb" with:
412
+ """
413
+ Around do |scenario, block|
414
+ File.write('temp_file', 'some_text')
415
+ file = File.open('temp_file')
416
+ file.close
417
+ attach_file('some_title', file)
418
+ block.call
419
+ end
420
+ """
421
+ When I run `cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
422
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "Cannot attach"
423
+ Then the output from "cucumber --expand --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "1 scenario (1 passed)"
424
+ And the exit status should be 0
425
+
426
+
427
+ @scenario_17
428
+ Scenario: Should not fail if Scenario Outline was run and then Scenario where a file was attached
429
+ Given a file named "features/docs/01_attach_file.feature" with:
430
+ """
431
+ Feature: title
432
+
433
+ Scenario Outline: first outline
434
+ Given I attach file
435
+
436
+ Examples:
437
+ | run_number |
438
+ | 1 |
439
+
440
+ """
441
+ Given a file named "features/docs/02_attach_file.feature" with:
442
+ """
443
+ Feature: title
444
+ Scenario: second scenario
445
+ Given I attach file
446
+
447
+ """
448
+
449
+ When I run `cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty`
450
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should not contain "undefined method `[]' for nil:NilClass (NoMethodError)"
451
+ Then the output from "cucumber --format AllureCucumber::Formatter --out reports/allure-report/ --format pretty" should contain "2 scenarios (2 passed)"
452
+ And the exit status should be 0
@@ -0,0 +1,7 @@
1
+ require 'aruba/cucumber'
2
+
3
+ Aruba.configure do |config|
4
+ # Such big values were added for debugging of the code into IDE
5
+ config.exit_timeout = 6000
6
+ config.io_wait_timeout = 6000
7
+ end
@@ -0,0 +1 @@
1
+ require 'bundler/setup'
@@ -20,6 +20,11 @@ module AllureCucumber
20
20
  @output_dir || DEFAULT_OUTPUT_DIR
21
21
  end
22
22
 
23
+ def output_dir=(output_dir)
24
+ AllureRubyAdaptorApi::Config.output_dir = output_dir
25
+ @output_dir = output_dir
26
+ end
27
+
23
28
  def tms_prefix
24
29
  @tms_prefix || DEFAULT_TMS_PREFIX
25
30
  end
@@ -11,7 +11,8 @@ module AllureCucumber
11
11
  ALLOWED_SEVERITIES = ['blocker', 'critical', 'normal', 'minor', 'trivial']
12
12
  POSSIBLE_STATUSES = ['passed', 'failed', 'pending', 'skipped', 'undefined']
13
13
 
14
- def initialize(step_mother, io, options)
14
+ def initialize(step_mother, path_or_io, options)
15
+ AllureCucumber::Config.output_dir = path_or_io if path_or_io.is_a?(String)
15
16
  dir = Pathname.new(AllureCucumber::Config.output_dir)
16
17
  FileUtils.rm_rf(dir) unless AllureCucumber::Config.clean_dir == false
17
18
  FileUtils.mkdir_p(dir)
@@ -57,7 +58,6 @@ module AllureCucumber
57
58
 
58
59
  def before_examples(*args)
59
60
  @header_row = true
60
- @row_count = 0
61
61
  end
62
62
 
63
63
  def before_scenario(scenario)
@@ -90,8 +90,7 @@ module AllureCucumber
90
90
  # Start the test for scenario examples
91
91
  def before_table_row(table_row)
92
92
  if @scenario_outline && !@header_row && !@in_multiline_arg
93
- @row_count += 1
94
- @tracker.scenario_name = "Example #{@row_count} : #{@scenario_outline_name}"
93
+ @tracker.scenario_name = "#{@scenario_outline_name}: #{table_row.values.join(' | ')}"
95
94
  start_test
96
95
  end
97
96
  end
@@ -232,6 +231,7 @@ module AllureCucumber
232
231
  @deferred_before_test_steps = []
233
232
  @deferred_after_test_steps = []
234
233
  @scenario_tags = {}
234
+ @before_hook_exception = nil
235
235
  end
236
236
  end
237
237
 
@@ -1,5 +1,5 @@
1
1
  module AllureCucumber
2
2
  module Version
3
- STRING = '0.5.7'
3
+ STRING = '0.5.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Imran Khan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: aruba
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.14.2
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.14.2
69
83
  description: Adaptor to use Allure framework with cucumber
70
84
  email:
71
85
  - 9ikhan@gmail.com
@@ -79,6 +93,10 @@ files:
79
93
  - README.md
80
94
  - Rakefile
81
95
  - allure-cucumber.gemspec
96
+ - features/docs/acceptance_tests/dsl_attach_file.feature
97
+ - features/lib/support/aruba.rb
98
+ - features/lib/support/env.rb
99
+ - fixtures/minimal_cucumber_app/features/lib/support/env.rb
82
100
  - lib/allure-cucumber.rb
83
101
  - lib/allure-cucumber/dsl.rb
84
102
  - lib/allure-cucumber/feature_tracker.rb
@@ -107,5 +125,8 @@ rubyforge_project:
107
125
  rubygems_version: 2.4.8
108
126
  signing_key:
109
127
  specification_version: 4
110
- summary: allure-cucumber-0.5.7
111
- test_files: []
128
+ summary: allure-cucumber-0.5.8
129
+ test_files:
130
+ - features/docs/acceptance_tests/dsl_attach_file.feature
131
+ - features/lib/support/aruba.rb
132
+ - features/lib/support/env.rb