hiptest-publisher 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c8a02db3a799b5e2e155b033bd99540a6004f10548d8e96b8790bd0db7754f7
4
- data.tar.gz: 7a72e7b6b64462ef50e77a9e22bf32bf380f427a3fc859ab5019e7943efe7cf8
3
+ metadata.gz: bf3135292196dceadbed7955498ce586d8f08b075a3bab0323efd92403876835
4
+ data.tar.gz: 6af5171a3e54d523bdcd79970e8847f1e94e89019a7c33a98e3436de27f44b47
5
5
  SHA512:
6
- metadata.gz: d21c08e718c31874d666d125699a800269a0b2c816b51c02f1559abbfa16dc4db96e56b67a0e2de09249f27ee099f533bba39ee04a8ff8c27731ca05fc249e69
7
- data.tar.gz: 6bfef4d36438d2c457e13b6a4f0b308b90f207be612e9abe52ea138362f094f7d0c07531781e7c4e83ed3c7b11c368bb36e6dcecc8d88f8b32e0d2992864e9cc
6
+ metadata.gz: 1d7e65e2f1d31e605cb24a48cc1cb8c87137098571b76da485fc2513dd5795fabe81e561ea102f2e7fc17462b8389aa0ab1d0a05979436ccf3c62540cd3ca057
7
+ data.tar.gz: 3c5d13ec78ba4f3fa828ec053652a05f29cdb1f23c1a0e266efd3611c851c4b38c53b3d9eef8b41a0a3a58c0538420a3aa2c21220516d920a66175fe80734b74
data/README.md CHANGED
@@ -127,7 +127,7 @@ Specific options:
127
127
  -p, --push=FILE.TAP Push a results file to the server
128
128
  --global-failure-on-missing-reports
129
129
  When there is no results file to push, report a global failure (default: false)
130
- --push-format=tap Format of the test results (junit, nunit, tap, robot) (default: tap)
130
+ --push-format=tap Format of the test results (cucumber-json, junit, nunit, robot, tap) (default: tap)
131
131
  --sort=[id,order,alpha] Sorting of tests in output: id will sort them by age, order will keep the same order than in hiptest (only with --with-folders option, will fallback to id otherwise), alpha will sort them by name (default: order)
132
132
  --[no-]uids Export UIDs (note: can be disabled only for Gherkin-based exports, may cause issue when pushing results back) (default: true)
133
133
  --keep-filenames Keep the same name as in Hiptest for the test files (note: may cause encoding issues) (default: false)
@@ -182,7 +182,7 @@ The tests must then generate a test report that is supported by Hiptest. Current
182
182
  - [TAP (Test Anything Protocol)](https://testanything.org/)
183
183
  - Robot framework XML output
184
184
 
185
- You can specify the type of export when pushing by using the option "--push-format=[junit|nunit|tap|robot]" or specifying it in the config file.
185
+ You can specify the type of export when pushing by using the option "--push-format=[cucumber-json|junit|nunit|robot|tap]" or specifying it in the config file.
186
186
 
187
187
  You can push multiple files at once (using wildcard) but in that case, do not forget to add quotes. For examples:
188
188
 
@@ -8,6 +8,7 @@ node_name = folders
8
8
  template_dirs = gherkin, common
9
9
  named_filename = '%s.feature'
10
10
  filename_convention = 'underscore'
11
+ renderer_addons = 'GherkinAddon'
11
12
 
12
13
  [step_definitions]
13
14
  node_name = actionwords
@@ -15,6 +16,7 @@ template_dirs = behat, php, common
15
16
  filename = 'FeatureContext.php'
16
17
  naming_convention = 'camelize'
17
18
  call_prefix = 'self.actionwords'
19
+ renderer_addons = 'GherkinAddon'
18
20
 
19
21
  [actionwords]
20
22
  template_dirs = behat/actionwords, php, common
@@ -8,6 +8,7 @@ node_name = folders
8
8
  template_dirs = gherkin/inlined_uids, gherkin, common
9
9
  named_filename = '%s.feature'
10
10
  filename_convention = 'underscore'
11
+ renderer_addons = 'GherkinAddon'
11
12
 
12
13
  [step_definitions]
13
14
  node_name = actionwords
@@ -15,7 +16,7 @@ template_dirs = behave, python, common
15
16
  filename = 'steps.py'
16
17
  naming_convention = 'underscore'
17
18
  call_prefix = 'self.actionwords'
18
- renderer_addons = 'BehaveAddon'
19
+ renderer_addons = 'GherkinAddon BehaveAddon'
19
20
 
20
21
  [actionwords]
21
22
  template_dirs = python, common
@@ -0,0 +1,25 @@
1
+ [_common]
2
+ package = 'com.example'
3
+ fallback_template = 'empty'
4
+ indentation = ' '
5
+ dirname_convention = 'underscore'
6
+ filename_convention = 'camelize'
7
+ naming_convention = 'camelize_lower'
8
+
9
+ [features]
10
+ node_name = folders
11
+ template_dirs = gherkin/inlined_uids, gherkin/java, gherkin, common
12
+ named_filename = '%s.feature'
13
+ indentation = ' '
14
+ renderer_addons = 'GherkinAddon'
15
+
16
+ [step_definitions]
17
+ node_name = actionwords
18
+ template_dirs = cucumber/groovy/step-definitions, groovy, java, common
19
+ filename = 'StepDefinitions.groovy'
20
+ call_prefix = 'actionwords'
21
+ renderer_addons = 'GherkinAddon'
22
+
23
+ [actionwords]
24
+ template_dirs = cucumber/groovy/actionwords, groovy, java, common
25
+ filename = 'Actionwords.groovy'
@@ -8,6 +8,7 @@ node_name = folders
8
8
  template_dirs = gherkin/inlined_uids, gherkin/java, gherkin, common
9
9
  named_filename = '%s.feature'
10
10
  indentation = ' '
11
+ renderer_addons = 'GherkinAddon'
11
12
 
12
13
  [step_definitions]
13
14
  node_name = actionwords
@@ -15,6 +16,7 @@ template_dirs = cucumber/java, java, common
15
16
  filename = 'StepDefinitions.java'
16
17
  naming_convention = 'camelize_lower'
17
18
  call_prefix = 'actionwords'
19
+ renderer_addons = 'GherkinAddon'
18
20
 
19
21
  [actionwords]
20
22
  template_dirs = cucumber/java/actionwords, java, common
@@ -7,6 +7,7 @@ node_name = folders
7
7
  template_dirs = gherkin/inlined_uids, gherkin, common
8
8
  named_filename = '%s.feature'
9
9
  indentation = ' '
10
+ renderer_addons = 'GherkinAddon'
10
11
 
11
12
  [step_definitions]
12
13
  node_name = actionwords
@@ -14,6 +15,7 @@ template_dirs = cucumber/javascript, javascript, common
14
15
  filename = 'step_definitions.js'
15
16
  naming_convention = 'camelize_lower'
16
17
  call_prefix = 'actionwords'
18
+ renderer_addons = 'GherkinAddon'
17
19
 
18
20
  [actionwords]
19
21
  template_dirs = javascript/es6, javascript, common
@@ -7,12 +7,14 @@ node_name = folders
7
7
  template_dirs = gherkin, common
8
8
  named_filename = '%s.feature'
9
9
  filename_convention = 'underscore'
10
+ renderer_addons = 'GherkinAddon'
10
11
 
11
12
  [step_definitions]
12
13
  node_name = actionwords
13
14
  template_dirs = cucumber, common
14
15
  filename = 'step_definitions.rb'
15
16
  naming_convention = 'underscore'
17
+ renderer_addons = 'GherkinAddon'
16
18
 
17
19
  [actionwords]
18
20
  template_dirs = ruby, common
@@ -8,6 +8,7 @@ node_name = folders
8
8
  template_dirs = jbehave, gherkin/inlined_uids, gherkin/java, gherkin, common
9
9
  named_filename = '%s.story'
10
10
  indentation = ' '
11
+ renderer_addons = 'GherkinAddon'
11
12
 
12
13
  [step_definitions]
13
14
  node_name = actionwords
@@ -15,6 +16,7 @@ template_dirs = jbehave/steps, jbehave/actionwords, java, common
15
16
  filename = 'StepDefinitions.java'
16
17
  naming_convention = 'camelize_lower'
17
18
  call_prefix = 'actionwords'
19
+ renderer_addons = 'GherkinAddon'
18
20
 
19
21
  [actionwords]
20
22
  template_dirs = jbehave/actionwords, java, common
@@ -6,6 +6,7 @@ indentation = "\t"
6
6
  filename = 'test_project.txt'
7
7
  named_filename = 'test_%s.txt'
8
8
  filename_convention = 'underscore'
9
+ renderer_addons = 'RobotFrameworkAddon'
9
10
 
10
11
  [actionwords]
11
12
  filename = 'keywords.txt'
@@ -9,6 +9,7 @@ node_name = folders
9
9
  template_dirs = specflow/gherkin, gherkin, common
10
10
  named_filename = '%s.feature'
11
11
  filename_convention = 'camelize_upper'
12
+ renderer_addons = 'GherkinAddon'
12
13
 
13
14
  [step_definitions]
14
15
  node_name = actionwords
@@ -16,6 +17,7 @@ template_dirs = specflow, csharp, common
16
17
  filename = 'StepDefinitions.cs'
17
18
  naming_convention = 'camelize_upper'
18
19
  call_prefix = 'Actionwords'
20
+ renderer_addons = 'GherkinAddon'
19
21
 
20
22
  [actionwords]
21
23
  template_dirs = specflow/actionwords, csharp, common
@@ -288,7 +288,7 @@ module Hiptest
288
288
  "",
289
289
  " * Did you specify the correct push format ?",
290
290
  " Use push_format=<format> in your config file or option --push-format=<format> in the command line",
291
- " Available formats are: tap, junit, robot, nunit",
291
+ " Available formats are: cucumber-json, junit, nunit, robot, tap",
292
292
  ""
293
293
  ].join("\n")
294
294
  end
@@ -188,7 +188,7 @@ class OptionsParser
188
188
 
189
189
  {
190
190
  'Ruby' => ['Rspec', 'MiniTest'],
191
- 'Cucumber' => ['Ruby', 'Java', 'Javascript'],
191
+ 'Cucumber' => ['Ruby', 'Java', 'Javascript', 'Groovy'],
192
192
  'Java' => ['JUnit', 'Test NG', 'Espresso'],
193
193
  'Python' => ['Unittest'],
194
194
  'Robot Framework' => [''],
@@ -235,7 +235,7 @@ class OptionsParser
235
235
  Option.new('s', 'site=SITE', 'https://app.hiptest.com', String, "Site to fetch from", :site),
236
236
  Option.new('p', 'push=FILE.TAP', '', String, "Push a results file to the server", :push),
237
237
  Option.new(nil, 'global-failure-on-missing-reports', false, nil, "When there is no results file to push, report a global failure", :global_failure_on_missing_reports),
238
- Option.new(nil, 'push-format=tap', 'tap', String, "Format of the test results (junit, nunit, tap, robot)", :push_format),
238
+ Option.new(nil, 'push-format=tap', 'tap', String, "Format of the test results (cucumber-json, junit, nunit, robot, tap)", :push_format),
239
239
  Option.new(nil, 'sort=[id,order,alpha]', 'order', String, "Sorting of tests in output: id will sort them by age, order will keep the same order than in hiptest (only with --with-folders option, will fallback to id otherwise), alpha will sort them by name", :sort),
240
240
  Option.new(nil, '[no-]uids', true, nil, 'Export UIDs (note: can be disabled only for Gherkin-based exports, may cause issue when pushing results back)', :uids),
241
241
  Option.new(nil, 'with-dataset-names', false, nil, 'Export dataset name when creating feature files (note: available only for Gherkin-based exports)', :with_dataset_names),
@@ -23,37 +23,6 @@ module Hiptest
23
23
  @template_finder = context.template_finder
24
24
  end
25
25
 
26
- def walk_call(call)
27
- # For Gherkin, we need the special arguments rendered.
28
- if call.free_text_arg
29
- @rendered_children[:free_text_arg] = @rendered[call.free_text_arg.children[:value]]
30
- end
31
-
32
- if call.datatable_arg
33
- @rendered_children[:datatable_arg] = @rendered[call.datatable_arg.children[:value]]
34
- end
35
-
36
- super(call)
37
- end
38
-
39
- def walk_scenarios(scs)
40
- walk_scenario_container(scs)
41
- super(scs)
42
- end
43
-
44
- def walk_actionword(aw)
45
- add_splitted_tags(aw)
46
- super(aw)
47
- end
48
-
49
- def walk_folder(folder)
50
- ancestor_tags = folder.ancestors.map {|f| f.children[:tags]}.flatten.uniq
51
- @rendered_children[:ancestor_tags] = ancestor_tags.map {|t| Hiptest::Renderer.render(t, @context)}
52
-
53
- walk_scenario_container(folder)
54
- super(folder)
55
- end
56
-
57
26
  def call_node_walker(node)
58
27
  if node.is_a? Hiptest::Nodes::Node
59
28
  @rendered_children = {}
@@ -75,38 +44,5 @@ module Hiptest
75
44
 
76
45
  @template_finder.get_compiled_handlebars(node.kind).call(render_context)
77
46
  end
78
-
79
- private
80
-
81
- def add_splitted_tags(context)
82
- @rendered_children[:splitted_tags] = context.children[:tags].map do |tag|
83
- @rendered[tag]
84
- end
85
- end
86
-
87
- def walk_scenario_container(container)
88
- # For Robot framework, we need direct access to every scenario
89
- # datatables and body rendered.
90
-
91
- @rendered_children[:splitted_scenarios] = container.children[:scenarios].map {|sc|
92
- {
93
- name: @rendered[sc.children[:name]],
94
- tags: sc.children[:tags].map {|tag| @rendered[tag]},
95
- uid: @rendered[sc.children[:uid]],
96
- datatable: @rendered[sc.children[:datatable]],
97
- datasets: sc.children[:datatable].children[:datasets].map {|dataset|
98
- {
99
- scenario_name: @rendered[sc.children[:name]],
100
- name: @rendered[dataset.children[:name]],
101
- uid: @rendered[dataset.children[:uid]],
102
- test_snapshot_uid: @rendered[dataset.children[:test_snapshot_uid]],
103
- arguments: @rendered[dataset.children[:arguments]]
104
- }
105
- },
106
- parameters: @rendered[sc.children[:parameters]],
107
- body: @rendered[sc.children[:body]]
108
- }
109
- }
110
- end
111
47
  end
112
48
  end
@@ -1,2 +1,4 @@
1
1
  require 'hiptest-publisher/renderer_addons/behave_addon'
2
+ require 'hiptest-publisher/renderer_addons/gherkin_addon'
2
3
  require 'hiptest-publisher/renderer_addons/groovy_spock_addon'
4
+ require 'hiptest-publisher/renderer_addons/robot_framework_addon'
@@ -0,0 +1,39 @@
1
+ require 'hiptest-publisher/nodes'
2
+
3
+ module Hiptest
4
+ module GherkinAddon
5
+
6
+ def walk_call(call)
7
+ if call.free_text_arg
8
+ @rendered_children[:free_text_arg] = rendered_freetext_arg(call)
9
+ end
10
+
11
+ if call.datatable_arg
12
+ @rendered_children[:datatable_arg] = rendered_datatable_arg(call)
13
+ end
14
+
15
+ super(call)
16
+ end
17
+
18
+ def walk_folder(folder)
19
+ @rendered_children[:ancestor_tags] = ancestor_tags(folder)
20
+
21
+ super(folder)
22
+ end
23
+
24
+ private
25
+
26
+ def rendered_datatable_arg(call)
27
+ @rendered[call.datatable_arg.children[:value]]
28
+ end
29
+
30
+ def rendered_freetext_arg(call)
31
+ @rendered[call.free_text_arg.children[:value]]
32
+ end
33
+
34
+ def ancestor_tags(folder)
35
+ ancestor_tags = folder.ancestors.map {|f| f.children[:tags]}.flatten.uniq
36
+ ancestor_tags.map {|t| Hiptest::Renderer.render(t, @context)}
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,42 @@
1
+ require 'hiptest-publisher/nodes'
2
+
3
+ module Hiptest
4
+ module RobotFrameworkAddon
5
+ def walk_folder(folder)
6
+ walk_scenario_container(folder)
7
+ super(folder)
8
+ end
9
+
10
+ def walk_scenarios(scenarios)
11
+ walk_scenario_container(scenarios)
12
+ super(scenarios)
13
+ end
14
+
15
+ private
16
+
17
+ def walk_scenario_container(container)
18
+ # For Robot framework, we need direct access to every scenario
19
+ # datatables and body rendered.
20
+
21
+ @rendered_children[:splitted_scenarios] = container.children[:scenarios].map {|sc|
22
+ {
23
+ name: @rendered[sc.children[:name]],
24
+ tags: sc.children[:tags].map {|tag| @rendered[tag]},
25
+ uid: @rendered[sc.children[:uid]],
26
+ datatable: @rendered[sc.children[:datatable]],
27
+ datasets: sc.children[:datatable].children[:datasets].map {|dataset|
28
+ {
29
+ scenario_name: @rendered[sc.children[:name]],
30
+ name: @rendered[dataset.children[:name]],
31
+ uid: @rendered[dataset.children[:uid]],
32
+ test_snapshot_uid: @rendered[dataset.children[:test_snapshot_uid]],
33
+ arguments: @rendered[dataset.children[:arguments]]
34
+ }
35
+ },
36
+ parameters: @rendered[sc.children[:parameters]],
37
+ body: @rendered[sc.children[:body]]
38
+ }
39
+ }
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,7 @@
1
+ package {{{ context.package }}}
2
+
3
+ class Actionwords {{#curly}}{{#indent}}{{#each rendered_children.actionwords}}
4
+ {{{this}}}
5
+ {{/each}}
6
+ {{/indent}}
7
+ {{/curly}}
@@ -0,0 +1 @@
1
+ {{#strip}}{{#join chunks '"'}}{{this.value}}{{/join}}{{#each extra_inlined_parameters}} "{{this.value}}"{{/each}}{{/strip}}
@@ -0,0 +1,5 @@
1
+ {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(~"^{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}\$") {{#curly}} {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
2
+ {{{ context.call_prefix }}}.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{camelize_lower this}}}{{/join}}{{/if}})
3
+ {{/indent}}
4
+ {{/curly}}
5
+ {{/if}}
@@ -0,0 +1,10 @@
1
+ package {{{ context.package }}}
2
+
3
+ import cucumber.api.DataTable
4
+
5
+ this.metaClass.mixin(cucumber.api.groovy.EN)
6
+
7
+ Actionwords {{{ context.call_prefix }}} = new Actionwords()
8
+
9
+ {{#each rendered_children.actionwords}}{{{this}}}
10
+ {{/each}}
@@ -0,0 +1 @@
1
+ {{#if is_datatable?}}DataTable{{else}}{{#if is_bool?}}boolean{{else}}{{{ node.type }}}{{/if}}{{/if}} {{{ camelize_lower rendered_children.name }}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiptest-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiptest R&D
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-04 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -228,6 +228,7 @@ files:
228
228
  - lib/config/behat.conf
229
229
  - lib/config/behave.conf
230
230
  - lib/config/csharp-nunit.conf
231
+ - lib/config/cucumber-groovy.conf
231
232
  - lib/config/cucumber-java.conf
232
233
  - lib/config/cucumber-javascript.conf
233
234
  - lib/config/cucumber-ruby.conf
@@ -270,7 +271,9 @@ files:
270
271
  - lib/hiptest-publisher/renderer.rb
271
272
  - lib/hiptest-publisher/renderer_addons.rb
272
273
  - lib/hiptest-publisher/renderer_addons/behave_addon.rb
274
+ - lib/hiptest-publisher/renderer_addons/gherkin_addon.rb
273
275
  - lib/hiptest-publisher/renderer_addons/groovy_spock_addon.rb
276
+ - lib/hiptest-publisher/renderer_addons/robot_framework_addon.rb
274
277
  - lib/hiptest-publisher/signature_differ.rb
275
278
  - lib/hiptest-publisher/signature_exporter.rb
276
279
  - lib/hiptest-publisher/string.rb
@@ -327,6 +330,11 @@ files:
327
330
  - lib/templates/csharp/while.hbs
328
331
  - lib/templates/cucumber/actionword.hbs
329
332
  - lib/templates/cucumber/actionwords.hbs
333
+ - lib/templates/cucumber/groovy/actionwords/actionwords.hbs
334
+ - lib/templates/cucumber/groovy/step-definitions/_gherkin_pattern.hbs
335
+ - lib/templates/cucumber/groovy/step-definitions/actionword.hbs
336
+ - lib/templates/cucumber/groovy/step-definitions/actionwords.hbs
337
+ - lib/templates/cucumber/groovy/step-definitions/parameter.hbs
330
338
  - lib/templates/cucumber/java/actionword.hbs
331
339
  - lib/templates/cucumber/java/actionwords.hbs
332
340
  - lib/templates/cucumber/java/actionwords/parameter.hbs