-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathstack_analysis_npm_direct_and_transitive.feature
163 lines (133 loc) · 7.06 KB
/
stack_analysis_npm_direct_and_transitive.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
Feature: Thorough stack analysis v3 API tests for Node ecosystem
@requires_authorization_token
Scenario: Check the stack analysis response for the Node project with 50 direct and 799 transitive dependencies
Given System is running
Given Three scale preview service is running
When I acquire the use_key for 3scale
Then I should get the proper user_key
# request the stack analysis
When I wait 10 seconds
When I test Node dependencies file npm_50_direct_799_tr.json for stack analysis from vscode through 3scale gateway with user_key
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 to finish with user_key
Then I should get 200 status code
And I should receive a valid JSON response
# SLA/SLO-related checks
When I look at the stack analysis duration
Then I should see that the duration is less than 50 seconds
# 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
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 1 dependencies
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 1 analyzed dependencies
# Analyzed CVE(s) part
When I look at recent stack analysis
Then I should find the security node for all dependencies
And I should find the security node for all alternate components
And I should find a recommended version when a CVE is found
@requires_authorization_token
Scenario: Check the stack analysis response for the Node project with 100 direct and 1039 transitive dependencies
Given System is running
Given Three scale preview service is running
When I acquire the use_key for 3scale
Then I should get the proper user_key
# request the stack analysis
When I wait 10 seconds
When I test Node dependencies file npm_100_direct_1039_tr.json for stack analysis from vscode through 3scale gateway with user_key
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 to finish with user_key
Then I should get 200 status code
And I should receive a valid JSON response
# SLA/SLO-related checks
When I look at the stack analysis duration
Then I should see that the duration is less than 180 second
# 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
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 1 dependencies
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 1 analyzed dependencies
# Analyzed CVE(s) part
When I look at recent stack analysis
Then I should find the security node for all dependencies
And I should find the security node for all alternate components
And I should find a recommended version when a CVE is found
@requires_authorization_token
Scenario: Check the stack analysis response for the Node project with 150 direct and 1170 transitive dependencies
Given System is running
Given Three scale preview service is running
When I acquire the use_key for 3scale
Then I should get the proper user_key
# request the stack analysis
When I wait 10 seconds
When I test Node dependencies file npm_150_direct_1170_tr.json for stack analysis from vscode through 3scale gateway with user_key
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 to finish with user_key
Then I should get 200 status code
And I should receive a valid JSON response
# SLA/SLO-related checks
When I look at the stack analysis duration
Then I should see that the duration is less than 120 second
# 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
# Dependencies checks
When I look at recent stack analysis
Then I should find at least 1 dependencies
# Analyzed dependencies checks
When I look at recent stack analysis
Then I should find at least 1 analyzed dependencies
# Analyzed CVE(s) part
When I look at recent stack analysis
Then I should find the security node for all dependencies
And I should find the security node for all alternate components
And I should find a recommended version when a CVE is found