hiptest-publisher 0.6.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/lib/config/csharp.conf +15 -0
- data/lib/config/cucumber-java.conf +22 -0
- data/lib/config/cucumber.conf +1 -1
- data/lib/config/specflow.conf +22 -0
- data/lib/hiptest-publisher/cli_options_checker.rb +9 -0
- data/lib/hiptest-publisher/handlebars_helper.rb +3 -1
- data/lib/hiptest-publisher/options_parser.rb +4 -1
- data/lib/hiptest-publisher/render_context_maker.rb +4 -2
- data/lib/hiptest-publisher/string.rb +15 -10
- data/lib/templates/{cucumber → common}/empty.hbs +0 -0
- data/lib/templates/csharp/_body.hbs +5 -0
- data/lib/templates/csharp/_item_as_function.hbs +6 -0
- data/lib/templates/csharp/_scenario.hbs +8 -0
- data/lib/templates/csharp/actionword.hbs +1 -0
- data/lib/templates/csharp/actionwords.hbs +10 -0
- data/lib/templates/csharp/argument.hbs +1 -0
- data/lib/templates/csharp/assign.hbs +1 -0
- data/lib/templates/csharp/binaryexpression.hbs +1 -0
- data/lib/templates/csharp/call.hbs +2 -0
- data/lib/templates/csharp/dataset.hbs +4 -0
- data/lib/templates/csharp/dict.hbs +1 -0
- data/lib/templates/csharp/field.hbs +1 -0
- data/lib/templates/csharp/ifthen.hbs +7 -0
- data/lib/templates/csharp/index.hbs +1 -0
- data/lib/templates/csharp/list.hbs +1 -0
- data/lib/templates/csharp/nullliteral.hbs +1 -0
- data/lib/templates/csharp/parameter.hbs +1 -0
- data/lib/templates/csharp/parenthesis.hbs +1 -0
- data/lib/templates/csharp/property.hbs +1 -0
- data/lib/templates/csharp/scenario.hbs +1 -0
- data/lib/templates/csharp/scenarios.hbs +15 -0
- data/lib/templates/csharp/single_scenario.hbs +15 -0
- data/lib/templates/csharp/single_test.hbs +15 -0
- data/lib/templates/csharp/step.hbs +1 -0
- data/lib/templates/csharp/stringliteral.hbs +1 -0
- data/lib/templates/csharp/tag.hbs +1 -0
- data/lib/templates/csharp/template.hbs +1 -0
- data/lib/templates/csharp/test.hbs +1 -0
- data/lib/templates/csharp/tests.hbs +15 -0
- data/lib/templates/csharp/unaryexpression.hbs +1 -0
- data/lib/templates/csharp/variable.hbs +1 -0
- data/lib/templates/csharp/while.hbs +4 -0
- data/lib/templates/cucumber/java/actionword.hbs +6 -0
- data/lib/templates/cucumber/java/actionwords.hbs +11 -0
- data/lib/templates/cucumber/java/parameter.hbs +1 -0
- data/lib/templates/gherkin/{folders_as_features/folder.hbs → folder.hbs} +0 -0
- data/lib/templates/gherkin/scenarios.hbs +2 -2
- data/lib/templates/gherkin/single_scenario.hbs +1 -3
- data/lib/templates/java/call.hbs +2 -1
- data/lib/templates/javascript/call.hbs +2 -1
- data/lib/templates/python/call.hbs +2 -1
- data/lib/templates/robotframework/call.hbs +2 -1
- data/lib/templates/ruby/call.hbs +2 -1
- data/lib/templates/specflow/actionword.hbs +5 -0
- data/lib/templates/specflow/actionwords.hbs +15 -0
- metadata +47 -11
- data/lib/config/cucumber-folders_as_features.conf +0 -19
- data/lib/templates/gherkin/empty.hbs +0 -0
- data/lib/templates/gherkin/folders_as_features/single_scenario.hbs +0 -14
- data/lib/templates/seleniumide/empty.hbs +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dd259f5d4127ac725be03241682ff8a69fbcd84
|
4
|
+
data.tar.gz: aee290040b67791c783fa2703d33ec430fd6497c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a730a8443ab01fee38a4c87e93a11d9eb60b294f61b12aa5217eaed2474624b47a92b988dae3cde530b0c3260b6b5a0704f1663605aece4b42ea842e59bc1504
|
7
|
+
data.tar.gz: 7af2017a94a16aca8943840fe8146ea5c0c49bc8bfbdefda24e32a34239f851d713cb2f74cd574a7a239868a611c1abd416fc5594572c9c0243db23eeb54a0a1
|
data/README.md
CHANGED
@@ -139,6 +139,24 @@ The tests must then generate a test report that is supported by Hiptest. Current
|
|
139
139
|
|
140
140
|
You can specify the type of export when pushing by using the option "--push-format=[tap|junit|robot]" or specifying it in the config file.
|
141
141
|
|
142
|
+
|
143
|
+
Development
|
144
|
+
-----------
|
145
|
+
|
146
|
+
While developing, you can install the gem locally by issuing
|
147
|
+
|
148
|
+
```
|
149
|
+
rake install
|
150
|
+
```
|
151
|
+
|
152
|
+
You can also run the command directly with `bundle exec ruby -I lib bin/hiptest-publisher`. It is handy to define an alias so you can test your code easily:
|
153
|
+
|
154
|
+
```
|
155
|
+
# this alias will only work when run from the root of the project
|
156
|
+
alias hiptest-publisher='bundle exec ruby -I lib bin/hiptest-publisher'
|
157
|
+
```
|
158
|
+
|
159
|
+
|
142
160
|
Adding support for other languages and framework
|
143
161
|
------------------------------------------------
|
144
162
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
[_common]
|
2
|
+
template_dirs = csharp, common
|
3
|
+
namespace = 'Example'
|
4
|
+
indentation = ' '
|
5
|
+
filename_convention = 'camelize'
|
6
|
+
naming_convention = 'camelize'
|
7
|
+
|
8
|
+
[tests]
|
9
|
+
filename = 'ProjectTest.cs'
|
10
|
+
scenario_filename = '%sTest.cs'
|
11
|
+
call_prefix = 'Actionwords'
|
12
|
+
|
13
|
+
[actionwords]
|
14
|
+
filename = 'Actionwords.cs'
|
15
|
+
call_prefix = 'this'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[_common]
|
2
|
+
package = 'com.example'
|
3
|
+
indentation = ' '
|
4
|
+
fallback_template = 'empty'
|
5
|
+
|
6
|
+
[features]
|
7
|
+
node_name = folders
|
8
|
+
template_dirs = gherkin, common
|
9
|
+
scenario_filename = '%s.feature'
|
10
|
+
indentation = ' '
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = cucumber/java, java, common
|
15
|
+
filename = 'StepDefinitions.java'
|
16
|
+
naming_convention = 'camelize_lower'
|
17
|
+
call_prefix = 'actionwords'
|
18
|
+
|
19
|
+
[actionwords]
|
20
|
+
template_dirs = java, common
|
21
|
+
filename = 'Actionwords.java'
|
22
|
+
naming_convention = 'camelize_lower'
|
data/lib/config/cucumber.conf
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
[_common]
|
2
|
+
indentation = ' '
|
3
|
+
namespace = 'Example'
|
4
|
+
fallback_template = 'empty'
|
5
|
+
|
6
|
+
[features]
|
7
|
+
indentation = ' '
|
8
|
+
node_name = folders
|
9
|
+
template_dirs = gherkin, gherkin, common
|
10
|
+
scenario_filename = '%s.feature'
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = specflow, csharp, common
|
15
|
+
filename = 'StepDefinitions.cs'
|
16
|
+
naming_convention = 'camelize_upper'
|
17
|
+
call_prefix = 'Actionwords'
|
18
|
+
|
19
|
+
[actionwords]
|
20
|
+
template_dirs = csharp, common
|
21
|
+
filename = 'Actionwords.cs'
|
22
|
+
naming_convention = 'camelize_upper'
|
@@ -85,6 +85,15 @@ module Hiptest
|
|
85
85
|
if present?(cli_options.test_run_id) && !numeric?(cli_options.test_run_id)
|
86
86
|
raise CliOptionError, "Invalid format --test-run-id=\"#{@cli_options.test_run_id}\": the test run id must be numeric"
|
87
87
|
end
|
88
|
+
|
89
|
+
# language
|
90
|
+
if present?(cli_options.language)
|
91
|
+
begin
|
92
|
+
LanguageConfigParser.config_path_for(cli_options)
|
93
|
+
rescue ArgumentError => err
|
94
|
+
raise CliOptionError, err.message
|
95
|
+
end
|
96
|
+
end
|
88
97
|
end
|
89
98
|
|
90
99
|
private
|
@@ -374,6 +374,7 @@ class LanguageGroupConfig
|
|
374
374
|
node: node,
|
375
375
|
call_prefix: @language_group_params[:call_prefix],
|
376
376
|
package: @language_group_params[:package],
|
377
|
+
namespace: @language_group_params[:namespace]
|
377
378
|
)
|
378
379
|
end
|
379
380
|
|
@@ -443,7 +444,7 @@ class LanguageConfigParser
|
|
443
444
|
end.compact.first
|
444
445
|
if config_path.nil?
|
445
446
|
message = "cannot find configuration file in \"#{hiptest_publisher_path}/config\" for language #{cli_options.language.inspect}"
|
446
|
-
message << " and framework #{cli_options.framework.inspect}"
|
447
|
+
message << " and framework #{cli_options.framework.inspect}" unless cli_options.framework.to_s.empty?
|
447
448
|
raise ArgumentError.new(message)
|
448
449
|
end
|
449
450
|
config_path
|
@@ -492,6 +493,8 @@ class LanguageConfigParser
|
|
492
493
|
language_group_params.merge!(group_config(group_name))
|
493
494
|
language_group_params[:group_name] = group_name
|
494
495
|
language_group_params[:package] = @cli_options.package if @cli_options.package
|
496
|
+
language_group_params[:namespace] = @cli_options.namespace if @cli_options.namespace
|
497
|
+
|
495
498
|
|
496
499
|
unless @cli_options.overriden_templates.nil? || @cli_options.overriden_templates.empty?
|
497
500
|
language_group_params[:overriden_templates] = @cli_options.overriden_templates
|
@@ -6,7 +6,8 @@ module Hiptest
|
|
6
6
|
:has_tags? => !item.children[:tags].empty?,
|
7
7
|
:has_step? => has_step?(item),
|
8
8
|
:is_empty? => item.children[:body].empty?,
|
9
|
-
:declared_variables => item.declared_variables_names
|
9
|
+
:declared_variables => item.declared_variables_names,
|
10
|
+
:raw_parameter_names => item.children[:parameters].map {|p| p.children[:name] }
|
10
11
|
}
|
11
12
|
end
|
12
13
|
|
@@ -53,7 +54,8 @@ module Hiptest
|
|
53
54
|
|
54
55
|
def walk_call(c)
|
55
56
|
{
|
56
|
-
:has_arguments? => !c.children[:arguments].empty
|
57
|
+
:has_arguments? => !c.children[:arguments].empty?,
|
58
|
+
:has_annotation? => !c.children[:annotation].nil?
|
57
59
|
}
|
58
60
|
end
|
59
61
|
|
@@ -33,16 +33,21 @@ class String
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def camelize_lower
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
36
|
+
camelized = self.camelize
|
37
|
+
if camelized.empty?
|
38
|
+
""
|
39
|
+
else
|
40
|
+
"#{camelized[0].downcase}#{camelized[1..-1]}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def camelize_upper
|
45
|
+
camelized = self.camelize
|
46
|
+
if camelized.empty?
|
47
|
+
""
|
48
|
+
else
|
49
|
+
"#{camelized[0].upcase}#{camelized[1..-1]}"
|
50
|
+
end
|
46
51
|
end
|
47
52
|
|
48
53
|
def clear_extension
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
public void {{{ camelize_upper rendered_children.name }}}({{#if has_parameters?}}{{{join rendered_children.parameters ', '}}}{{/if}}) {{#curly}}
|
2
|
+
{{#clear_empty_lines}}
|
3
|
+
{{#indent}}{{#if has_tags?}}// Tags: {{{ join rendered_children.tags ' '}}}{{/if}}{{/indent}}
|
4
|
+
{{> body}}
|
5
|
+
{{/clear_empty_lines}}
|
6
|
+
{{/curly}}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{{#if has_datasets?}}{{> item_as_function}}
|
2
|
+
{{{ rendered_children.datatable }}}
|
3
|
+
{{else}}{{#comment '//'}}{{{ rendered_children.description }}}
|
4
|
+
{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}{{/if}}
|
5
|
+
{{/comment}}
|
6
|
+
[Test]
|
7
|
+
public void {{{ camelize rendered_children.name }}}{{#if rendered_children.uid}}Uid{{{ normalize rendered_children.uid}}}{{/if}}() {{#curly}}{{> body}}
|
8
|
+
{{/curly}}{{/if}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{> item_as_function}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.value }}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.to }}} = {{{ rendered_children.value }}};
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.left }}} {{{ rendered_children.operator }}} {{{ rendered_children.right }}}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
[Test]
|
2
|
+
public void {{{ camelize scenario_name}}}{{{ camelize rendered_children.name}}}{{#if rendered_children.uid}}Uid{{{ normalize rendered_children.uid}}}{{/if}}() {{#curly}}
|
3
|
+
{{#indent}}{{{ camelize scenario_name }}}({{{ join rendered_children.arguments ', '}}});{{/indent}}
|
4
|
+
{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
new Dictionary<String, String>() {{#curly}}{{{ join rendered_children.items ', '}}}{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.base }}}.{{{ rendered_children.name }}}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
if ({{{ rendered_children.condition }}}) {{#curly}}
|
2
|
+
{{#indent}}{{#each rendered_children.then}}{{{this}}}
|
3
|
+
{{/each}}{{/indent}}
|
4
|
+
{{#if has_else?}}{{ close_curly }} else {{open_curly}}
|
5
|
+
{{#indent}}{{#each rendered_children.else}}{{{this}}}
|
6
|
+
{{/each}}{{/indent}}
|
7
|
+
{{/if}}{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.base }}}[{{{ rendered_children.expression }}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
{{#curly}}{{{ join rendered_children.items ', '}}}{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
null
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ downcase node.type }}} {{{ camelize_lower rendered_children.name }}}
|
@@ -0,0 +1 @@
|
|
1
|
+
({{{ rendered_children.content }}})
|
@@ -0,0 +1 @@
|
|
1
|
+
{{#curly}}{{{ rendered_children.key }}}, {{{ rendered_children.value }}}{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{> scenario}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace {{{ context.namespace }}} {{#curly}}{{#indent}}
|
2
|
+
|
3
|
+
using System;
|
4
|
+
using NUnit.Framework;
|
5
|
+
|
6
|
+
[TestFixture]
|
7
|
+
public class {{{ clear_extension context.filename }}} {{#curly}}
|
8
|
+
{{#indent}}
|
9
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
10
|
+
{{#each rendered_children.scenarios}}{{{this}}}
|
11
|
+
{{/each}}
|
12
|
+
{{/indent}}
|
13
|
+
{{/curly}}
|
14
|
+
{{/indent}}
|
15
|
+
{{/curly}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace {{{ context.namespace }}} {{#curly}}{{#indent}}
|
2
|
+
|
3
|
+
using System;
|
4
|
+
using NUnit.Framework;
|
5
|
+
|
6
|
+
[TestFixture]
|
7
|
+
public class {{{ clear_extension context.filename }}} {{#curly}}
|
8
|
+
{{#indent}}
|
9
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
10
|
+
|
11
|
+
{{> scenario}}
|
12
|
+
{{/indent}}
|
13
|
+
{{/curly}}
|
14
|
+
{{/indent}}
|
15
|
+
{{/curly}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace {{{ context.namespace }}} {{#curly}}{{#indent}}
|
2
|
+
|
3
|
+
using System;
|
4
|
+
using NUnit.Framework;
|
5
|
+
|
6
|
+
[TestFixture]
|
7
|
+
public class {{{ clear_extension context.filename }}} {{#curly}}
|
8
|
+
{{#indent}}
|
9
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
10
|
+
|
11
|
+
{{> scenario}}
|
12
|
+
{{/indent}}
|
13
|
+
{{/curly}}
|
14
|
+
{{/indent}}
|
15
|
+
{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{#comment '//'}}TODO: Implement {{{ rendered_children.key }}}: {{{ rendered_children.value }}}{{/comment}}
|
@@ -0,0 +1 @@
|
|
1
|
+
"{{ rendered_children.value }}"
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.key }}}{{#if has_value? }}:{{{ rendered_children.value }}}{{/if}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{#join treated_chunks ' + '}}{{#if this.is_variable?}}{{{this.raw.children.name}}}{{else}}"{{{ escape_quotes this.raw.children.value }}}"{{/if}}{{/join}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{> scenario}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace {{{ context.namespace }}} {{#curly}}{{#indent}}
|
2
|
+
|
3
|
+
using System;
|
4
|
+
using NUnit.Framework;
|
5
|
+
|
6
|
+
[TestFixture]
|
7
|
+
public class {{{ clear_extension context.filename }}} {{#curly}}
|
8
|
+
{{#indent}}
|
9
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
10
|
+
{{#each rendered_children.tests}}{{{this}}}
|
11
|
+
{{/each}}
|
12
|
+
{{/indent}}
|
13
|
+
{{/curly}}
|
14
|
+
{{/indent}}
|
15
|
+
{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ rendered_children.operator }}}{{{ rendered_children.expression }}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{ camelize_lower rendered_children.name }}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{{#if rendered_children.gherkin_annotation }}@Given("{{{escape_quotes rendered_children.gherkin_pattern }}}")
|
2
|
+
public void {{{camelize_lower rendered_children.name}}}({{{ join rendered_children.parameters ', '}}}) {{#curly}}{{#indent}}
|
3
|
+
{{{ context.call_prefix }}}.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{camelize_lower this}}}{{/join}}{{/if}});
|
4
|
+
{{/indent}}
|
5
|
+
{{/curly}}
|
6
|
+
{{/if}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
package {{{ context.package }}};
|
2
|
+
|
3
|
+
import cucumber.api.java.en.Given;
|
4
|
+
|
5
|
+
public class StepDefinitions {{#curly}}{{#indent}}
|
6
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
7
|
+
|
8
|
+
{{#each rendered_children.actionwords}}{{{this}}}
|
9
|
+
{{/each}}
|
10
|
+
{{/indent}}
|
11
|
+
{{/curly}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ node.type }}} {{{ camelize_lower rendered_children.name }}}
|
File without changes
|
@@ -1,3 +1,3 @@
|
|
1
|
-
# To export your project to
|
1
|
+
# To export your project to Gherkin correctly, please add the option
|
2
2
|
# --split-scenarios when calling hiptest-publisher. It will generate one
|
3
|
-
# feature file per
|
3
|
+
# feature file per folder from your project.
|
@@ -1,4 +1,3 @@
|
|
1
|
-
Feature: {{{ rendered_children.name }}}{{#indent}}
|
2
1
|
{{#if has_datasets?}}
|
3
2
|
Scenario Outline: {{{ rendered_children.name }}}{{#indent}}
|
4
3
|
{{#each rendered_children.body}}{{{ this }}}
|
@@ -12,5 +11,4 @@ Scenario: {{{ rendered_children.name }}}{{#if rendered_children.uid}} (uid:{{{re
|
|
12
11
|
{{#each rendered_children.body}}{{{ this }}}
|
13
12
|
{{/each}}
|
14
13
|
{{/indent}}
|
15
|
-
{{/if}}
|
16
|
-
{{/indent}}
|
14
|
+
{{/if}}
|
data/lib/templates/java/call.hbs
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
{{#if
|
1
|
+
{{#if has_annotation? }}{{#comment '//'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
|
2
|
+
{{/if}}{{#if context.call_prefix}}{{{context.call_prefix}}}.{{/if}}{{{ camelize_lower rendered_children.actionword }}}({{{ join rendered_children.arguments ', '}}});
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
{{#if has_annotation? }}{{#comment '//'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
|
2
|
+
{{/if}}this.{{#if context.call_prefix}}{{{ context.call_prefix }}}.{{/if}}{{{ camelize_lower rendered_children.actionword }}}({{{ join rendered_children.arguments ', '}}});
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
{{#if has_annotation? }}{{#comment '#'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
|
2
|
+
{{/if}}self.{{#if context.call_prefix}}{{{ context.call_prefix }}}.{{/if}}{{{ underscore rendered_children.actionword }}}({{{ join rendered_children.arguments ', '}}})
|
@@ -1 +1,2 @@
|
|
1
|
-
{{
|
1
|
+
{{#if has_annotation? }}{{#comment '#'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
|
2
|
+
{{/if}}{{{ underscore rendered_children.actionword }}}{{#if has_arguments?}}{{tab}}{{{ join rendered_children.arguments '\t'}}}{{/if}}
|
data/lib/templates/ruby/call.hbs
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
{{
|
1
|
+
{{#if has_annotation? }}{{#comment '#'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
|
2
|
+
{{/if}}{{{ underscore rendered_children.actionword }}}{{#if has_arguments?}}({{{ join rendered_children.all_arguments ', '}}}){{/if}}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
[Given("{{{escape_quotes rendered_children.gherkin_pattern }}}"), When("{{{escape_quotes rendered_children.gherkin_pattern }}}"), Then("{{{escape_quotes rendered_children.gherkin_pattern }}}")]
|
2
|
+
public void {{{ camelize_upper rendered_children.name }}}({{#if has_parameters?}}{{{join rendered_children.parameters ', '}}}{{/if}}) {{#curly}}{{#indent}}
|
3
|
+
{{{ context.call_prefix }}}.{{ camelize_upper rendered_children.name }}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{camelize_lower this}}}{{/join}}{{/if}});
|
4
|
+
{{/indent}}
|
5
|
+
{{/curly}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace {{{ context.namespace }}} {{#curly}}{{#indent}}
|
2
|
+
using System;
|
3
|
+
using TechTalk.SpecFlow;
|
4
|
+
|
5
|
+
[Binding]
|
6
|
+
public class StepDefinitions {{#curly}}{{#indent}}
|
7
|
+
|
8
|
+
public Actionwords {{{ context.call_prefix }}} = new Actionwords();
|
9
|
+
{{#each rendered_children.actionwords}}
|
10
|
+
{{{this}}}
|
11
|
+
{{/each}}
|
12
|
+
{{/indent}}
|
13
|
+
{{/curly}}
|
14
|
+
{{/indent}}
|
15
|
+
{{/curly}}
|
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: 0.
|
4
|
+
version: 0.7.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: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -76,14 +76,14 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - '='
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 1.6.7.
|
79
|
+
version: 1.6.7.rc4
|
80
80
|
type: :runtime
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - '='
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 1.6.7.
|
86
|
+
version: 1.6.7.rc4
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: multipart-post
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,7 +239,8 @@ extra_rdoc_files:
|
|
239
239
|
files:
|
240
240
|
- README.md
|
241
241
|
- bin/hiptest-publisher
|
242
|
-
- lib/config/
|
242
|
+
- lib/config/csharp.conf
|
243
|
+
- lib/config/cucumber-java.conf
|
243
244
|
- lib/config/cucumber.conf
|
244
245
|
- lib/config/java-testng.conf
|
245
246
|
- lib/config/java.conf
|
@@ -250,6 +251,7 @@ files:
|
|
250
251
|
- lib/config/ruby-minitest.conf
|
251
252
|
- lib/config/ruby.conf
|
252
253
|
- lib/config/seleniumide.conf
|
254
|
+
- lib/config/specflow.conf
|
253
255
|
- lib/hiptest-publisher.rb
|
254
256
|
- lib/hiptest-publisher/actionword_indexer.rb
|
255
257
|
- lib/hiptest-publisher/call_arguments_adder.rb
|
@@ -273,21 +275,54 @@ files:
|
|
273
275
|
- lib/templates/common/booleanliteral.hbs
|
274
276
|
- lib/templates/common/dataset.hbs
|
275
277
|
- lib/templates/common/datatable.hbs
|
278
|
+
- lib/templates/common/empty.hbs
|
276
279
|
- lib/templates/common/nullliteral.hbs
|
277
280
|
- lib/templates/common/numericliteral.hbs
|
278
281
|
- lib/templates/common/stringliteral.hbs
|
279
282
|
- lib/templates/common/variable.hbs
|
283
|
+
- lib/templates/csharp/_body.hbs
|
284
|
+
- lib/templates/csharp/_item_as_function.hbs
|
285
|
+
- lib/templates/csharp/_scenario.hbs
|
286
|
+
- lib/templates/csharp/actionword.hbs
|
287
|
+
- lib/templates/csharp/actionwords.hbs
|
288
|
+
- lib/templates/csharp/argument.hbs
|
289
|
+
- lib/templates/csharp/assign.hbs
|
290
|
+
- lib/templates/csharp/binaryexpression.hbs
|
291
|
+
- lib/templates/csharp/call.hbs
|
292
|
+
- lib/templates/csharp/dataset.hbs
|
293
|
+
- lib/templates/csharp/dict.hbs
|
294
|
+
- lib/templates/csharp/field.hbs
|
295
|
+
- lib/templates/csharp/ifthen.hbs
|
296
|
+
- lib/templates/csharp/index.hbs
|
297
|
+
- lib/templates/csharp/list.hbs
|
298
|
+
- lib/templates/csharp/nullliteral.hbs
|
299
|
+
- lib/templates/csharp/parameter.hbs
|
300
|
+
- lib/templates/csharp/parenthesis.hbs
|
301
|
+
- lib/templates/csharp/property.hbs
|
302
|
+
- lib/templates/csharp/scenario.hbs
|
303
|
+
- lib/templates/csharp/scenarios.hbs
|
304
|
+
- lib/templates/csharp/single_scenario.hbs
|
305
|
+
- lib/templates/csharp/single_test.hbs
|
306
|
+
- lib/templates/csharp/step.hbs
|
307
|
+
- lib/templates/csharp/stringliteral.hbs
|
308
|
+
- lib/templates/csharp/tag.hbs
|
309
|
+
- lib/templates/csharp/template.hbs
|
310
|
+
- lib/templates/csharp/test.hbs
|
311
|
+
- lib/templates/csharp/tests.hbs
|
312
|
+
- lib/templates/csharp/unaryexpression.hbs
|
313
|
+
- lib/templates/csharp/variable.hbs
|
314
|
+
- lib/templates/csharp/while.hbs
|
280
315
|
- lib/templates/cucumber/actionword.hbs
|
281
316
|
- lib/templates/cucumber/actionwords.hbs
|
282
|
-
- lib/templates/cucumber/
|
317
|
+
- lib/templates/cucumber/java/actionword.hbs
|
318
|
+
- lib/templates/cucumber/java/actionwords.hbs
|
319
|
+
- lib/templates/cucumber/java/parameter.hbs
|
283
320
|
- lib/templates/cucumber/parameter.hbs
|
284
321
|
- lib/templates/gherkin/argument.hbs
|
285
322
|
- lib/templates/gherkin/call.hbs
|
286
323
|
- lib/templates/gherkin/dataset.hbs
|
287
324
|
- lib/templates/gherkin/datatable.hbs
|
288
|
-
- lib/templates/gherkin/
|
289
|
-
- lib/templates/gherkin/folders_as_features/folder.hbs
|
290
|
-
- lib/templates/gherkin/folders_as_features/single_scenario.hbs
|
325
|
+
- lib/templates/gherkin/folder.hbs
|
291
326
|
- lib/templates/gherkin/parameter.hbs
|
292
327
|
- lib/templates/gherkin/scenarios.hbs
|
293
328
|
- lib/templates/gherkin/single_scenario.hbs
|
@@ -464,13 +499,14 @@ files:
|
|
464
499
|
- lib/templates/ruby/while.hbs
|
465
500
|
- lib/templates/seleniumide/argument.hbs
|
466
501
|
- lib/templates/seleniumide/call.hbs
|
467
|
-
- lib/templates/seleniumide/empty.hbs
|
468
502
|
- lib/templates/seleniumide/single_test.hbs
|
469
503
|
- lib/templates/seleniumide/step.hbs
|
470
504
|
- lib/templates/seleniumide/stringliteral.hbs
|
471
505
|
- lib/templates/seleniumide/template.hbs
|
472
506
|
- lib/templates/seleniumide/test.hbs
|
473
507
|
- lib/templates/seleniumide/tests.hbs
|
508
|
+
- lib/templates/specflow/actionword.hbs
|
509
|
+
- lib/templates/specflow/actionwords.hbs
|
474
510
|
homepage: https://hiptest.net
|
475
511
|
licenses:
|
476
512
|
- GPL 2
|
@@ -491,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
491
527
|
version: '0'
|
492
528
|
requirements: []
|
493
529
|
rubyforge_project:
|
494
|
-
rubygems_version: 2.4.
|
530
|
+
rubygems_version: 2.4.6
|
495
531
|
signing_key:
|
496
532
|
specification_version: 4
|
497
533
|
summary: Export your tests from Hiptest into executable tests.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
[_common]
|
2
|
-
indentation = ' '
|
3
|
-
fallback_template = 'empty'
|
4
|
-
|
5
|
-
[features]
|
6
|
-
node_name = folders
|
7
|
-
template_dirs = gherkin/folders_as_features, gherkin, common
|
8
|
-
scenario_filename = '%s.feature'
|
9
|
-
|
10
|
-
[step_definitions]
|
11
|
-
node_name = actionwords
|
12
|
-
template_dirs = cucumber, common
|
13
|
-
filename = 'step_definitions.rb'
|
14
|
-
naming_convention = 'underscore'
|
15
|
-
|
16
|
-
[actionwords]
|
17
|
-
template_dirs = ruby, common
|
18
|
-
filename = 'actionwords.rb'
|
19
|
-
naming_convention = 'underscore'
|
File without changes
|
@@ -1,14 +0,0 @@
|
|
1
|
-
{{#if has_datasets?}}
|
2
|
-
Scenario Outline: {{{ rendered_children.name }}}{{#indent}}
|
3
|
-
{{#each rendered_children.body}}{{{ this }}}
|
4
|
-
{{/each}}
|
5
|
-
Examples:{{#indent}}
|
6
|
-
| {{ join rendered_children.parameters ' | ' }} | hiptest-uid |
|
7
|
-
{{{rendered_children.datatable}}}
|
8
|
-
{{/indent}}{{/indent}}
|
9
|
-
{{else}}
|
10
|
-
Scenario: {{{ rendered_children.name }}}{{#if rendered_children.uid}} (uid:{{{rendered_children.uid}}}){{/if}}{{#indent}}
|
11
|
-
{{#each rendered_children.body}}{{{ this }}}
|
12
|
-
{{/each}}
|
13
|
-
{{/indent}}
|
14
|
-
{{/if}}
|
File without changes
|