cucumber_analytics 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +7 -0
- data/README.rdoc +4 -0
- data/Rakefile +1 -1
- data/cucumber_analytics.gemspec +3 -1
- data/features/modeling/background_modeling.feature +27 -13
- data/features/modeling/background_output.feature +130 -0
- data/features/modeling/directory_modeling.feature +11 -6
- data/features/modeling/directory_output.feature +13 -0
- data/features/modeling/doc_string_modeling.feature +18 -11
- data/features/modeling/doc_string_output.feature +71 -0
- data/features/modeling/example_modeling.feature +30 -19
- data/features/modeling/example_output.feature +192 -0
- data/features/modeling/feature_file_modeling.feature +9 -4
- data/features/modeling/feature_file_output.feature +13 -0
- data/features/modeling/feature_modeling.feature +33 -20
- data/features/modeling/feature_output.feature +244 -0
- data/features/modeling/outline_modeling.feature +29 -16
- data/features/modeling/outline_output.feature +197 -0
- data/features/modeling/row_modeling.feature +9 -4
- data/features/modeling/row_output.feature +27 -0
- data/features/modeling/scenario_modeling.feature +27 -14
- data/features/modeling/scenario_output.feature +147 -0
- data/features/modeling/step_modeling.feature +13 -8
- data/features/modeling/step_output.feature +52 -0
- data/features/modeling/table_modeling.feature +9 -4
- data/features/modeling/table_output.feature +42 -0
- data/features/modeling/table_row_modeling.feature +9 -4
- data/features/modeling/table_row_output.feature +27 -0
- data/features/modeling/tag_modeling.feature +10 -5
- data/features/modeling/tag_output.feature +16 -0
- data/features/step_definitions/action_steps.rb +3 -0
- data/features/step_definitions/background_steps.rb +17 -4
- data/features/step_definitions/directory_steps.rb +11 -0
- data/features/step_definitions/doc_string_steps.rb +18 -15
- data/features/step_definitions/feature_file_steps.rb +12 -1
- data/features/step_definitions/feature_steps.rb +23 -6
- data/features/step_definitions/outline_steps.rb +70 -9
- data/features/step_definitions/step_steps.rb +9 -1
- data/features/step_definitions/table_steps.rb +35 -2
- data/features/step_definitions/tag_steps.rb +8 -0
- data/features/step_definitions/test_steps.rb +14 -3
- data/features/step_definitions/verification_steps.rb +9 -0
- data/features/support/env.rb +1 -0
- data/lib/cucumber_analytics/background.rb +12 -0
- data/lib/cucumber_analytics/directory.rb +5 -0
- data/lib/cucumber_analytics/doc_string.rb +22 -0
- data/lib/cucumber_analytics/example.rb +55 -0
- data/lib/cucumber_analytics/feature.rb +26 -0
- data/lib/cucumber_analytics/feature_element.rb +25 -1
- data/lib/cucumber_analytics/feature_file.rb +5 -0
- data/lib/cucumber_analytics/outline.rb +18 -0
- data/lib/cucumber_analytics/parsing.rb +3 -1
- data/lib/cucumber_analytics/row.rb +5 -0
- data/lib/cucumber_analytics/scenario.rb +13 -0
- data/lib/cucumber_analytics/step.rb +8 -0
- data/lib/cucumber_analytics/table.rb +21 -0
- data/lib/cucumber_analytics/table_row.rb +5 -0
- data/lib/cucumber_analytics/tag.rb +5 -0
- data/lib/cucumber_analytics/taggable.rb +4 -0
- data/lib/cucumber_analytics/test_element.rb +8 -0
- data/lib/cucumber_analytics/version.rb +1 -1
- data/spec/integration/background_integration_spec.rb +12 -0
- data/spec/integration/example_integration_spec.rb +21 -0
- data/spec/integration/feature_integration_spec.rb +29 -0
- data/spec/integration/outline_integration_spec.rb +22 -0
- data/spec/integration/scenario_integration_spec.rb +16 -0
- data/spec/integration/step_integration_spec.rb +20 -0
- data/spec/integration/table_integration_spec.rb +11 -0
- data/spec/unit/background_unit_spec.rb +28 -0
- data/spec/unit/directory_unit_spec.rb +12 -0
- data/spec/unit/doc_string_unit_spec.rb +43 -3
- data/spec/unit/example_unit_spec.rb +53 -0
- data/spec/unit/feature_element_unit_specs.rb +9 -2
- data/spec/unit/feature_file_unit_spec.rb +12 -0
- data/spec/unit/feature_unit_spec.rb +30 -0
- data/spec/unit/outline_unit_spec.rb +30 -0
- data/spec/unit/row_unit_spec.rb +19 -7
- data/spec/unit/scenario_unit_spec.rb +30 -0
- data/spec/unit/step_unit_spec.rb +25 -1
- data/spec/unit/table_row_unit_spec.rb +12 -0
- data/spec/unit/table_unit_spec.rb +25 -0
- data/spec/unit/tag_unit_spec.rb +12 -0
- metadata +165 -86
- checksums.yaml +0 -15
@@ -1,17 +1,19 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: Outline elements can be modeled.
|
2
2
|
|
3
3
|
|
4
4
|
Acceptance criteria
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
1. All conceptual pieces of an outline can be modeled:
|
7
|
+
- the outline's name
|
8
|
+
- the outline's description
|
9
|
+
- the outline's steps
|
10
|
+
- the outline's tags
|
11
|
+
- the outline's applied tags
|
12
|
+
- the outline's example blocks
|
13
|
+
- the outline's source line
|
14
|
+
- the outline's raw element
|
15
|
+
|
16
|
+
2. Outlines can be outputted in a convenient form
|
15
17
|
|
16
18
|
|
17
19
|
Background: Test file setup.
|
@@ -22,8 +24,11 @@ Feature: Scenario Outline elements can be modeled.
|
|
22
24
|
|
23
25
|
@outline_tag
|
24
26
|
Scenario Outline: The scenario outline's name.
|
25
|
-
|
26
|
-
|
27
|
+
|
28
|
+
Some outline description.
|
29
|
+
|
30
|
+
Some more.
|
31
|
+
Even more.
|
27
32
|
|
28
33
|
Given a <setup> step
|
29
34
|
When an action step
|
@@ -52,9 +57,14 @@ Feature: Scenario Outline elements can be modeled.
|
|
52
57
|
| name | The scenario outline's name. |
|
53
58
|
|
54
59
|
Scenario: The outline description is modeled.
|
55
|
-
Then the test
|
56
|
-
|
57
|
-
|
60
|
+
Then the test has the following description:
|
61
|
+
"""
|
62
|
+
|
63
|
+
Some outline description.
|
64
|
+
|
65
|
+
Some more.
|
66
|
+
Even more.
|
67
|
+
"""
|
58
68
|
|
59
69
|
Scenario: The outline steps are modeled.
|
60
70
|
Then the test steps are as follows:
|
@@ -75,8 +85,11 @@ Feature: Scenario Outline elements can be modeled.
|
|
75
85
|
| example 1 |
|
76
86
|
| example 2 |
|
77
87
|
|
88
|
+
Scenario: Convenient output of an an outline
|
89
|
+
Then the outline has convenient output
|
90
|
+
|
78
91
|
Scenario Outline: Outline models pass all other specifications
|
79
|
-
Exact specifications detailing the API for
|
92
|
+
Exact specifications detailing the API for outline models.
|
80
93
|
Given that there are "<additional specifications>" detailing models
|
81
94
|
When the corresponding specifications are run
|
82
95
|
Then all of those specifications are met
|
@@ -0,0 +1,197 @@
|
|
1
|
+
Feature: Outputting outline elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of an outline that does not have a name
|
8
|
+
Given an outline element based on the following gherkin:
|
9
|
+
"""
|
10
|
+
Scenario Outline:
|
11
|
+
"""
|
12
|
+
When it is outputted
|
13
|
+
Then the following text is provided:
|
14
|
+
"""
|
15
|
+
Scenario Outline:
|
16
|
+
"""
|
17
|
+
|
18
|
+
Scenario: Output of an outline that does have a name
|
19
|
+
Given an outline element based on the following gherkin:
|
20
|
+
"""
|
21
|
+
Scenario Outline: with a name
|
22
|
+
"""
|
23
|
+
When it is outputted
|
24
|
+
Then the following text is provided:
|
25
|
+
"""
|
26
|
+
Scenario Outline: with a name
|
27
|
+
"""
|
28
|
+
|
29
|
+
Scenario: Output of an outline that does have tags
|
30
|
+
Given an outline element based on the following gherkin:
|
31
|
+
"""
|
32
|
+
@tag1@tag2
|
33
|
+
@tag3
|
34
|
+
Scenario Outline:
|
35
|
+
"""
|
36
|
+
When it is outputted
|
37
|
+
Then the following text is provided:
|
38
|
+
"""
|
39
|
+
@tag1 @tag2 @tag3
|
40
|
+
Scenario Outline:
|
41
|
+
"""
|
42
|
+
|
43
|
+
Scenario: Output of an outline that has a description, no first line buffer
|
44
|
+
Given an outline element based on the following gherkin:
|
45
|
+
"""
|
46
|
+
Scenario Outline:
|
47
|
+
Some description.
|
48
|
+
Some more description.
|
49
|
+
"""
|
50
|
+
When it is outputted
|
51
|
+
Then the following text is provided:
|
52
|
+
"""
|
53
|
+
Scenario Outline:
|
54
|
+
|
55
|
+
Some description.
|
56
|
+
Some more description.
|
57
|
+
"""
|
58
|
+
|
59
|
+
Scenario: Output of an outline that has a description, first line is blank
|
60
|
+
Given an outline element based on the following gherkin:
|
61
|
+
"""
|
62
|
+
Scenario Outline:
|
63
|
+
|
64
|
+
Some description.
|
65
|
+
Some more description.
|
66
|
+
"""
|
67
|
+
When it is outputted
|
68
|
+
Then the following text is provided:
|
69
|
+
"""
|
70
|
+
Scenario Outline:
|
71
|
+
|
72
|
+
Some description.
|
73
|
+
Some more description.
|
74
|
+
"""
|
75
|
+
|
76
|
+
Scenario: Output of an outline that has a description, first line is only whitespace
|
77
|
+
Given an outline element based on the following gherkin:
|
78
|
+
"""
|
79
|
+
Scenario Outline:
|
80
|
+
|
81
|
+
Some description.
|
82
|
+
Some more description.
|
83
|
+
"""
|
84
|
+
When it is outputted
|
85
|
+
Then the following text is provided:
|
86
|
+
"""
|
87
|
+
Scenario Outline:
|
88
|
+
|
89
|
+
Some description.
|
90
|
+
Some more description.
|
91
|
+
"""
|
92
|
+
|
93
|
+
Scenario: Output of an outline that has steps
|
94
|
+
Given an outline element based on the following gherkin:
|
95
|
+
"""
|
96
|
+
Scenario Outline:
|
97
|
+
* a step
|
98
|
+
|value|
|
99
|
+
* another step
|
100
|
+
\"\"\"
|
101
|
+
some string
|
102
|
+
\"\"\"
|
103
|
+
"""
|
104
|
+
When it is outputted
|
105
|
+
Then the following text is provided:
|
106
|
+
"""
|
107
|
+
Scenario Outline:
|
108
|
+
* a step
|
109
|
+
| value |
|
110
|
+
* another step
|
111
|
+
\"\"\"
|
112
|
+
some string
|
113
|
+
\"\"\"
|
114
|
+
"""
|
115
|
+
|
116
|
+
Scenario: Output of an outline that has examples
|
117
|
+
Given an outline element based on the following gherkin:
|
118
|
+
"""
|
119
|
+
Scenario Outline:
|
120
|
+
* a <value> step
|
121
|
+
Examples:
|
122
|
+
| value |
|
123
|
+
| x |
|
124
|
+
@example_tag
|
125
|
+
Examples:
|
126
|
+
| value |
|
127
|
+
| y |
|
128
|
+
"""
|
129
|
+
When it is outputted
|
130
|
+
Then the following text is provided:
|
131
|
+
"""
|
132
|
+
Scenario Outline:
|
133
|
+
* a <value> step
|
134
|
+
|
135
|
+
Examples:
|
136
|
+
| value |
|
137
|
+
| x |
|
138
|
+
|
139
|
+
@example_tag
|
140
|
+
Examples:
|
141
|
+
| value |
|
142
|
+
| y |
|
143
|
+
"""
|
144
|
+
|
145
|
+
Scenario: Output of an outline that contains all possible parts
|
146
|
+
Given an outline element based on the following gherkin:
|
147
|
+
"""
|
148
|
+
@tag1@tag2
|
149
|
+
@tag3
|
150
|
+
Scenario Outline: An outline with everything it could have
|
151
|
+
Some description.
|
152
|
+
Some more description.
|
153
|
+
* a step
|
154
|
+
|value|
|
155
|
+
* a <value> step
|
156
|
+
\"\"\"
|
157
|
+
some string
|
158
|
+
\"\"\"
|
159
|
+
Examples:
|
160
|
+
Some description.
|
161
|
+
Some more description.
|
162
|
+
| value |
|
163
|
+
| x |
|
164
|
+
@example_tag
|
165
|
+
Examples:
|
166
|
+
| value |
|
167
|
+
| y |
|
168
|
+
"""
|
169
|
+
When it is outputted
|
170
|
+
Then the following text is provided:
|
171
|
+
"""
|
172
|
+
@tag1 @tag2 @tag3
|
173
|
+
Scenario Outline: An outline with everything it could have
|
174
|
+
|
175
|
+
Some description.
|
176
|
+
Some more description.
|
177
|
+
|
178
|
+
* a step
|
179
|
+
| value |
|
180
|
+
* a <value> step
|
181
|
+
\"\"\"
|
182
|
+
some string
|
183
|
+
\"\"\"
|
184
|
+
|
185
|
+
Examples:
|
186
|
+
|
187
|
+
Some description.
|
188
|
+
Some more description.
|
189
|
+
|
190
|
+
| value |
|
191
|
+
| x |
|
192
|
+
|
193
|
+
@example_tag
|
194
|
+
Examples:
|
195
|
+
| value |
|
196
|
+
| y |
|
197
|
+
"""
|
@@ -3,10 +3,12 @@ Feature: Row elements can be modeled.
|
|
3
3
|
|
4
4
|
Acceptance criteria
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
1. All conceptual pieces of a Row can be modeled:
|
7
|
+
- the row's source line
|
8
|
+
- the row's cells
|
9
|
+
- the row's raw element
|
10
|
+
|
11
|
+
2. Rows can be outputted in a convenient form
|
10
12
|
|
11
13
|
|
12
14
|
Background: Test file setup.
|
@@ -61,6 +63,9 @@ Feature: Row elements can be modeled.
|
|
61
63
|
And the test example block "2" row "2" cells are as follows:
|
62
64
|
| a |
|
63
65
|
|
66
|
+
Scenario: Convenient output of a row
|
67
|
+
Then the row has convenient output
|
68
|
+
|
64
69
|
Scenario Outline: Row models pass all other specifications
|
65
70
|
Exact specifications detailing the API for Row models.
|
66
71
|
Given that there are "<additional specifications>" detailing models
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Feature: Outputting row elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of a row that has one cell
|
8
|
+
Given a row element based on the following gherkin:
|
9
|
+
"""
|
10
|
+
|value|
|
11
|
+
"""
|
12
|
+
When it is outputted
|
13
|
+
Then the following text is provided:
|
14
|
+
"""
|
15
|
+
| value |
|
16
|
+
"""
|
17
|
+
|
18
|
+
Scenario: Output of a row that has multiple cells
|
19
|
+
Given a row element based on the following gherkin:
|
20
|
+
"""
|
21
|
+
|value|another_value|
|
22
|
+
"""
|
23
|
+
When it is outputted
|
24
|
+
Then the following text is provided:
|
25
|
+
"""
|
26
|
+
| value | another_value |
|
27
|
+
"""
|
@@ -3,14 +3,16 @@ Feature: Scenario elements can be modeled.
|
|
3
3
|
|
4
4
|
Acceptance criteria
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
1. All conceptual pieces of a scenario can be modeled:
|
7
|
+
- the scenario's name
|
8
|
+
- the scenario's description
|
9
|
+
- the scenario's steps
|
10
|
+
- the scenario's tags
|
11
|
+
- the scenario's applied tags
|
12
|
+
- the scenario's source line
|
13
|
+
- the scenario's raw element
|
14
|
+
|
15
|
+
2. Scenarios can be outputted in a convenient form
|
14
16
|
|
15
17
|
|
16
18
|
Background: Test file setup.
|
@@ -22,8 +24,11 @@ Feature: Scenario elements can be modeled.
|
|
22
24
|
@a_tag
|
23
25
|
@another_tag
|
24
26
|
Scenario:The first scenario's name.
|
25
|
-
|
26
|
-
|
27
|
+
|
28
|
+
Some scenario description.
|
29
|
+
|
30
|
+
Some more.
|
31
|
+
Even more.
|
27
32
|
|
28
33
|
Given a setup step
|
29
34
|
When an action step
|
@@ -45,9 +50,14 @@ Feature: Scenario elements can be modeled.
|
|
45
50
|
| name | The first scenario's name. |
|
46
51
|
|
47
52
|
Scenario: The scenario description is modeled.
|
48
|
-
Then the test
|
49
|
-
|
50
|
-
|
53
|
+
Then the test has the following description:
|
54
|
+
"""
|
55
|
+
|
56
|
+
Some scenario description.
|
57
|
+
|
58
|
+
Some more.
|
59
|
+
Even more.
|
60
|
+
"""
|
51
61
|
|
52
62
|
Scenario: The scenario steps are modeled.
|
53
63
|
Then the test steps are as follows:
|
@@ -64,8 +74,11 @@ Feature: Scenario elements can be modeled.
|
|
64
74
|
Then the test is found to have the following applied tags:
|
65
75
|
| @a_feature_level_tag |
|
66
76
|
|
77
|
+
Scenario: Convenient output of a scenario
|
78
|
+
Then the scenario has convenient output
|
79
|
+
|
67
80
|
Scenario Outline: Scenario models pass all other specifications
|
68
|
-
Exact specifications detailing the API for
|
81
|
+
Exact specifications detailing the API for scenario models.
|
69
82
|
Given that there are "<additional specifications>" detailing models
|
70
83
|
When the corresponding specifications are run
|
71
84
|
Then all of those specifications are met
|
@@ -0,0 +1,147 @@
|
|
1
|
+
Feature: Outputting scenario elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of a scenario that does not have a name
|
8
|
+
Given a scenario element based on the following gherkin:
|
9
|
+
"""
|
10
|
+
Scenario:
|
11
|
+
"""
|
12
|
+
When it is outputted
|
13
|
+
Then the following text is provided:
|
14
|
+
"""
|
15
|
+
Scenario:
|
16
|
+
"""
|
17
|
+
|
18
|
+
Scenario: Output of a scenario that does have a name
|
19
|
+
Given a scenario element based on the following gherkin:
|
20
|
+
"""
|
21
|
+
Scenario: with a name
|
22
|
+
"""
|
23
|
+
When it is outputted
|
24
|
+
Then the following text is provided:
|
25
|
+
"""
|
26
|
+
Scenario: with a name
|
27
|
+
"""
|
28
|
+
|
29
|
+
Scenario: Output of a scenario that has tags
|
30
|
+
Given a scenario element based on the following gherkin:
|
31
|
+
"""
|
32
|
+
@tag1@tag2
|
33
|
+
@tag3
|
34
|
+
Scenario:
|
35
|
+
"""
|
36
|
+
When it is outputted
|
37
|
+
Then the following text is provided:
|
38
|
+
"""
|
39
|
+
@tag1 @tag2 @tag3
|
40
|
+
Scenario:
|
41
|
+
"""
|
42
|
+
|
43
|
+
Scenario: Output of a scenario that has a description, no first line buffer
|
44
|
+
Given a scenario element based on the following gherkin:
|
45
|
+
"""
|
46
|
+
Scenario:
|
47
|
+
Some description.
|
48
|
+
Some more description.
|
49
|
+
"""
|
50
|
+
When it is outputted
|
51
|
+
Then the following text is provided:
|
52
|
+
"""
|
53
|
+
Scenario:
|
54
|
+
|
55
|
+
Some description.
|
56
|
+
Some more description.
|
57
|
+
"""
|
58
|
+
|
59
|
+
Scenario: Output of a scenario that has a description, first line is blank
|
60
|
+
Given a scenario element based on the following gherkin:
|
61
|
+
"""
|
62
|
+
Scenario:
|
63
|
+
|
64
|
+
Some description.
|
65
|
+
Some more description.
|
66
|
+
"""
|
67
|
+
When it is outputted
|
68
|
+
Then the following text is provided:
|
69
|
+
"""
|
70
|
+
Scenario:
|
71
|
+
|
72
|
+
Some description.
|
73
|
+
Some more description.
|
74
|
+
"""
|
75
|
+
|
76
|
+
Scenario: Output of a scenario that has a description, first line is only whitespace
|
77
|
+
Given a scenario element based on the following gherkin:
|
78
|
+
"""
|
79
|
+
Scenario:
|
80
|
+
|
81
|
+
Some description.
|
82
|
+
Some more description.
|
83
|
+
"""
|
84
|
+
When it is outputted
|
85
|
+
Then the following text is provided:
|
86
|
+
"""
|
87
|
+
Scenario:
|
88
|
+
|
89
|
+
Some description.
|
90
|
+
Some more description.
|
91
|
+
"""
|
92
|
+
|
93
|
+
Scenario: Output of a scenario that has steps
|
94
|
+
Given a scenario element based on the following gherkin:
|
95
|
+
"""
|
96
|
+
Scenario:
|
97
|
+
* a step
|
98
|
+
|value|
|
99
|
+
* another step
|
100
|
+
\"\"\"
|
101
|
+
some string
|
102
|
+
\"\"\"
|
103
|
+
"""
|
104
|
+
When it is outputted
|
105
|
+
Then the following text is provided:
|
106
|
+
"""
|
107
|
+
Scenario:
|
108
|
+
* a step
|
109
|
+
| value |
|
110
|
+
* another step
|
111
|
+
\"\"\"
|
112
|
+
some string
|
113
|
+
\"\"\"
|
114
|
+
"""
|
115
|
+
|
116
|
+
Scenario: Output of a scenario that contains all possible parts
|
117
|
+
Given a scenario element based on the following gherkin:
|
118
|
+
"""
|
119
|
+
@tag1@tag2
|
120
|
+
@tag3
|
121
|
+
Scenario: A scenario with everything it could have
|
122
|
+
Including a description
|
123
|
+
and then some.
|
124
|
+
|
125
|
+
* a step
|
126
|
+
|value|
|
127
|
+
* another step
|
128
|
+
\"\"\"
|
129
|
+
some string
|
130
|
+
\"\"\"
|
131
|
+
"""
|
132
|
+
When it is outputted
|
133
|
+
Then the following text is provided:
|
134
|
+
"""
|
135
|
+
@tag1 @tag2 @tag3
|
136
|
+
Scenario: A scenario with everything it could have
|
137
|
+
|
138
|
+
Including a description
|
139
|
+
and then some.
|
140
|
+
|
141
|
+
* a step
|
142
|
+
| value |
|
143
|
+
* another step
|
144
|
+
\"\"\"
|
145
|
+
some string
|
146
|
+
\"\"\"
|
147
|
+
"""
|