hiptest-publisher 2.3.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -2
- data/README.md +28 -21
- data/bin/hiptest-publisher +11 -7
- data/config/locales/en.yml +18 -13
- data/lib/config/cucumber-typescript.conf +41 -41
- data/lib/config/cucumber_legacy-groovy.conf +40 -0
- data/lib/config/cucumber_legacy-java.conf +24 -0
- data/lib/config/{cucumber_expressions-typescript.conf → cucumber_legacy-typescript.conf} +41 -41
- data/lib/hiptest-publisher/cli_options_checker.rb +7 -0
- data/lib/hiptest-publisher/client.rb +76 -14
- data/lib/hiptest-publisher/formatters/console_formatter.rb +1 -0
- data/lib/hiptest-publisher/handlebars_helper.rb +1 -1
- data/lib/hiptest-publisher/options_parser.rb +27 -6
- data/lib/hiptest-publisher/renderer.rb +5 -1
- data/lib/hiptest-publisher.rb +1 -1
- data/lib/templates/cucumber/groovy/step-definitions/actionword.hbs +1 -1
- data/lib/templates/cucumber/groovy/step-definitions/actionwords.hbs +3 -2
- data/lib/templates/cucumber/groovy/step-definitions/library.hbs +3 -2
- data/lib/templates/cucumber/groovy/step-definitions/libraryactionword.hbs +1 -1
- data/lib/templates/cucumber/java/actionword.hbs +1 -1
- data/lib/templates/cucumber/java/actionwords.hbs +2 -2
- data/lib/templates/cucumber/typescript/actionword.hbs +1 -1
- data/lib/templates/cucumber/typescript/libraryactionword.hbs +1 -1
- data/lib/templates/cucumber_legacy/groovy/step-definitions/actionword.hbs +5 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/actionwords.hbs +10 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/library.hbs +10 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/libraryactionword.hbs +5 -0
- data/lib/templates/cucumber_legacy/java/actionword.hbs +6 -0
- data/lib/templates/cucumber_legacy/java/actionwords.hbs +12 -0
- data/lib/templates/cucumber_legacy/typescript/actionword.hbs +5 -0
- data/lib/templates/{cucumber_expressions → cucumber_legacy}/typescript/libraryactionword.hbs +1 -1
- data/lib/templates/gherkin/scenarios.hbs +1 -1
- metadata +57 -38
- data/CHANGELOG.md +0 -286
- data/lib/templates/cucumber_expressions/typescript/actionword.hbs +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee9b0d1139b33645d29b179ef632be982d319130dfe33f004e0957007180b3ab
|
4
|
+
data.tar.gz: b3bffa7ccb55a32d588094c539d177fd80bb8451aa17c95d51524281b7b40d2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b237b6737ce397d3989e1cdfa53146c9ace569cc6073419cd459b893d86c328de1e4aa62c3e936075ecaa66a273e275882a868d82e43518d1cf6a14587cc96e
|
7
|
+
data.tar.gz: 200e77bc3b0cca2fbb3e239f98c7e9ebaed75a21972e5f4fc4f237a7f019ec34a039e38fa2b594c15ea11e9e6a516226c0d6528f8a0fd78b9d8e9a70485d110e
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) SmartBear Software Inc.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
SOFTWARE.
|
22
|
-
|
data/README.md
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
HipTest Publisher
|
2
2
|
==============
|
3
3
|
|
4
|
-
[![
|
5
|
-
[![Build Status Linux](https://travis-ci.org/hiptest/hiptest-publisher.svg?branch=master)](https://travis-ci.org/hiptest/hiptest-publisher)
|
4
|
+
[![GitHub Actions status](https://github.com/hiptest/hiptest-publisher/workflows/Tests/badge.svg)](https://github.com/hiptest/hiptest-publisher/actions?query=workflow%3ATests)
|
6
5
|
[![Build Status Windows](https://ci.appveyor.com/api/projects/status/ciahcci0ayr1oihr/branch/master?svg=true)](https://ci.appveyor.com/project/hiptest/hiptest-publisher)
|
7
6
|
[![Gem Version](https://badge.fury.io/rb/hiptest-publisher.svg)](http://badge.fury.io/rb/hiptest-publisher)
|
8
7
|
[![Code Climate](https://codeclimate.com/github/hiptest/hiptest-publisher/badges/gpa.svg)](https://codeclimate.com/github/hiptest/hiptest-publisher)
|
9
8
|
[![Test Coverage](https://codeclimate.com/github/hiptest/hiptest-publisher/badges/coverage.svg)](https://codeclimate.com/github/hiptest/hiptest-publisher)
|
10
9
|
|
11
10
|
|
11
|
+
hiptest-publisher is a tool to read Test Management projects from CucumberStudio (formerly know as HipTest) and publish them as executable test scripts stubs to start automating.
|
12
|
+
|
12
13
|
Installing
|
13
14
|
----------
|
14
15
|
|
@@ -45,8 +46,8 @@ Note: for Windows users, take a look at [this Windows installation guide](docs/I
|
|
45
46
|
Exporting a project
|
46
47
|
-------------------
|
47
48
|
|
48
|
-
Go to
|
49
|
-
This tab is available only for projects you
|
49
|
+
Go to [CucumberStudio projects list](https://studio.cucumber.io/projects), pick one project, and select the Settings tab.
|
50
|
+
This tab is available only for projects you're admin of.
|
50
51
|
From there, copy the secret token and run this command line:
|
51
52
|
|
52
53
|
```shell
|
@@ -59,12 +60,12 @@ This will create a Ruby tests suite. For the moment, we support the following la
|
|
59
60
|
- Behave
|
60
61
|
- CSharp (NUnit)
|
61
62
|
- Cucumber (Groovy / Java / Javascript / Ruby / TypeScript)
|
62
|
-
- Cucumber
|
63
|
+
- Cucumber Legacy (Groovy / Java / TypeScript) (previous Cucumber versions)
|
63
64
|
- Groovy (Spock)
|
64
65
|
- Java (Espresso / JUnit / TestNg)
|
65
66
|
- JavaScript (CodeceptJS / Jasmine / Mocha / Protractor / QUnit)
|
66
67
|
- JBehave
|
67
|
-
- PHP (PHPUnit
|
68
|
+
- PHP (PHPUnit)
|
68
69
|
- Python (UnitTest)
|
69
70
|
- Robot Framework
|
70
71
|
- Ruby (MiniTest / RSpec)
|
@@ -72,8 +73,6 @@ This will create a Ruby tests suite. For the moment, we support the following la
|
|
72
73
|
- SpecFlow
|
73
74
|
- Swift (XCTest)
|
74
75
|
|
75
|
-
*Cucumber Expressions is standard Cucumber syntax that makes use of [Cucumber Expressions](https://cucumber.io/docs/cucumber/cucumber-expressions/)
|
76
|
-
|
77
76
|
You can specify the output language and framework in the command line, for example:
|
78
77
|
|
79
78
|
```shell
|
@@ -85,7 +84,7 @@ When publishing, you'll notice a file called ``actionwords_signature.yaml``. Sto
|
|
85
84
|
Exporting a test run
|
86
85
|
--------------------
|
87
86
|
|
88
|
-
You can generate the test suite from a test run of your project by specifying option `--test-run-id=<xxx>` when calling `hiptest-publisher`. You can find the test run id in the address bar of your browser. If your browser address is `https://
|
87
|
+
You can generate the test suite from a test run of your project by specifying option `--test-run-id=<xxx>` when calling `hiptest-publisher`. You can find the test run id in the address bar of your browser. If your browser address is `https://studio.cucumber.io/projects/1234/testRuns/6941`, then your test run id is `6941`. You can generate your tests from your test with this command line:
|
89
88
|
|
90
89
|
```shell
|
91
90
|
hiptest-publisher --token=<YOUR TOKEN> --test-run-id=6941
|
@@ -103,7 +102,7 @@ hiptest-publisher --help
|
|
103
102
|
You could obtain for example:
|
104
103
|
|
105
104
|
```shell
|
106
|
-
Exports tests from
|
105
|
+
Exports tests from CucumberStudio for automation.
|
107
106
|
|
108
107
|
Specific options:
|
109
108
|
-t, --token=TOKEN Secret token (available in your project settings)
|
@@ -113,11 +112,13 @@ Specific options:
|
|
113
112
|
--filename-pattern=PATTERN Filename pattern (containing %s)
|
114
113
|
-c, --config-file=PATH Configuration file
|
115
114
|
--overriden-templates=PATH Folder for overriden templates
|
115
|
+
--overriden-language-configs=PATH
|
116
|
+
Folder for overriden language configs
|
116
117
|
--test-run-id=ID Export data from a test run identified by its id
|
117
118
|
--test-run-name=NAME Export data from a test run identified by its name
|
118
119
|
--only=CATEGORIES Restrict export to given file categories (--only=list to list them)
|
119
120
|
--without=CATEGORIES Exclude file categories from import (--only=list to list them)
|
120
|
-
-x, --xml-file=PROJECT_XML XML file to use instead of fetching it from
|
121
|
+
-x, --xml-file=PROJECT_XML XML file to use instead of fetching it from CucumberStudio
|
121
122
|
--tests-only (deprecated) alias for --only=tests (default: false)
|
122
123
|
--actionwords-only (deprecated) alias for --only=actionwords (default: false)
|
123
124
|
--actionwords-signature Export actionwords signature (default: false)
|
@@ -136,19 +137,21 @@ Specific options:
|
|
136
137
|
--empty-folders Export empty folders (default: false)
|
137
138
|
--split-scenarios Export each scenario in a single file (except for Gherkin based languages) (default: false)
|
138
139
|
--leafless-export Use only last level action word (default: false)
|
139
|
-
-s, --site=SITE Site to fetch from (default: https://
|
140
|
+
-s, --site=SITE Site to fetch from (default: https://studio.cucumber.io)
|
140
141
|
-p, --push=FILE.TAP Push a results file to the server
|
141
142
|
--global-failure-on-missing-reports
|
142
143
|
When there is no results file to push, report a global failure (default: false)
|
143
144
|
--push-format=tap Format of the test results (cucumber-json, junit, nunit, robot, tap) (default: tap)
|
144
145
|
--execution-environment=NAME Name of the execution environment
|
146
|
+
--build-id=ID ID of an existing build the results will be added to
|
147
|
+
--build-name=NAME Name for the build that will be created in CucumberStudio (build names are not unique)
|
145
148
|
--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)
|
146
149
|
--[no-]uids Export UIDs (note: can be disabled only for Gherkin-based exports, may cause issue when pushing results back) (default: true)
|
147
150
|
--[no-]parent-folder-tags Export tags from parent folders (note: if set to false, those tags are never rendered. Only available for Gherkin base exports) (default: true)
|
148
151
|
--parameter-delimiter Parameter delimiter (for Gherkin based export only) (default: ")
|
149
152
|
--with-dataset-names Export dataset name when creating feature files (note: available only for Gherkin-based exports) (default: false)
|
150
|
-
--keep-filenames Keep the same name as in
|
151
|
-
--keep-foldernames Keep the same name as in
|
153
|
+
--keep-filenames Keep the same name as in CucumberStudio for the test files (note: may cause encoding issues) (default: false)
|
154
|
+
--keep-foldernames Keep the same name as in CucumberStudio for the folders (note: may cause encoding issues) (default: false)
|
152
155
|
--filter-on-scenario-ids=IDS Filter on scenario ids (use commas to separate ids when fetching multiple scenarios)
|
153
156
|
--filter-on-folder-ids=IDS Filter on folder ids (use commas to separate ids when fetching multiple folders)
|
154
157
|
--filter-on-scenario-name=NAME
|
@@ -190,6 +193,8 @@ package = 'com.youcompany'
|
|
190
193
|
|
191
194
|
Note that options from command line arguments override options from config file.
|
192
195
|
|
196
|
+
If you want to override one of the existing configurations, you can use the --overriden-language-configs option to specify a path that is checked for configuration files prior to looking at the default configuration files. If one is found, it will use that file instead of the default, otherwise it will use the default configuration for the specified language.
|
197
|
+
|
193
198
|
### Using hiptest-publisher behind a http proxy
|
194
199
|
|
195
200
|
To use hiptest-publisher behind a http proxy, set an environment variable named http_proxy
|
@@ -201,17 +206,19 @@ If username and password are required:
|
|
201
206
|
http_proxy=http://<username>:<password>@<proxy_host>:<proxy_port>
|
202
207
|
```
|
203
208
|
|
204
|
-
Posting results to
|
205
|
-
|
209
|
+
Posting results to CucumberStudio
|
210
|
+
---------------------------------
|
206
211
|
|
207
|
-
You can use the
|
208
|
-
|
212
|
+
You can use the option `--push` to push the results back to CucumberStudio. For this, you first need to generate the test code from a Test Run by specifying option `--test-run-id=<xxx>` during code generation (or add it to the configuration file).
|
213
|
+
|
214
|
+
The tests must then generate a test report that is supported by CucumberStudio. Currently four types of test results are handled:
|
215
|
+
- Cucumber JSON format
|
209
216
|
- jUnit XML format
|
210
217
|
- [NUnit XML v2 format](https://github.com/nunit/docs/wiki/XML-Formats#v2-test-results)
|
211
|
-
- [TAP (Test Anything Protocol)](https://testanything.org/)
|
212
218
|
- Robot framework XML output
|
219
|
+
- [TAP (Test Anything Protocol)](https://testanything.org/)
|
213
220
|
|
214
|
-
You can specify the type of export when pushing by using the option
|
221
|
+
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.
|
215
222
|
|
216
223
|
You can push multiple files at once (using wildcard) but in that case, do not forget to add quotes. For examples:
|
217
224
|
|
@@ -225,7 +232,7 @@ Development
|
|
225
232
|
While developing, you can install the gem locally by issuing
|
226
233
|
|
227
234
|
```
|
228
|
-
rake install
|
235
|
+
bundle exec rake install
|
229
236
|
```
|
230
237
|
|
231
238
|
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:
|
data/bin/hiptest-publisher
CHANGED
@@ -16,14 +16,18 @@ require 'ruby_version'
|
|
16
16
|
require 'hiptest-publisher/i18n'
|
17
17
|
require 'hiptest-publisher/utils'
|
18
18
|
|
19
|
-
# Ensure ruby version >= 2.
|
20
|
-
if RubyVersion < '2.
|
21
|
-
STDERR.puts(I18n.t('ruby_version.required_version', version: '2.
|
19
|
+
# Ensure ruby version >= 2.5
|
20
|
+
if RubyVersion < '2.5.0'
|
21
|
+
STDERR.puts(I18n.t('ruby_version.required_version', version: '2.5.0'))
|
22
22
|
STDERR.puts(I18n.t('ruby_version.current_version', engine: RUBY_ENGINE, version: RUBY_VERSION))
|
23
23
|
STDERR.puts(I18n.t('ruby_version.use_more_recent'))
|
24
24
|
|
25
|
-
if RubyVersion.is? 2.
|
26
|
-
STDERR.puts(I18n.('ruby_version.support_ended', version: '2.
|
25
|
+
if RubyVersion.is? 2.4
|
26
|
+
STDERR.puts(I18n.('ruby_version.support_ended', version: '2.4.0', year: '2020', month: '03', day: '31'))
|
27
|
+
elsif RubyVersion.is? 2.3
|
28
|
+
STDERR.puts(I18n.('ruby_version.support_ended', version: '2.3.0', year: '2019', month: '03', day: '31'))
|
29
|
+
elsif RubyVersion.is? 2.2
|
30
|
+
STDERR.puts(I18n.('ruby_version.support_ended', version: '2.2.0', year: '2018', month: '03', day: '31'))
|
27
31
|
elsif RubyVersion.is? 2.1
|
28
32
|
STDERR.puts(I18n.('ruby_version.support_ended', version: '2.1.0', year: '2017', month: '04', day: '01'))
|
29
33
|
elsif RubyVersion.is? 2.0
|
@@ -36,7 +40,7 @@ if RubyVersion < '2.3.0'
|
|
36
40
|
exit 1
|
37
41
|
end
|
38
42
|
|
39
|
-
if RubyVersion < '2.4'
|
43
|
+
if RubyVersion < '2.4' # TODO: deprecate ruby 2.5 (eol 2021-03-31)
|
40
44
|
STDERR.puts(I18n.t('ruby_version.current_version', engine: RUBY_ENGINE, version: RUBY_VERSION))
|
41
45
|
STDERR.puts(I18n.t('ruby_version.deprecation_warning', version: '2.3'))
|
42
46
|
STDERR.puts(I18n.t('ruby_version.support_ended', version: '2.3', year: '2019', month: '03', day: '31'))
|
@@ -45,7 +49,7 @@ end
|
|
45
49
|
require 'hiptest-publisher'
|
46
50
|
begin
|
47
51
|
require 'pry' # only available in development
|
48
|
-
rescue LoadError
|
52
|
+
rescue StandardError, LoadError
|
49
53
|
end
|
50
54
|
|
51
55
|
Hiptest::Publisher.new(ARGV).run
|
data/config/locales/en.yml
CHANGED
@@ -66,7 +66,7 @@ en:
|
|
66
66
|
up_to_date: Your current install of hiptest-publisher (%{current}) is up-to-date.
|
67
67
|
default: default
|
68
68
|
errors:
|
69
|
-
api_error:
|
69
|
+
api_error: CucumberStudio API returned error %{code}
|
70
70
|
cli_options:
|
71
71
|
actionwords_signature_directory: 'Bad Action Words signature file: the file "%{path}" is a directory'
|
72
72
|
filter_status_without_test_run: |
|
@@ -86,7 +86,7 @@ en:
|
|
86
86
|
|
87
87
|
Found: %{incorrect_value}
|
88
88
|
invalid_tag_value_list: |
|
89
|
-
%{option} should be a list of comma separated tags
|
89
|
+
%{option} should be a list of comma separated tags from CucumberStudio
|
90
90
|
|
91
91
|
Found: %{incorrect_value}
|
92
92
|
invalid_test_run_id: 'Invalid format --test-run-id="%{test_run_id}": the test run id must be numeric'
|
@@ -100,7 +100,7 @@ en:
|
|
100
100
|
missing_token: |
|
101
101
|
Missing argument --token: you must specify project secret token with --token=<project-token>
|
102
102
|
|
103
|
-
The project secret token can be found on
|
103
|
+
The project secret token can be found on CucumberStudio in the settings section, under
|
104
104
|
'Test code generation'. It is a sequence of numbers uniquely identifying your
|
105
105
|
project.
|
106
106
|
|
@@ -109,6 +109,7 @@ en:
|
|
109
109
|
You specified multiple filters for the export.
|
110
110
|
|
111
111
|
Only one filter can be applied.
|
112
|
+
multiple_build_options: 'Error with --push: you can not specify both --build-id and --build-name options'
|
112
113
|
output_directory_not_directory: 'Error with --output-directory: the file "%{output_dir}" is not a directory'
|
113
114
|
output_directory_not_writable: 'Error with --output-directory: the directory "%{output_dir}" is not writable'
|
114
115
|
output_directory_parent_not_writable: 'Error with --output-directory: the directory "%{output_dir}" can not be created because "%{realpath}" is not writable'
|
@@ -128,9 +129,9 @@ en:
|
|
128
129
|
no_test_runs: 'No matching test run found: this project does not have any test runs.'
|
129
130
|
project_not_found: No project found with this secret token.
|
130
131
|
template_not_found: no template with name %{template_name} in dirs %{dirs}
|
131
|
-
test_run_list_unavailable: Cannot get the list of available test runs from
|
132
|
+
test_run_list_unavailable: Cannot get the list of available test runs from CucumberStudio. Try using --test-run-id instead of --test-run-name
|
132
133
|
exporting_file: Exporting %{name}
|
133
|
-
fetching_data: Fetching data from
|
134
|
+
fetching_data: Fetching data from CucumberStudio
|
134
135
|
using_cached_data: Using cached data from previous export
|
135
136
|
caching_data: Caching data
|
136
137
|
using_cache: "Using cache: %{full_path}"
|
@@ -148,7 +149,7 @@ en:
|
|
148
149
|
hiptest-publisher --language=%{language} --only=%{first},%{second}
|
149
150
|
description: |2
|
150
151
|
|
151
|
-
Exports tests from
|
152
|
+
Exports tests from CucumberStudio for automation.
|
152
153
|
|
153
154
|
Specific options:
|
154
155
|
header: 'Usage: hiptest-publisher [options]'
|
@@ -167,6 +168,8 @@ en:
|
|
167
168
|
aw_deleted: Output signature of deleted action words
|
168
169
|
aw_renamed: Output signatures of renamed action words
|
169
170
|
aw_signature_changed: Output signatures of action words for which signature changed
|
171
|
+
build_id: ID of an existing build the results will be added to
|
172
|
+
build_name: Name for the build that will be created in CucumberStudio (build names are not unique)
|
170
173
|
check_version: Check if a new release of hiptest-publisher is available
|
171
174
|
color: Force [un]use of ANSI color in text output
|
172
175
|
config: Configuration file
|
@@ -183,9 +186,9 @@ en:
|
|
183
186
|
framework: Test framework to use
|
184
187
|
global_failure_on_missing_reports: When there is no results file to push, report a global failure
|
185
188
|
help: Show this message
|
186
|
-
http_proxy: 'Specify your http proxy to access
|
187
|
-
keep_filenames: 'Keep the same name as in
|
188
|
-
keep_foldernames: 'Keep the same name as in
|
189
|
+
http_proxy: 'Specify your http proxy to access CucumberStudio'
|
190
|
+
keep_filenames: 'Keep the same name as in CucumberStudio for the test files (note: may cause encoding issues)'
|
191
|
+
keep_foldernames: 'Keep the same name as in CucumberStudio for the folders (note: may cause encoding issues)'
|
189
192
|
language: Target language
|
190
193
|
languages_help: Show languages and framework options
|
191
194
|
leafless_export: Use only last level action word
|
@@ -195,12 +198,13 @@ en:
|
|
195
198
|
only: Restrict export to given file categories (--only=list to list them)
|
196
199
|
output_directory: Output directory
|
197
200
|
overriden_templates: Folder for overriden templates
|
201
|
+
overriden_language_configs: Folder for overriden language configs
|
198
202
|
parameter_delimiter: Parameter delimiter (for Gherkin based export only)
|
199
203
|
parent_folder_tags: 'Export tags from parent folders (note: if set to false, those tags are never rendered. Only available for Gherkin base exports)'
|
200
204
|
push: Push a results file to the server
|
201
205
|
push_format: Format of the test results (cucumber-json, junit, nunit, robot, tap)
|
202
206
|
site: Site to fetch from
|
203
|
-
sort: 'Sorting of tests in output: id will sort them by age, order will keep the same order
|
207
|
+
sort: 'Sorting of tests in output: id will sort them by age, order will keep the same order as in CucumberStudio (only with --with-folders option, will fallback to id otherwise), alpha will sort them by name'
|
204
208
|
split_scenarios: Export each scenario in a single file (except for Gherkin based languages)
|
205
209
|
test_run_id: Export data from a test run identified by its id
|
206
210
|
test_run_name: Export data from a test run identified by its name
|
@@ -211,9 +215,10 @@ en:
|
|
211
215
|
with_dataset_names: 'Export dataset name when creating feature files (note: available only for Gherkin-based exports)'
|
212
216
|
with_folders: Use folders hierarchy to export files in respective directories
|
213
217
|
without: Exclude file categories from import (--only=list to list them)
|
214
|
-
xml_file: XML file to use instead of fetching it from
|
215
|
-
cache_dir: "Path to the directory to store cache of
|
216
|
-
cache_duration: "Validity of the
|
218
|
+
xml_file: XML file to use instead of fetching it from CucumberStudio
|
219
|
+
cache_dir: "Path to the directory to store cache of CucumberStudio data"
|
220
|
+
cache_duration: "Validity of the CucumberStudio data cache in seconds"
|
221
|
+
indentation: Customize indentation
|
217
222
|
overwrite:
|
218
223
|
ask_confirmation: 'File %{path} exists, do you want to overwrite it? [y/N] '
|
219
224
|
warning_message: File %{path} already exists, skipping. Use --force to overwrite it.
|
@@ -1,41 +1,41 @@
|
|
1
|
-
[_common]
|
2
|
-
indentation = ' '
|
3
|
-
fallback_template = 'empty'
|
4
|
-
|
5
|
-
[features]
|
6
|
-
node_name = folders
|
7
|
-
template_dirs = gherkin/inlined_uids, gherkin, common
|
8
|
-
named_filename = '%s.feature'
|
9
|
-
indentation = ' '
|
10
|
-
renderer_addons = 'GherkinAddon'
|
11
|
-
|
12
|
-
[step_definitions]
|
13
|
-
node_name = actionwords
|
14
|
-
template_dirs = cucumber/typescript, javascript, common
|
15
|
-
filename = 'step_definitions.ts'
|
16
|
-
naming_convention = 'camelize_lower'
|
17
|
-
call_prefix = 'actionwords'
|
18
|
-
renderer_addons = 'GherkinAddon'
|
19
|
-
|
20
|
-
[step_definitions_library]
|
21
|
-
node_name = libraries
|
22
|
-
template_dirs = cucumber/typescript, javascript, common
|
23
|
-
named_filename = 'steps_%s.ts'
|
24
|
-
naming_convention = 'camelize_lower'
|
25
|
-
call_prefix = 'actionwords'
|
26
|
-
renderer_addons = 'GherkinAddon'
|
27
|
-
|
28
|
-
[actionwords]
|
29
|
-
template_dirs = typescript, javascript, common
|
30
|
-
filename = 'actionwords.ts'
|
31
|
-
naming_convention = 'camelize_lower'
|
32
|
-
|
33
|
-
|
34
|
-
[library]
|
35
|
-
template_dirs = typescript, javascript, common
|
36
|
-
filename = 'actionword_library.ts'
|
37
|
-
|
38
|
-
[libraries]
|
39
|
-
template_dirs = typescript, javascript, common
|
40
|
-
named_filename = '%s_library.ts'
|
41
|
-
filename_convention = 'underscore'
|
1
|
+
[_common]
|
2
|
+
indentation = ' '
|
3
|
+
fallback_template = 'empty'
|
4
|
+
|
5
|
+
[features]
|
6
|
+
node_name = folders
|
7
|
+
template_dirs = gherkin/inlined_uids, gherkin, common
|
8
|
+
named_filename = '%s.feature'
|
9
|
+
indentation = ' '
|
10
|
+
renderer_addons = 'GherkinAddon'
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = cucumber/typescript, javascript, common
|
15
|
+
filename = 'step_definitions.ts'
|
16
|
+
naming_convention = 'camelize_lower'
|
17
|
+
call_prefix = 'actionwords'
|
18
|
+
renderer_addons = 'GherkinAddon'
|
19
|
+
|
20
|
+
[step_definitions_library]
|
21
|
+
node_name = libraries
|
22
|
+
template_dirs = cucumber/typescript, javascript, common
|
23
|
+
named_filename = 'steps_%s.ts'
|
24
|
+
naming_convention = 'camelize_lower'
|
25
|
+
call_prefix = 'actionwords'
|
26
|
+
renderer_addons = 'GherkinAddon'
|
27
|
+
|
28
|
+
[actionwords]
|
29
|
+
template_dirs = typescript, javascript, common
|
30
|
+
filename = 'actionwords.ts'
|
31
|
+
naming_convention = 'camelize_lower'
|
32
|
+
|
33
|
+
|
34
|
+
[library]
|
35
|
+
template_dirs = typescript, javascript, common
|
36
|
+
filename = 'actionword_library.ts'
|
37
|
+
|
38
|
+
[libraries]
|
39
|
+
template_dirs = typescript, javascript, common
|
40
|
+
named_filename = '%s_library.ts'
|
41
|
+
filename_convention = 'underscore'
|
@@ -0,0 +1,40 @@
|
|
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_legacy/groovy/step-definitions, cucumber/groovy/step-definitions, groovy, java, common
|
19
|
+
filename = 'StepDefinitions.groovy'
|
20
|
+
call_prefix = 'actionwords'
|
21
|
+
renderer_addons = 'GherkinAddon'
|
22
|
+
|
23
|
+
[step_definitions_library]
|
24
|
+
node_name = libraries
|
25
|
+
call_prefix = 'actionwords'
|
26
|
+
template_dirs = cucumber_legacy/groovy/step-definitions, cucumber/groovy/step-definitions, groovy, java, common
|
27
|
+
named_filename = 'StepDefinitions%s.groovy'
|
28
|
+
renderer_addons = 'GherkinAddon'
|
29
|
+
|
30
|
+
[actionwords]
|
31
|
+
template_dirs = groovy, java, common
|
32
|
+
filename = 'Actionwords.groovy'
|
33
|
+
|
34
|
+
[library]
|
35
|
+
template_dirs = groovy, java, common
|
36
|
+
filename = 'ActionwordLibrary.groovy'
|
37
|
+
|
38
|
+
[libraries]
|
39
|
+
template_dirs = groovy, java, common
|
40
|
+
named_filename = '%sLibrary.groovy'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
[_common]
|
2
|
+
package = 'com.example'
|
3
|
+
indentation = ' '
|
4
|
+
fallback_template = 'empty'
|
5
|
+
|
6
|
+
[features]
|
7
|
+
node_name = folders
|
8
|
+
template_dirs = gherkin/inlined_uids, gherkin/java, gherkin, common
|
9
|
+
named_filename = '%s.feature'
|
10
|
+
indentation = ' '
|
11
|
+
renderer_addons = 'GherkinAddon'
|
12
|
+
|
13
|
+
[step_definitions]
|
14
|
+
node_name = actionwords
|
15
|
+
template_dirs = cucumber_legacy/java, cucumber/java, java, common
|
16
|
+
filename = 'StepDefinitions.java'
|
17
|
+
naming_convention = 'camelize_lower'
|
18
|
+
call_prefix = 'actionwords'
|
19
|
+
renderer_addons = 'GherkinAddon'
|
20
|
+
|
21
|
+
[actionwords]
|
22
|
+
template_dirs = cucumber_legacy/java/actionwords, cucumber/java/actionwords, java, common
|
23
|
+
filename = 'Actionwords.java'
|
24
|
+
naming_convention = 'camelize_lower'
|
@@ -1,41 +1,41 @@
|
|
1
|
-
[_common]
|
2
|
-
indentation = ' '
|
3
|
-
fallback_template = 'empty'
|
4
|
-
|
5
|
-
[features]
|
6
|
-
node_name = folders
|
7
|
-
template_dirs = gherkin/inlined_uids, gherkin, common
|
8
|
-
named_filename = '%s.feature'
|
9
|
-
indentation = ' '
|
10
|
-
renderer_addons = 'GherkinAddon'
|
11
|
-
|
12
|
-
[step_definitions]
|
13
|
-
node_name = actionwords
|
14
|
-
template_dirs =
|
15
|
-
filename = 'step_definitions.ts'
|
16
|
-
naming_convention = 'camelize_lower'
|
17
|
-
call_prefix = 'actionwords'
|
18
|
-
renderer_addons = 'GherkinAddon'
|
19
|
-
|
20
|
-
[step_definitions_library]
|
21
|
-
node_name = libraries
|
22
|
-
template_dirs =
|
23
|
-
named_filename = 'steps_%s.ts'
|
24
|
-
naming_convention = 'camelize_lower'
|
25
|
-
call_prefix = 'actionwords'
|
26
|
-
renderer_addons = 'GherkinAddon'
|
27
|
-
|
28
|
-
[actionwords]
|
29
|
-
template_dirs = typescript, javascript, common
|
30
|
-
filename = 'actionwords.ts'
|
31
|
-
naming_convention = 'camelize_lower'
|
32
|
-
|
33
|
-
|
34
|
-
[library]
|
35
|
-
template_dirs = typescript, javascript, common
|
36
|
-
filename = 'actionword_library.ts'
|
37
|
-
|
38
|
-
[libraries]
|
39
|
-
template_dirs = typescript, javascript, common
|
40
|
-
named_filename = '%s_library.ts'
|
41
|
-
filename_convention = 'underscore'
|
1
|
+
[_common]
|
2
|
+
indentation = ' '
|
3
|
+
fallback_template = 'empty'
|
4
|
+
|
5
|
+
[features]
|
6
|
+
node_name = folders
|
7
|
+
template_dirs = gherkin/inlined_uids, gherkin, common
|
8
|
+
named_filename = '%s.feature'
|
9
|
+
indentation = ' '
|
10
|
+
renderer_addons = 'GherkinAddon'
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = cucumber_legacy/typescript, cucumber/typescript, javascript, common
|
15
|
+
filename = 'step_definitions.ts'
|
16
|
+
naming_convention = 'camelize_lower'
|
17
|
+
call_prefix = 'actionwords'
|
18
|
+
renderer_addons = 'GherkinAddon'
|
19
|
+
|
20
|
+
[step_definitions_library]
|
21
|
+
node_name = libraries
|
22
|
+
template_dirs = cucumber_legacy/typescript, cucumber/typescript, javascript, common
|
23
|
+
named_filename = 'steps_%s.ts'
|
24
|
+
naming_convention = 'camelize_lower'
|
25
|
+
call_prefix = 'actionwords'
|
26
|
+
renderer_addons = 'GherkinAddon'
|
27
|
+
|
28
|
+
[actionwords]
|
29
|
+
template_dirs = typescript, javascript, common
|
30
|
+
filename = 'actionwords.ts'
|
31
|
+
naming_convention = 'camelize_lower'
|
32
|
+
|
33
|
+
|
34
|
+
[library]
|
35
|
+
template_dirs = typescript, javascript, common
|
36
|
+
filename = 'actionword_library.ts'
|
37
|
+
|
38
|
+
[libraries]
|
39
|
+
template_dirs = typescript, javascript, common
|
40
|
+
named_filename = '%s_library.ts'
|
41
|
+
filename_convention = 'underscore'
|
@@ -29,6 +29,7 @@ module Hiptest
|
|
29
29
|
if cli_options.push?
|
30
30
|
check_execution_environment
|
31
31
|
check_push_file
|
32
|
+
check_build_options
|
32
33
|
else
|
33
34
|
check_output_directory
|
34
35
|
check_actionwords_signature_file
|
@@ -213,6 +214,12 @@ module Hiptest
|
|
213
214
|
end
|
214
215
|
end
|
215
216
|
|
217
|
+
def check_build_options
|
218
|
+
if present?(cli_options.build_id) && present?(cli_options.build_name)
|
219
|
+
raise CliOptionError, I18n.t('errors.cli_options.multiple_build_options')
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
216
223
|
private
|
217
224
|
|
218
225
|
def numeric?(arg)
|