hiptest-publisher 0.9.10 → 0.10.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 +2 -0
- data/lib/config/behat.conf +24 -0
- data/lib/config/behave.conf +22 -0
- data/lib/config/python-unittest.conf +1 -1
- data/lib/config/specflow.conf +1 -1
- data/lib/hiptest-publisher.rb +4 -2
- data/lib/hiptest-publisher/gherkin_adder.rb +5 -0
- data/lib/hiptest-publisher/handlebars_helper.rb +4 -0
- data/lib/hiptest-publisher/options_parser.rb +2 -1
- data/lib/hiptest-publisher/utils.rb +0 -1
- data/lib/templates/behat/actionword.hbs +8 -0
- data/lib/templates/behat/actionwords.hbs +16 -0
- data/lib/templates/behave/actionword.hbs +4 -0
- data/lib/templates/behave/actionwords.hbs +12 -0
- data/lib/templates/python/actionwords.hbs +4 -4
- data/lib/templates/python/unittest/actionwords.hbs +9 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2557080821316b37b07952f6e188ba212447b9c
|
4
|
+
data.tar.gz: 1370776bc7631858d96cfefc309189a9c2e9ea40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0062913fceeb60b6589c6a2236425318a15ff0112215c9597cdaf4af966806115a854563864a1a5a42c1735749489fea19c23c3273ea36a75e975c2d69d817ed
|
7
|
+
data.tar.gz: 84eacad9db2fb793c52fb7ca78cb217e4acb0523a9f9352bd04480de5815b3d0caf59504aeff5a08d7b8df1160a276ba3a36f86d674977cbb4460b793558c56f
|
data/README.md
CHANGED
@@ -143,6 +143,8 @@ You can push multiple files at once (using wildcard) but in that case, do not fo
|
|
143
143
|
|
144
144
|
hiptest-publisher --config-file=<path to your config file> --push="reports/*.xml"
|
145
145
|
|
146
|
+
The number of imported test results will be displayed. For debugging purposes, you can display imported tests individually with the `--verbose` option.
|
147
|
+
|
146
148
|
Development
|
147
149
|
-----------
|
148
150
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
[_common]
|
2
|
+
indentation = ' '
|
3
|
+
fallback_template = 'empty'
|
4
|
+
|
5
|
+
[features]
|
6
|
+
indentation = ' '
|
7
|
+
node_name = folders
|
8
|
+
template_dirs = gherkin, common
|
9
|
+
named_filename = '%s.feature'
|
10
|
+
filename_convention = 'underscore'
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = behat, php, common
|
15
|
+
filename = 'FeatureContext.php'
|
16
|
+
naming_convention = 'camelize'
|
17
|
+
call_prefix = 'self.actionwords'
|
18
|
+
|
19
|
+
[actionwords]
|
20
|
+
template_dirs = php, common
|
21
|
+
filename = 'Actionwords.php'
|
22
|
+
naming_convention = 'camel_case'
|
23
|
+
call_prefix = '$this'
|
24
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[_common]
|
2
|
+
indentation = ' '
|
3
|
+
fallback_template = 'empty'
|
4
|
+
|
5
|
+
[features]
|
6
|
+
indentation = ' '
|
7
|
+
node_name = folders
|
8
|
+
template_dirs = gherkin, common
|
9
|
+
named_filename = '%s.feature'
|
10
|
+
filename_convention = 'underscore'
|
11
|
+
|
12
|
+
[step_definitions]
|
13
|
+
node_name = actionwords
|
14
|
+
template_dirs = behave, python, common
|
15
|
+
filename = 'steps.py'
|
16
|
+
naming_convention = 'underscore'
|
17
|
+
call_prefix = 'self.actionwords'
|
18
|
+
|
19
|
+
[actionwords]
|
20
|
+
template_dirs = python, common
|
21
|
+
filename = 'actionwords.py'
|
22
|
+
naming_convention = 'underscore'
|
data/lib/config/specflow.conf
CHANGED
data/lib/hiptest-publisher.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'colorize'
|
2
|
+
require 'json'
|
2
3
|
require 'yaml'
|
3
4
|
|
4
5
|
require 'hiptest-publisher/formatters/reporter'
|
@@ -268,10 +269,11 @@ module Hiptest
|
|
268
269
|
with_status_message "Posting #{@cli_options.push} to #{@cli_options.site}" do
|
269
270
|
response = push_results(@cli_options)
|
270
271
|
end
|
271
|
-
|
272
|
+
passed_count = JSON.parse(response.body)['test_import'].size
|
273
|
+
with_status_message "#{pluralize(passed_count, "test")} imported" do
|
272
274
|
if @cli_options.verbose
|
273
275
|
JSON.parse(response.body)['test_import'].each do |imported_test|
|
274
|
-
|
276
|
+
puts " Test '#{imported_test['name']}' imported"
|
275
277
|
end
|
276
278
|
end
|
277
279
|
end
|
@@ -27,6 +27,7 @@ module Hiptest
|
|
27
27
|
|
28
28
|
@annotations_counter.actionwords.each do |actionword|
|
29
29
|
actionword.children[:gherkin_annotation] = @annotations_counter.most_used_annotation(actionword) || "Given"
|
30
|
+
actionword.children[:gherkin_used_annotations] = @annotations_counter.all_used_annotations(actionword) || ['Given']
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -159,5 +160,9 @@ module Hiptest
|
|
159
160
|
max = @counts_by_actionword[actionword].values.max
|
160
161
|
@counts_by_actionword[actionword].key(max)
|
161
162
|
end
|
163
|
+
|
164
|
+
def all_used_annotations(actionword)
|
165
|
+
@counts_by_actionword[actionword].keys
|
166
|
+
end
|
162
167
|
end
|
163
168
|
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{{#if rendered_children.gherkin_annotation }}
|
2
|
+
/**
|
3
|
+
* @{{{ rendered_children.gherkin_annotation }}} /{{{ rendered_children.gherkin_pattern }}}/
|
4
|
+
*/
|
5
|
+
public function {{{ camelize_lower rendered_children.name }}}({{#if has_parameters?}}{{{ join rendered_children.parameters ', '}}}{{/if}}){{#curly}}{{#indent}}
|
6
|
+
$this->actionwords->{{{ camelize_lower rendered_children.name }}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}${{{underscore this}}}{{/join}}{{/if}});
|
7
|
+
{{/indent}}
|
8
|
+
{{/curly}}{{/if}}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?php
|
2
|
+
use Behat\Behat\Tester\Exception\PendingException;
|
3
|
+
use Behat\Behat\Context\SnippetAcceptingContext;
|
4
|
+
use Behat\Gherkin\Node\PyStringNode;
|
5
|
+
use Behat\Gherkin\Node\TableNode;
|
6
|
+
|
7
|
+
require_once('Actionwords.php');
|
8
|
+
|
9
|
+
class FeatureContext implements SnippetAcceptingContext {{#curly}}{{#indent}}
|
10
|
+
public function __construct() {{#curly}}{{#indent}}
|
11
|
+
$this->actionwords = new Actionwords();{{/indent}}
|
12
|
+
{{/curly}}
|
13
|
+
{{#each rendered_children.actionwords}}
|
14
|
+
{{{this}}}{{/each}}{{/indent}}
|
15
|
+
{{/curly}}
|
16
|
+
?>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{{#if rendered_children.gherkin_used_annotations}}
|
2
|
+
{{#each rendered_children.gherkin_used_annotations}}@{{{downcase this }}}(r'{{{ strip_regexp_delimiters rendered_children.gherkin_pattern }}}')
|
3
|
+
{{/each}}def impl(context{{#if has_parameters?}}, {{{ join rendered_children.parameters ', '}}}{{/if}}):{{#indent}}
|
4
|
+
context.actionwords.{{{ underscore rendered_children.name }}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{underscore this}}}{{/join}}{{/if}}){{/indent}}{{/if}}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from behave import *
|
2
|
+
|
3
|
+
# This should be added to environments.py
|
4
|
+
# from steps.actionwords import Actionwords
|
5
|
+
#
|
6
|
+
# def before_scenario(context, scenario):
|
7
|
+
# context.actionwords = Actionwords.new(nil)
|
8
|
+
|
9
|
+
use_step_matcher('re')
|
10
|
+
{{#each rendered_children.actionwords}}
|
11
|
+
{{{this}}}
|
12
|
+
{{/each}}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
class Actionwords:
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
class Actionwords:{{#indent}}
|
4
|
+
def __init__(self):{{#indent}}
|
5
|
+
pass{{/indent}}
|
6
|
+
|
7
7
|
{{#each rendered_children.actionwords}}{{{this}}}
|
8
8
|
{{/each}}
|
9
9
|
{{/indent}}
|
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.10.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: 2016-02-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -239,6 +239,8 @@ extra_rdoc_files:
|
|
239
239
|
files:
|
240
240
|
- README.md
|
241
241
|
- bin/hiptest-publisher
|
242
|
+
- lib/config/behat.conf
|
243
|
+
- lib/config/behave.conf
|
242
244
|
- lib/config/csharp-nunit.conf
|
243
245
|
- lib/config/cucumber-java.conf
|
244
246
|
- lib/config/cucumber-ruby.conf
|
@@ -276,6 +278,10 @@ files:
|
|
276
278
|
- lib/hiptest-publisher/string.rb
|
277
279
|
- lib/hiptest-publisher/utils.rb
|
278
280
|
- lib/hiptest-publisher/xml_parser.rb
|
281
|
+
- lib/templates/behat/actionword.hbs
|
282
|
+
- lib/templates/behat/actionwords.hbs
|
283
|
+
- lib/templates/behave/actionword.hbs
|
284
|
+
- lib/templates/behave/actionwords.hbs
|
279
285
|
- lib/templates/common/booleanliteral.hbs
|
280
286
|
- lib/templates/common/dataset.hbs
|
281
287
|
- lib/templates/common/datatable.hbs
|
@@ -486,6 +492,7 @@ files:
|
|
486
492
|
- lib/templates/python/test.hbs
|
487
493
|
- lib/templates/python/tests.hbs
|
488
494
|
- lib/templates/python/unaryexpression.hbs
|
495
|
+
- lib/templates/python/unittest/actionwords.hbs
|
489
496
|
- lib/templates/python/while.hbs
|
490
497
|
- lib/templates/robotframework/_keyword.hbs
|
491
498
|
- lib/templates/robotframework/_keyword_body.hbs
|