-
Notifications
You must be signed in to change notification settings - Fork 42
/
stack_analyses_npm_ecosystem.feature
167 lines (139 loc) · 8.56 KB
/
stack_analyses_npm_ecosystem.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
Feature: Thorough stack analysis v3 API tests - NPM ecosystem
@skip
Scenario: Check that the API entry point requires authorization token
Given System is running
When I send NPM package manifest package.json to stack analysis version 3 without authorization token
Then I should get 401 status code
@requires_authorization_token @data-sanity @skip
Scenario: Check the stack analysis response when called with proper authorization token
Given System is running
When I acquire the authorization token
Then I should get the proper authorization token
# request the stack analysis
When I send NPM package manifest package.json to stack analysis version 3 with authorization token
Then I should get 200 status code
And I should receive a valid JSON response
And I should receive JSON response containing the status key
And I should receive JSON response containing the id key
And I should receive JSON response containing the submitted_at key
And I should receive JSON response with the status key set to success
And I should receive JSON response with the correct id
And I should receive JSON response with the correct timestamp in attribute submitted_at
# wait for response from stack analysis
When I wait for stack analysis version 3 to finish with authorization token
Then I should get 200 status code
# Timestamp checks
When I look at recent stack analysis
Then I should receive JSON response containing the started_at key
And I should receive JSON response containing the finished_at key
And I should receive JSON response with the correct timestamp in attribute started_at
And I should receive JSON response with the correct timestamp in attribute finished_at
# Request ID check
When I look at recent stack analysis
Then I should receive JSON response containing the request_id key
And I should find the attribute request_id equals to id returned by stack analysis request
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 4 dependencies
And I should find the following dependencies (lodash, moment, request, underscore) in the stack analysis
And I should find dependency named lodash with version 4.17.11 in the stack analysis
And I should find dependency named moment with version 2.24.0 in the stack analysis
And I should find dependency named request with version 2.88.0 in the stack analysis
And I should find dependency named underscore with version 1.8.1 in the stack analysis
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 4 analyzed dependencies
And I should find the following analyzed dependencies (lodash, moment, request, underscore) in the stack analysis
And I should find analyzed dependency named lodash with version 4.17.11 in the stack analysis
And I should find analyzed dependency named moment with version 2.24.0 in the stack analysis
And I should find analyzed dependency named request with version 2.88.0 in the stack analysis
And I should find analyzed dependency named underscore with version 1.8.1 in the stack analysis
# Unknown dependencies checks
When I look at recent stack analysis
Then I should find no more than 0 unknown dependencies
@requires_authorization_token @data-sanity @skip
Scenario: Check the stack analysis response when called with proper authorization token
Given System is running
When I acquire the authorization token
Then I should get the proper authorization token
# request the stack analysis
When I send NPM package manifest wisp-minified.json to stack analysis version 3 with authorization token
Then I should get 200 status code
And I should receive a valid JSON response
And I should receive JSON response containing the status key
And I should receive JSON response containing the id key
And I should receive JSON response containing the submitted_at key
And I should receive JSON response with the status key set to success
And I should receive JSON response with the correct id
And I should receive JSON response with the correct timestamp in attribute submitted_at
# wait for response from stack analysis
When I wait for stack analysis version 3 to finish with authorization token
Then I should get 200 status code
# Timestamp checks
When I look at recent stack analysis
Then I should receive JSON response containing the started_at key
And I should receive JSON response containing the finished_at key
And I should receive JSON response with the correct timestamp in attribute started_at
And I should receive JSON response with the correct timestamp in attribute finished_at
# Request ID check
When I look at recent stack analysis
Then I should receive JSON response containing the request_id key
And I should find the attribute request_id equals to id returned by stack analysis request
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 2 dependencies
And I should find the following dependencies (base64-encode, commander) in the stack analysis
And I should find dependency named base64-encode with version 1.0.1 in the stack analysis
And I should find dependency named commander with version 5.1.0 in the stack analysis
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 2 analyzed dependencies
And I should find the following analyzed dependencies (base64-encode, commander) in the stack analysis
And I should find analyzed dependency named base64-encode with version 1.0.1 in the stack analysis
And I should find analyzed dependency named commander with version 5.1.0 in the stack analysis
# Unknown dependencies checks
When I look at recent stack analysis
Then I should find no more than 0 unknown dependencies
@requires_authorization_token @data-sanity @skip
Scenario: Check the stack analysis response when called with proper authorization token
Given System is running
When I acquire the authorization token
Then I should get the proper authorization token
# request the stack analysis
When I send NPM package manifest wisp-prettyprinted.json to stack analysis version 3 with authorization token
Then I should get 200 status code
And I should receive a valid JSON response
And I should receive JSON response containing the status key
And I should receive JSON response containing the id key
And I should receive JSON response containing the submitted_at key
And I should receive JSON response with the status key set to success
And I should receive JSON response with the correct id
And I should receive JSON response with the correct timestamp in attribute submitted_at
# wait for response from stack analysis
When I wait for stack analysis version 3 to finish with authorization token
Then I should get 200 status code
# Timestamp checks
When I look at recent stack analysis
Then I should receive JSON response containing the started_at key
And I should receive JSON response containing the finished_at key
And I should receive JSON response with the correct timestamp in attribute started_at
And I should receive JSON response with the correct timestamp in attribute finished_at
# Request ID check
When I look at recent stack analysis
Then I should receive JSON response containing the request_id key
And I should find the attribute request_id equals to id returned by stack analysis request
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 2 dependencies
And I should find the following dependencies (base64-encode, commander) in the stack analysis
And I should find dependency named base64-encode with version 1.0.1 in the stack analysis
And I should find dependency named commander with version 5.1.0 in the stack analysis
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 2 analyzed dependencies
And I should find the following analyzed dependencies (base64-encode, commander) in the stack analysis
And I should find analyzed dependency named base64-encode with version 1.0.1 in the stack analysis
And I should find analyzed dependency named commander with version 5.1.0 in the stack analysis
# Unknown dependencies checks
When I look at recent stack analysis
Then I should find no more than 0 unknown dependencies