Skip to content

Commit e05a014

Browse files
Naveen KhuntetaNaveen Khunteta
Naveen Khunteta
authored and
Naveen Khunteta
committed
added code for hooks and tagged hooks
1 parent d6a1995 commit e05a014

16 files changed

+899
-139
lines changed

Json_Output/cucumber.json

+319-17
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,342 @@
11
[
22
{
3-
"line": 2,
3+
"line": 1,
44
"elements": [
55
{
6-
"line": 72,
7-
"name": "browser closed",
6+
"before": [
7+
{
8+
"result": {
9+
"duration": 259317,
10+
"status": "passed"
11+
},
12+
"match": {
13+
"location": "TaggedHooksStepDefinition.setUP()"
14+
}
15+
},
16+
{
17+
"result": {
18+
"duration": 133065,
19+
"status": "passed"
20+
},
21+
"match": {
22+
"location": "TaggedHooksStepDefinition.setUP1()"
23+
}
24+
},
25+
{
26+
"result": {
27+
"duration": 135775,
28+
"status": "passed"
29+
},
30+
"match": {
31+
"location": "TaggedHooksStepDefinition.beforeFirst()"
32+
}
33+
}
34+
],
35+
"line": 4,
36+
"name": "This is First test",
37+
"description": "",
38+
"id": "test-tagged-hooks;this-is-first-test",
39+
"after": [
40+
{
41+
"result": {
42+
"duration": 54473,
43+
"status": "passed"
44+
},
45+
"match": {
46+
"location": "TaggedHooksStepDefinition.afterFirst()"
47+
}
48+
},
49+
{
50+
"result": {
51+
"duration": 44919,
52+
"status": "passed"
53+
},
54+
"match": {
55+
"location": "TaggedHooksStepDefinition.tearDown1()"
56+
}
57+
},
58+
{
59+
"result": {
60+
"duration": 81175,
61+
"status": "passed"
62+
},
63+
"match": {
64+
"location": "TaggedHooksStepDefinition.tearDown()"
65+
}
66+
}
67+
],
68+
"type": "scenario",
69+
"keyword": "Scenario",
70+
"steps": [
71+
{
72+
"result": {
73+
"duration": 85898436,
74+
"status": "passed"
75+
},
76+
"line": 5,
77+
"name": "this is the first step",
78+
"match": {
79+
"location": "TaggedHooksStepDefinition.this_is_the_first_step()"
80+
},
81+
"keyword": "Given "
82+
},
83+
{
84+
"result": {
85+
"duration": 98039,
86+
"status": "passed"
87+
},
88+
"line": 6,
89+
"name": "this is the second step",
90+
"match": {
91+
"location": "TaggedHooksStepDefinition.this_is_the_second_step()"
92+
},
93+
"keyword": "When "
94+
},
95+
{
96+
"result": {
97+
"duration": 84479,
98+
"status": "passed"
99+
},
100+
"line": 7,
101+
"name": "this is the third step",
102+
"match": {
103+
"location": "TaggedHooksStepDefinition.this_is_the_third_step()"
104+
},
105+
"keyword": "Then "
106+
}
107+
],
108+
"tags": [
109+
{
110+
"line": 3,
111+
"name": "@First"
112+
}
113+
]
114+
},
115+
{
116+
"before": [
117+
{
118+
"result": {
119+
"duration": 112120,
120+
"status": "passed"
121+
},
122+
"match": {
123+
"location": "TaggedHooksStepDefinition.setUP()"
124+
}
125+
},
126+
{
127+
"result": {
128+
"duration": 82098,
129+
"status": "passed"
130+
},
131+
"match": {
132+
"location": "TaggedHooksStepDefinition.setUP1()"
133+
}
134+
},
135+
{
136+
"result": {
137+
"duration": 76810,
138+
"status": "passed"
139+
},
140+
"match": {
141+
"location": "TaggedHooksStepDefinition.beforeSecond()"
142+
}
143+
}
144+
],
145+
"line": 10,
146+
"name": "This is Second test",
147+
"description": "",
148+
"id": "test-tagged-hooks;this-is-second-test",
149+
"after": [
150+
{
151+
"result": {
152+
"duration": 92284,
153+
"status": "passed"
154+
},
155+
"match": {
156+
"location": "TaggedHooksStepDefinition.afterSecond()"
157+
}
158+
},
159+
{
160+
"result": {
161+
"duration": 140453,
162+
"status": "passed"
163+
},
164+
"match": {
165+
"location": "TaggedHooksStepDefinition.tearDown1()"
166+
}
167+
},
168+
{
169+
"result": {
170+
"duration": 66290,
171+
"status": "passed"
172+
},
173+
"match": {
174+
"location": "TaggedHooksStepDefinition.tearDown()"
175+
}
176+
}
177+
],
178+
"type": "scenario",
179+
"keyword": "Scenario",
180+
"steps": [
181+
{
182+
"result": {
183+
"duration": 127029,
184+
"status": "passed"
185+
},
186+
"line": 11,
187+
"name": "this is the first step",
188+
"match": {
189+
"location": "TaggedHooksStepDefinition.this_is_the_first_step()"
190+
},
191+
"keyword": "Given "
192+
},
193+
{
194+
"result": {
195+
"duration": 88211,
196+
"status": "passed"
197+
},
198+
"line": 12,
199+
"name": "this is the second step",
200+
"match": {
201+
"location": "TaggedHooksStepDefinition.this_is_the_second_step()"
202+
},
203+
"keyword": "When "
204+
},
205+
{
206+
"result": {
207+
"duration": 88937,
208+
"status": "passed"
209+
},
210+
"line": 13,
211+
"name": "this is the third step",
212+
"match": {
213+
"location": "TaggedHooksStepDefinition.this_is_the_third_step()"
214+
},
215+
"keyword": "Then "
216+
}
217+
],
218+
"tags": [
219+
{
220+
"line": 9,
221+
"name": "@Second"
222+
}
223+
]
224+
},
225+
{
226+
"before": [
227+
{
228+
"result": {
229+
"duration": 120620,
230+
"status": "passed"
231+
},
232+
"match": {
233+
"location": "TaggedHooksStepDefinition.setUP()"
234+
}
235+
},
236+
{
237+
"result": {
238+
"duration": 76143,
239+
"status": "passed"
240+
},
241+
"match": {
242+
"location": "TaggedHooksStepDefinition.setUP1()"
243+
}
244+
},
245+
{
246+
"result": {
247+
"duration": 67536,
248+
"status": "passed"
249+
},
250+
"match": {
251+
"location": "TaggedHooksStepDefinition.beforeThird()"
252+
}
253+
}
254+
],
255+
"line": 16,
256+
"name": "This is Third test",
8257
"description": "",
9-
"id": "free-crm-application-testing;browser-closed",
258+
"id": "test-tagged-hooks;this-is-third-test",
259+
"after": [
260+
{
261+
"result": {
262+
"duration": 74866,
263+
"status": "passed"
264+
},
265+
"match": {
266+
"location": "TaggedHooksStepDefinition.afterThird()"
267+
}
268+
},
269+
{
270+
"result": {
271+
"duration": 67355,
272+
"status": "passed"
273+
},
274+
"match": {
275+
"location": "TaggedHooksStepDefinition.tearDown1()"
276+
}
277+
},
278+
{
279+
"result": {
280+
"duration": 66706,
281+
"status": "passed"
282+
},
283+
"match": {
284+
"location": "TaggedHooksStepDefinition.tearDown()"
285+
}
286+
}
287+
],
10288
"type": "scenario",
11289
"keyword": "Scenario",
12290
"steps": [
13291
{
14292
"result": {
15-
"duration": 97996556,
293+
"duration": 69572,
16294
"status": "passed"
17295
},
18-
"line": 73,
19-
"name": "This is a close broswer test",
296+
"line": 17,
297+
"name": "this is the first step",
20298
"match": {
21-
"location": "TaggingStepDefinition.this_is_a_close_broswer_test()"
299+
"location": "TaggedHooksStepDefinition.this_is_the_first_step()"
22300
},
23301
"keyword": "Given "
302+
},
303+
{
304+
"result": {
305+
"duration": 72834,
306+
"status": "passed"
307+
},
308+
"line": 18,
309+
"name": "this is the second step",
310+
"match": {
311+
"location": "TaggedHooksStepDefinition.this_is_the_second_step()"
312+
},
313+
"keyword": "When "
314+
},
315+
{
316+
"result": {
317+
"duration": 71562,
318+
"status": "passed"
319+
},
320+
"line": 19,
321+
"name": "this is the third step",
322+
"match": {
323+
"location": "TaggedHooksStepDefinition.this_is_the_third_step()"
324+
},
325+
"keyword": "Then "
326+
}
327+
],
328+
"tags": [
329+
{
330+
"line": 15,
331+
"name": "@Third"
24332
}
25333
]
26334
}
27335
],
28-
"name": "Free CRM application testing",
336+
"name": "Test Tagged Hooks",
29337
"description": "",
30-
"id": "free-crm-application-testing",
338+
"id": "test-tagged-hooks",
31339
"keyword": "Feature",
32-
"uri": "/Users/NaveenKhunteta/Documents/workspace/FreeCrmBDDFramework/src/main/java/Features/tagging.feature",
33-
"tags": [
34-
{
35-
"line": 1,
36-
"name": "@FunctionalTest"
37-
}
38-
]
340+
"uri": "/Users/NaveenKhunteta/Documents/workspace/FreeCrmBDDFramework/src/main/java/Features/taggedhooks.feature"
39341
}
40342
]

junit_xml/cucumber.xml

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
<?xml version="1.0" encoding="UTF-8"?><testsuite failures="0" name="cucumber.runtime.formatter.JUnitFormatter" skipped="0" tests="1" time="0.097997">
2-
<testcase classname="Free CRM application testing" name="browser closed" time="0.097997">
3-
<system-out><![CDATA[Given This is a close broswer test..........................................passed
1+
<?xml version="1.0" encoding="UTF-8"?><testsuite failures="0" name="cucumber.runtime.formatter.JUnitFormatter" skipped="0" tests="3" time="0.088351">
2+
<testcase classname="Test Tagged Hooks" name="This is First test" time="0.08679">
3+
<system-out><![CDATA[Given this is the first step................................................passed
4+
When this is the second step................................................passed
5+
Then this is the third step.................................................passed
6+
]]></system-out>
7+
</testcase>
8+
<testcase classname="Test Tagged Hooks" name="This is Second test" time="0.000874">
9+
<system-out><![CDATA[Given this is the first step................................................passed
10+
When this is the second step................................................passed
11+
Then this is the third step.................................................passed
12+
]]></system-out>
13+
</testcase>
14+
<testcase classname="Test Tagged Hooks" name="This is Third test" time="0.000687">
15+
<system-out><![CDATA[Given this is the first step................................................passed
16+
When this is the second step................................................passed
17+
Then this is the third step.................................................passed
418
]]></system-out>
519
</testcase>
620
</testsuite>

0 commit comments

Comments
 (0)