apirunner 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +96 -33
- data/VERSION +1 -1
- data/apirunner.gemspec +14 -6
- data/examples/config/api_runner.yml +21 -2
- data/examples/test/api_runner/001_create_user.yml +49 -40
- data/examples/test/api_runner/002_update_resources.yml +123 -0
- data/examples/test/api_runner/003_update_ratings.yml +7 -8
- data/examples/test/api_runner/004_update_series_ratings.yml +88 -0
- data/examples/test/api_runner/{005_recommendations.yml → 006_recommendations.yml} +4 -34
- data/examples/test/api_runner/007_item_predictions.yml +286 -0
- data/examples/test/api_runner/{006_discovery.yml → 008_discovery.yml} +142 -18
- data/examples/test/api_runner/010_fsk.yml +168 -0
- data/examples/test/api_runner/011_misc.yml +116 -0
- data/examples/test/api_runner/012_telekom_error_reports.yml +1831 -0
- data/examples/test/api_runner/013-extended-unpersonalized-discovery.yml +711 -0
- data/examples/test/api_runner/014-extended-personalized-discovery.yml +764 -0
- data/examples/test/api_runner/015_create_10000_users.yml +43 -0
- data/examples/test/api_runner/999_delete_user.yml +35 -4
- data/lib/api_runner.rb +1 -1
- metadata +16 -8
- /data/examples/test/api_runner/{004_rateables_and_pagination.yml → 005_rateables_and_pagination.yml} +0 -0
- /data/examples/test/api_runner/{007_cacheable_operations.yml → 009_cacheable_operations.yml} +0 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
- name: 'Create new User'
|
3
|
+
iterations: 10000
|
4
|
+
priority: 4
|
5
|
+
request:
|
6
|
+
headers:
|
7
|
+
Content-Type: 'application/json'
|
8
|
+
path: '/users/duffyduck@@'
|
9
|
+
method: 'PUT'
|
10
|
+
body:
|
11
|
+
watchlist:
|
12
|
+
- m1035
|
13
|
+
- m2087
|
14
|
+
blacklist:
|
15
|
+
- m1554
|
16
|
+
- m2981
|
17
|
+
skiplist:
|
18
|
+
- m1590
|
19
|
+
- m1056
|
20
|
+
ratings:
|
21
|
+
m10506: 1.0
|
22
|
+
m462: 2.0
|
23
|
+
m5968: 3.0
|
24
|
+
m7511: 4.0
|
25
|
+
m11995: 5.0
|
26
|
+
m2274: 1.0
|
27
|
+
m25796: 2.0
|
28
|
+
m9698: 3.0
|
29
|
+
m6289: 4.0
|
30
|
+
m4350: 5.0
|
31
|
+
m10735: 1.0
|
32
|
+
m3492: 2.0
|
33
|
+
m645: 3.0
|
34
|
+
m24772: 4.0
|
35
|
+
m1880: 5.0
|
36
|
+
m6434: 1.0
|
37
|
+
m6538: 2.0
|
38
|
+
m10009: 3.0
|
39
|
+
m5900: 4.0
|
40
|
+
m22668: 5.0
|
41
|
+
expires_at: 2011-09-09T22:41:50+00:00
|
42
|
+
response_expectation:
|
43
|
+
status_code: 201
|
@@ -1,4 +1,11 @@
|
|
1
1
|
---
|
2
|
+
- name: 'Delete Basich User'
|
3
|
+
request:
|
4
|
+
path: '/users/duffybasic'
|
5
|
+
method: 'DELETE'
|
6
|
+
body: {}
|
7
|
+
response_expectation:
|
8
|
+
status_code: 202
|
2
9
|
- name: 'Delete User 1'
|
3
10
|
request:
|
4
11
|
path: '/users/duffyduck'
|
@@ -14,7 +21,6 @@
|
|
14
21
|
response_expectation:
|
15
22
|
status_code: 404
|
16
23
|
- name: 'Delete User 2'
|
17
|
-
priority: 1
|
18
24
|
request:
|
19
25
|
path: '/users/duffyduck2'
|
20
26
|
method: 'DELETE'
|
@@ -22,7 +28,6 @@
|
|
22
28
|
response_expectation:
|
23
29
|
status_code: 202
|
24
30
|
- name: 'User 2 should be nonexistant afterwards'
|
25
|
-
priority: 1
|
26
31
|
request:
|
27
32
|
path: '/users/duffyduck2'
|
28
33
|
method: 'GET'
|
@@ -30,7 +35,6 @@
|
|
30
35
|
response_expectation:
|
31
36
|
status_code: 404
|
32
37
|
- name: 'Delete User 3'
|
33
|
-
priority: 1
|
34
38
|
request:
|
35
39
|
path: '/users/duffyduck3'
|
36
40
|
method: 'DELETE'
|
@@ -38,10 +42,37 @@
|
|
38
42
|
response_expectation:
|
39
43
|
status_code: 202
|
40
44
|
- name: 'User 3 should be nonexistant afterwards'
|
41
|
-
priority: 1
|
42
45
|
request:
|
43
46
|
path: '/users/duffyduck3'
|
44
47
|
method: 'GET'
|
45
48
|
body: {}
|
46
49
|
response_expectation:
|
47
50
|
status_code: 404
|
51
|
+
- name: 'Delete adult user duffydad'
|
52
|
+
request:
|
53
|
+
path: '/users/duffydad'
|
54
|
+
method: 'DELETE'
|
55
|
+
body: {}
|
56
|
+
response_expectation:
|
57
|
+
status_code: 202
|
58
|
+
- name: 'Adult user duffydad should be nonexistant afterwards'
|
59
|
+
request:
|
60
|
+
path: '/users/duffydad'
|
61
|
+
method: 'GET'
|
62
|
+
body: {}
|
63
|
+
response_expectation:
|
64
|
+
status_code: 404
|
65
|
+
- name: 'Delete non-adult user duffykid'
|
66
|
+
request:
|
67
|
+
path: '/users/duffykid'
|
68
|
+
method: 'DELETE'
|
69
|
+
body: {}
|
70
|
+
response_expectation:
|
71
|
+
status_code: 202
|
72
|
+
- name: 'Non-Adult duffykid user should be nonexistant afterwards'
|
73
|
+
request:
|
74
|
+
path: '/users/duffykid'
|
75
|
+
method: 'GET'
|
76
|
+
body: {}
|
77
|
+
response_expectation:
|
78
|
+
status_code: 404
|
data/lib/api_runner.rb
CHANGED
@@ -40,7 +40,7 @@ class ApiRunner
|
|
40
40
|
end
|
41
41
|
error_count = @results.select{ |r| !r.succeeded }.count
|
42
42
|
puts "\n\nResults: I greatfully ran #{ @spec.size } test(s), \033[32m#{ @spec.size - error_count }\033[0m succeeded, \033[31m#{ error_count }\033[0m failed."
|
43
|
-
|
43
|
+
exit(error_count)
|
44
44
|
end
|
45
45
|
|
46
46
|
protected
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 6
|
9
|
+
version: 0.4.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- jan@moviepilot.com
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-27 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -233,10 +233,18 @@ files:
|
|
233
233
|
- examples/test/api_runner/001_create_user.yml
|
234
234
|
- examples/test/api_runner/002_update_resources.yml
|
235
235
|
- examples/test/api_runner/003_update_ratings.yml
|
236
|
-
- examples/test/api_runner/
|
237
|
-
- examples/test/api_runner/
|
238
|
-
- examples/test/api_runner/
|
239
|
-
- examples/test/api_runner/
|
236
|
+
- examples/test/api_runner/004_update_series_ratings.yml
|
237
|
+
- examples/test/api_runner/005_rateables_and_pagination.yml
|
238
|
+
- examples/test/api_runner/006_recommendations.yml
|
239
|
+
- examples/test/api_runner/007_item_predictions.yml
|
240
|
+
- examples/test/api_runner/008_discovery.yml
|
241
|
+
- examples/test/api_runner/009_cacheable_operations.yml
|
242
|
+
- examples/test/api_runner/010_fsk.yml
|
243
|
+
- examples/test/api_runner/011_misc.yml
|
244
|
+
- examples/test/api_runner/012_telekom_error_reports.yml
|
245
|
+
- examples/test/api_runner/013-extended-unpersonalized-discovery.yml
|
246
|
+
- examples/test/api_runner/014-extended-personalized-discovery.yml
|
247
|
+
- examples/test/api_runner/015_create_10000_users.yml
|
240
248
|
- examples/test/api_runner/999_delete_user.yml
|
241
249
|
- examples/test/api_runner/excludes.yml
|
242
250
|
- features/apirunner.feature
|
@@ -283,7 +291,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
283
291
|
requirements:
|
284
292
|
- - ">="
|
285
293
|
- !ruby/object:Gem::Version
|
286
|
-
hash:
|
294
|
+
hash: 4108885877346893427
|
287
295
|
segments:
|
288
296
|
- 0
|
289
297
|
version: "0"
|
/data/examples/test/api_runner/{004_rateables_and_pagination.yml → 005_rateables_and_pagination.yml}
RENAMED
File without changes
|
/data/examples/test/api_runner/{007_cacheable_operations.yml → 009_cacheable_operations.yml}
RENAMED
File without changes
|