forked from MoonStorm/FastCrud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrud.feature
294 lines (277 loc) · 16.7 KB
/
Crud.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
Feature: CRUD tests
@InMemoryDatabase
Scenario Outline: Batch update (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I batch update a maximum of <max> <entity type> entities skipping <skip> and using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | skip | max | method type |
| LocalDb | employee | 10 | 3 | 2 | synchronous |
| LocalDb | employee | 10 | 3 | 2 | asynchronous |
| SqLite | workstation | 10 | 3 | 2 | synchronous |
| SqLite | workstation | 10 | 3 | 2 | asynchronous |
@ExternalDatabase
Scenario Outline: Batch update (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I batch update a maximum of <max> <entity type> entities skipping <skip> and using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | skip | max | method type |
| PostgreSql | employee | 10 | 3 | 2 | synchronous |
| PostgreSql | employee | 10 | 3 | 2 | asynchronous |
| MySql | employee | 10 | 3 | 2 | synchronous |
| MySql | employee | 10 | 3 | 2 | asynchronous |
@InMemoryDatabase
Scenario Outline: Batch delete (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I batch delete a maximum of <max> <entity type> entities skipping <skip> and using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | skip | max | method type |
| LocalDb | workstation | 10 | 3 | 2 | synchronous |
| LocalDb | workstation | 10 | 3 | 2 | asynchronous |
| SqLite | workstation | 10 | 3 | 2 | synchronous |
| SqLite | workstation | 10 | 3 | 2 | asynchronous |
@ExternalDatabase
Scenario Outline: Batch delete (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I batch delete a maximum of <max> <entity type> entities skipping <skip> and using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | skip | max | method type |
| PostgreSql | workstation | 10 | 3 | 2 | synchronous |
| PostgreSql | workstation | 10 | 3 | 2 | asynchronous |
| MySql | workstation | 10 | 3 | 2 | synchronous |
| MySql | workstation | 10 | 3 | 2 | asynchronous |
@InMemoryDatabase
Scenario Outline: Insert and select all (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
And I query for the count of all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
And the database count of the queried entities should be <entity count>
Examples:
| database type | entity type | entity count | method type |
| LocalDb | employee | 1 | asynchronous |
| LocalDb | workstation | 1 | asynchronous |
| SqLite | workstation | 1 | asynchronous |
| LocalDb | building | 1 | asynchronous |
| SqLite | building | 1 | asynchronous |
| LocalDb | employee | 1 | synchronous |
| LocalDb | workstation | 1 | synchronous |
| SqLite | workstation | 1 | synchronous |
| LocalDb | building | 1 | synchronous |
| SqLite | building | 1 | synchronous |
@InMemoryDatabase
Scenario Outline: Conditional count (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> building entities using <method type> methods
And I query for the count of all the inserted building entities using <method type> methods
Then the database count of the queried entities should be <entity count>
Examples:
| database type | entity count | method type |
| LocalDb | 6 | asynchronous |
| LocalDb | 6 | synchronous |
@ExternalDatabase
Scenario Outline: Insert and select all (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
And I query for the count of all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
And the database count of the queried entities should be <entity count>
Examples:
| database type | entity type | entity count | method type |
| PostgreSql | employee | 1 | asynchronous |
| MySql | employee | 1 | asynchronous |
| MySql | building | 1 | asynchronous |
| PostgreSql | building | 1 | asynchronous |
| PostgreSql | employee | 1 | synchronous |
| MySql | employee | 1 | synchronous |
| MySql | building | 1 | synchronous |
| PostgreSql | building | 1 | synchronous |
@InMemoryDatabase
Scenario Outline: Find (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for a maximum of <max> <entity type> entities reverse ordered skipping <skip> records
Then the queried entities should be the same as the ones I inserted, in reverse order, starting from <skip> counting <max>
Examples:
| database type | entity type | entity count | max | skip | method type |
| LocalDb | workstation | 10 | 1 | 2 | asynchronous |
| SqLite | workstation | 10 | 1 | 2 | asynchronous |
| LocalDb | workstation | 10 | 1 | 2 | synchronous |
| SqLite | workstation | 10 | 1 | 2 | synchronous |
| LocalDb | workstation | 10 | 1 | NULL | synchronous |
| SqLite | workstation | 10 | 1 | NULL | synchronous |
| LocalDb | workstation | 10 | NULL | 2 | synchronous |
| SqLite | workstation | 10 | NULL | 2 | synchronous |
| LocalDb | workstation | 10 | NULL | NULL | synchronous |
| SqLite | workstation | 10 | NULL | NULL | synchronous |
| LocalDb | workstation | 10 | 1 | 0 | synchronous |
| SqLite | workstation | 10 | 1 | 0 | synchronous |
@ExternalDatabase
Scenario Outline: Find (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for a maximum of <max> <entity type> entities reverse ordered skipping <skip> records
Then the queried entities should be the same as the ones I inserted, in reverse order, starting from <skip> counting <max>
Examples:
| database type | entity type | entity count | max | skip | method type |
| MySql | workstation | 10 | 1 | 2 | asynchronous |
| PostgreSql | workstation | 10 | 1 | 2 | asynchronous |
| MySql | workstation | 10 | 1 | 2 | synchronous |
| PostgreSql | workstation | 10 | 1 | 2 | synchronous |
| MySql | workstation | 10 | 1 | NULL | synchronous |
| PostgreSql | workstation | 10 | 1 | NULL | synchronous |
| MySql | workstation | 10 | NULL | 2 | synchronous |
| PostgreSql | workstation | 10 | NULL | 2 | synchronous |
| MySql | workstation | 10 | NULL | NULL | synchronous |
| PostgreSql | workstation | 10 | NULL | NULL | synchronous |
| MySql | workstation | 10 | 1 | 0 | synchronous |
| PostgreSql | workstation | 10 | 1 | 0 | synchronous |
@InMemoryDatabase
Scenario Outline: Insert and select by primary key (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for the inserted <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| LocalDb | employee | 1 |asynchronous |
| LocalDb | workstation | 1 |asynchronous |
| LocalDb | building | 1 |asynchronous |
| SqLite | building | 1 |asynchronous |
| LocalDb | employee | 1 |synchronous |
| LocalDb | workstation | 1 |synchronous |
| LocalDb | building | 1 |synchronous |
| SqLite | building | 1 |synchronous |
@ExternalDatabase
Scenario Outline: Insert and select by primary key (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I query for the inserted <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| MySql | employee | 1 |asynchronous |
| PostgreSql | employee | 1 |asynchronous |
| MySql | workstation | 1 |asynchronous |
| PostgreSql | workstation | 1 |asynchronous |
| MySql | building | 1 |asynchronous |
| PostgreSql | building | 1 |asynchronous |
| MySql | employee | 1 |synchronous |
| PostgreSql | employee | 1 |synchronous |
| MySql | workstation | 1 |synchronous |
| PostgreSql | workstation | 1 |synchronous |
| MySql | building | 1 |synchronous |
| PostgreSql | building | 1 |synchronous |
@InMemoryDatabase
Scenario Outline: Update by primary keys (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I update all the inserted <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| LocalDb | employee | 1 | asynchronous |
| LocalDb | workstation | 1 | asynchronous |
| LocalDb | building | 1 | asynchronous |
| LocalDb | employee | 1 | synchronous |
| LocalDb | workstation | 1 | synchronous |
| SqLite | building | 1 | asynchronous |
| LocalDb | building | 1 | synchronous |
| SqLite | building | 1 | synchronous |
@ExternalDatabase
Scenario Outline: Update by primary keys (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I update all the inserted <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| MySql | employee | 1 | asynchronous |
| PostgreSql | employee | 1 | asynchronous |
| MySql | workstation | 1 | asynchronous |
| PostgreSql | workstation | 1 | asynchronous |
| MySql | building | 1 | asynchronous |
| PostgreSql | building | 1 | asynchronous |
| MySql | employee | 1 | synchronous |
| PostgreSql | employee | 1 | synchronous |
| MySql | workstation | 1 | synchronous |
| PostgreSql | workstation | 1 | synchronous |
| MySql | building | 1 | synchronous |
| PostgreSql | building | 1 | synchronous |
@InMemoryDatabase
Scenario Outline: Partial update (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I partially update all the inserted <entity type> entities
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| LocalDb | employee | 3 | asynchronous |
| LocalDb | employee | 3 | synchronous |
@ExternalDatabase
Scenario Outline: Partial update (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I partially update all the inserted <entity type> entities
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| MySql | employee | 3 | asynchronous |
| PostgreSql | employee | 3 | asynchronous |
| MySql | employee | 3 | synchronous |
| PostgreSql | employee | 3 | synchronous |
@InMemoryDatabase
Scenario Outline: Delete by primary keys (in-memory database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I delete all the inserted <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| LocalDb | employee | 3 |asynchronous |
| LocalDb | workstation | 3 |asynchronous |
| LocalDb | building | 3 |asynchronous |
| SqLite | building | 3 |asynchronous |
| SqLite | building | 3 |synchronous |
| LocalDb | employee | 3 |synchronous |
| LocalDb | workstation | 3 |synchronous |
| LocalDb | building | 3 |synchronous |
@ExternalDatabase
Scenario Outline: Delete by primary keys (external database)
Given I have initialized a <database type> database
When I insert <entity count> <entity type> entities using <method type> methods
And I delete all the inserted <entity type> entities using <method type> methods
And I query for all the <entity type> entities using <method type> methods
Then the queried entities should be the same as the local ones
Examples:
| database type | entity type | entity count | method type |
| MySql | employee | 3 |asynchronous |
| PostgreSql | employee | 3 |asynchronous |
| MySql | workstation | 3 |asynchronous |
| MySql | workstation | 3 |synchronous |
| PostgreSql | workstation | 3 |asynchronous |
| MySql | building | 3 |asynchronous |
| MySql | building | 3 |synchronous |
| PostgreSql | building | 3 |asynchronous |
| MySql | employee | 3 |synchronous |
| PostgreSql | employee | 3 |synchronous |
| PostgreSql | workstation | 3 |synchronous |
| PostgreSql | building | 3 |synchronous |