diff --git a/tests/pyrest_tests/basic_smoketest.yaml b/tests/pyrest_tests/basic_smoketest.yaml index 282d730aa1ed0637aa9083fa5506ef573bd60aa2..1db1add1ebb9f50758c816381895d267c971829f 100644 --- a/tests/pyrest_tests/basic_smoketest.yaml +++ b/tests/pyrest_tests/basic_smoketest.yaml @@ -4,6 +4,6 @@ - test: - name: "Test ip address" - group: "basic_smoketest" - - url: "/rpc" + - url: "/" - method: "POST" - body: '{}' diff --git a/tests/pyrest_tests/bridge_api/bridge_api_benchmark.yaml b/tests/pyrest_tests/bridge_api/bridge_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7f6a234c146be7a9a449a82eb97135ca4c95099d --- /dev/null +++ b/tests/pyrest_tests/bridge_api/bridge_api_benchmark.yaml @@ -0,0 +1,156 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median + + - benchmark: + - name: "normalize_post" + - variable_binds: + - method: "normalize_post" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "get_post_header" + - variable_binds: + - method: "get_post_header" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussion" + - variable_binds: + - method: "get_discussion" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_post" + - variable_binds: + - method: "get_post" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_account_posts" + - variable_binds: + - method: "get_account_posts" + - args: {"sort":"post", "account":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_ranked_posts" + - variable_binds: + - method: "get_ranked_posts" + - args: {"sort":"trending","tag":"","observer":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_profile" + - variable_binds: + - method: "get_profile" + - args: {"account":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_trending_topics" + - variable_binds: + - method: "get_trending_topics" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "post_notifications" + - variable_binds: + - method: "post_notifications" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "account_notifications" + - variable_binds: + - method: "account_notifications" + - args: {"account":"steemit","limit":100} + - <<: *base_benchmark + + - benchmark: + - name: "unread_notifications" + - variable_binds: + - method: "unread_notifications" + - args: {"account":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_payout_stats" + - variable_binds: + - method: "get_payout_stats" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "get_community" + - variable_binds: + - method: "get_community" + - args: {"name":"hive-123456","observer":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_community_context" + - variable_binds: + - method: "get_community_context" + - args: {"community":"hive-123456", "account":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "list_communities" + - variable_binds: + - method: "list_communities" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "list_pop_communities" + - variable_binds: + - method: "list_pop_communities" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "list_community_roles" + - variable_binds: + - method: "list_community_roles" + - args: {"community":"hive-123456"} + - <<: *base_benchmark + + - benchmark: + - name: "list_subscribers" + - variable_binds: + - method: "list_subscribers" + - args: {"community":"hive-123456"} + - <<: *base_benchmark + + - benchmark: + - name: "list_all_subscriptions" + - variable_binds: + - method: "list_all_subscriptions" + - args: {"account":"steemit"} + - <<: *base_benchmark \ No newline at end of file diff --git a/tests/pyrest_tests/bridge_api/bridge_api_test.yaml b/tests/pyrest_tests/bridge_api/bridge_api_test.yaml index 3be66891ba4b6ea515330deb0c5249945a84266c..9c4e7891e5e7dce2d0fc86922b281bbdf7fee667 100644 --- a/tests/pyrest_tests/bridge_api/bridge_api_test.yaml +++ b/tests/pyrest_tests/bridge_api/bridge_api_test.yaml @@ -11,7 +11,7 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: @@ -31,43 +31,42 @@ - name: "get_post_header" - variable_binds: - method: "get_post_header" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: - name: "get_discussion" - variable_binds: - method: "get_discussion" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: - name: "get_post" - variable_binds: - method: "get_post" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: - name: "get_account_posts" - variable_binds: - method: "get_account_posts" - - args: {} + - args: {"sort":"post", "account":"steemit"} - <<: *base_test - - test: - name: "get_ranked_posts" - variable_binds: - method: "get_ranked_posts" - - args: {} + - args: {"sort":"trending","tag":"","observer":"steemit"} - <<: *base_test - test: - name: "get_profile" - variable_binds: - method: "get_profile" - - args: {} + - args: {"account":"steemit"} - <<: *base_test - test: @@ -81,21 +80,21 @@ - name: "post_notifications" - variable_binds: - method: "post_notifications" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: - name: "account_notifications" - variable_binds: - method: "account_notifications" - - args: {} + - args: {"account":"steemit","limit":100} - <<: *base_test - test: - name: "unread_notifications" - variable_binds: - method: "unread_notifications" - - args: {} + - args: {"account":"steemit"} - <<: *base_test - test: @@ -109,14 +108,14 @@ - name: "get_community" - variable_binds: - method: "get_community" - - args: {} + - args: {"name":"hive-123456","observer":"steemit"} - <<: *base_test - test: - name: "get_community_context" - variable_binds: - method: "get_community_context" - - args: {} + - args: {"community":"hive-123456", "account":"steemit"} - <<: *base_test - test: @@ -137,19 +136,19 @@ - name: "list_community_roles" - variable_binds: - method: "list_community_roles" - - args: {} + - args: {"community":"hive-123456"} - <<: *base_test - test: - name: "list_subscribers" - variable_binds: - method: "list_subscribers" - - args: {} + - args: {"community":"hive-123456"} - <<: *base_test - test: - name: "list_all_subscriptions" - variable_binds: - method: "list_all_subscriptions" - - args: {} + - args: {"account":"steemit"} - <<: *base_test \ No newline at end of file diff --git a/tests/pyrest_tests/condenser_api/condenser_api_benchmark.yaml b/tests/pyrest_tests/condenser_api/condenser_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a97c38003cc6b42956cb3849eec94789a0f1009d --- /dev/null +++ b/tests/pyrest_tests/condenser_api/condenser_api_benchmark.yaml @@ -0,0 +1,191 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median + + - benchmark: + - name: "get_followers" + - variable_binds: + - method: "get_followers" + - args: {"account":"steemit","start":null,"type":"blog","limit":10} + - <<: *base_benchmark + + - benchmark: + - name: "get_following" + - variable_binds: + - method: "get_following" + - args: {"account":"steemit","start":null,"type":"blog","limit":10} + - <<: *base_benchmark + + - benchmark: + - name: "get_follow_count" + - variable_binds: + - method: "get_follow_count" + - args: {"account":"steemit"} + - <<: *base_benchmark + + - benchmark: + - name: "get_content" + - variable_binds: + - method: "get_content" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_content_replies" + - variable_binds: + - method: "get_content_replies" + - args: {"author":"steemit", "permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_state" + - variable_binds: + - method: "get_state" + - args: {} + - <<: *base_benchmark + + - benchmark: + - name: "get_trending_tags" + - variable_binds: + - method: "get_trending_tags" + - args: {"start_tag":"steem","limit":10} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_trending" + - variable_binds: + - method: "get_discussions_by_trending" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_hot" + - variable_binds: + - method: "get_discussions_by_hot" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_promoted" + - variable_binds: + - method: "get_discussions_by_promoted" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_created" + - variable_binds: + - method: "get_discussions_by_created" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_blog" + - variable_binds: + - method: "get_discussions_by_blog" + - args: {"tag":"steemit","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_feed" + - variable_binds: + - method: "get_discussions_by_feed" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_comments" + - variable_binds: + - method: "get_discussions_by_comments" + - args: {"start_author":"steemit","start_permlink":"firstpost","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_replies_by_last_update" + - variable_binds: + - method: "get_replies_by_last_update" + - args: {"start_parent_author":"steemit","start_permlink":"firstpost","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_discussions_by_author_before_date" + - variable_binds: + - method: "get_discussions_by_author_before_date" + - args: {"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_post_discussions_by_payout" + - variable_binds: + - method: "get_post_discussions_by_payout" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_comment_discussions_by_payout" + - variable_binds: + - method: "get_comment_discussions_by_payout" + - args: {"tag":"steem","limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_blog" + - variable_binds: + - method: "get_blog" + - args: {"account":"steemit","start_entry_id":0,"limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_blog_entries" + - variable_binds: + - method: "get_blog_entries" + - args: {"account":"steemit","start_entry_id":0,"limit":1} + - <<: *base_benchmark + + - benchmark: + - name: "get_account_reputations" + - variable_binds: + - method: "get_account_reputations" + - args: {"account_lower_bound": "steem"} + - <<: *base_benchmark + + - benchmark: + - name: "get_reblogged_by" + - variable_binds: + - method: "get_reblogged_by" + - args: {"author":"steemit","permlink":"firstpost"} + - <<: *base_benchmark + + - benchmark: + - name: "get_accounts" + - variable_binds: + - method: "get_accounts" + - args: {["steemit"]} + - <<: *base_benchmark + + - benchmark: + - name: "get_account_votes" + - variable_binds: + - method: "get_account_votes" + - args: {["steemit"]} + - <<: *base_benchmark \ No newline at end of file diff --git a/tests/pyrest_tests/condenser_api/condenser_api_test.yaml b/tests/pyrest_tests/condenser_api/condenser_api_test.yaml index 47c106124b558ee4df83eaae3d8c8953ee0eece7..769a954f16469cc36c47590a768a0178c1d7fad4 100644 --- a/tests/pyrest_tests/condenser_api/condenser_api_test.yaml +++ b/tests/pyrest_tests/condenser_api/condenser_api_test.yaml @@ -11,7 +11,7 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: @@ -24,35 +24,35 @@ - name: "get_followers" - variable_binds: - method: "get_followers" - - args: {} + - args: {"account":"steemit","start":null,"type":"blog","limit":10} - <<: *base_test - test: - name: "get_following" - variable_binds: - method: "get_following" - - args: {} + - args: {"account":"steemit","start":null,"type":"blog","limit":10} - <<: *base_test - test: - name: "get_follow_count" - variable_binds: - method: "get_follow_count" - - args: {} + - args: {"account":"steemit"} - <<: *base_test - test: - name: "get_content" - variable_binds: - method: "get_content" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: - name: "get_content_replies" - variable_binds: - method: "get_content_replies" - - args: {} + - args: {"author":"steemit", "permlink":"firstpost"} - <<: *base_test - test: @@ -66,124 +66,124 @@ - name: "get_trending_tags" - variable_binds: - method: "get_trending_tags" - - args: {} + - args: {"start_tag":"steem","limit":10} - <<: *base_test - test: - name: "get_discussions_by_trending" - variable_binds: - method: "get_discussions_by_trending" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_discussions_by_hot" - variable_binds: - method: "get_discussions_by_hot" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_discussions_by_promoted" - variable_binds: - method: "get_discussions_by_promoted" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_discussions_by_created" - variable_binds: - method: "get_discussions_by_created" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_discussions_by_blog" - variable_binds: - method: "get_discussions_by_blog" - - args: {} + - args: {"tag":"steemit","limit":1} - <<: *base_test - test: - name: "get_discussions_by_feed" - variable_binds: - method: "get_discussions_by_feed" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_discussions_by_comments" - variable_binds: - method: "get_discussions_by_comments" - - args: {} + - args: {"start_author":"steemit","start_permlink":"firstpost","limit":1} - <<: *base_test - test: - name: "get_replies_by_last_update" - variable_binds: - method: "get_replies_by_last_update" - - args: {} + - args: {"start_parent_author":"steemit","start_permlink":"firstpost","limit":1} - <<: *base_test - test: - name: "get_discussions_by_author_before_date" - variable_binds: - method: "get_discussions_by_author_before_date" - - args: {} + - args: {"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1} - <<: *base_test - test: - name: "get_post_discussions_by_payout" - variable_binds: - method: "get_post_discussions_by_payout" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_comment_discussions_by_payout" - variable_binds: - method: "get_comment_discussions_by_payout" - - args: {} + - args: {"tag":"steem","limit":1} - <<: *base_test - test: - name: "get_blog" - variable_binds: - method: "get_blog" - - args: {} + - args: {"account":"steemit","start_entry_id":0,"limit":1} - <<: *base_test - test: - name: "get_blog_entries" - variable_binds: - method: "get_blog_entries" - - args: {} + - args: {"account":"steemit","start_entry_id":0,"limit":1} - <<: *base_test - test: - name: "get_account_reputations" - variable_binds: - method: "get_account_reputations" - - args: {} + - args: {"account_lower_bound": "steem"} - <<: *base_test - test: - name: "get_reblogged_by" - variable_binds: - method: "get_reblogged_by" - - args: {} + - args: {"author":"steemit","permlink":"firstpost"} - <<: *base_test - test: - name: "get_accounts" - variable_binds: - method: "get_accounts" - - args: {} + - args: {["steemit"]} - <<: *base_test - test: - name: "get_account_votes" - variable_binds: - method: "get_account_votes" - - args: {} + - args: {["steemit"]} - <<: *base_test \ No newline at end of file diff --git a/tests/pyrest_tests/database_api/database_api_benchmark.yaml b/tests/pyrest_tests/database_api/database_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c7e3d936b56b94b340bd0d9a48e0a7df0013f71a --- /dev/null +++ b/tests/pyrest_tests/database_api/database_api_benchmark.yaml @@ -0,0 +1,37 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median + + - benchmark: + - name: "list_comments" + - variable_binds: + - method: "list_comments" + - args: {"start":["steemit","firstpost","",""], "limit":10, "order":"by_permlink"} + - <<: *base_benchmark + + - benchmark: + - name: "find_comments" + - variable_binds: + - method: "find_comments" + - args: {"start":[["steemit","firstpost"],["steemit","firstpost"]], "limit":10, "order":"by_account"} + - <<: *base_benchmark \ No newline at end of file diff --git a/tests/pyrest_tests/database_api/database_api_test.yaml b/tests/pyrest_tests/database_api/database_api_test.yaml index 27d3e01aba6e56af21026cefed158bd43b882001..66eb07d7b4deb77f08fbd2463d2c26b62a9aff4f 100644 --- a/tests/pyrest_tests/database_api/database_api_test.yaml +++ b/tests/pyrest_tests/database_api/database_api_test.yaml @@ -11,7 +11,7 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: @@ -24,12 +24,12 @@ - name: "list_comments" - variable_binds: - method: "list_comments" - - args: {} + - args: {"start":["steemit","firstpost","",""], "limit":10, "order":"by_permlink"} - <<: *base_test - test: - name: "find_comments" - variable_binds: - method: "find_comments" - - args: {} + - args: {"start":[["steemit","firstpost"],["steemit","firstpost"]], "limit":10, "order":"by_account"} - <<: *base_test diff --git a/tests/pyrest_tests/follow_api/follow_api_benchmark.yaml b/tests/pyrest_tests/follow_api/follow_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9d9bbb9165a13b9b51b7e5b2ebfc1b319e36ede4 --- /dev/null +++ b/tests/pyrest_tests/follow_api/follow_api_benchmark.yaml @@ -0,0 +1,23 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median \ No newline at end of file diff --git a/tests/pyrest_tests/follow_api/follow_api_test.yaml b/tests/pyrest_tests/follow_api/follow_api_test.yaml index 59bc3f0059b9a6fefd3cbd6f9e9f2fc093a21c28..cf1b56221e49a84028fd0e2176173584f1807099 100644 --- a/tests/pyrest_tests/follow_api/follow_api_test.yaml +++ b/tests/pyrest_tests/follow_api/follow_api_test.yaml @@ -11,7 +11,7 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: diff --git a/tests/pyrest_tests/hive_api/hive_api_benchmark.yaml b/tests/pyrest_tests/hive_api/hive_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d7d3b4868a5eaa15a6482a096d994d20e557d1ed --- /dev/null +++ b/tests/pyrest_tests/hive_api/hive_api_benchmark.yaml @@ -0,0 +1,31 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median + + - benchmark: + - name: "db_head_state" + - variable_binds: + - method: "db_head_state" + - args: {} + - <<: *base_benchmark + diff --git a/tests/pyrest_tests/hive_api/hive_api_test.yaml b/tests/pyrest_tests/hive_api/hive_api_test.yaml index 9884da30c547e89e18eeb73807490d7335c1f139..f63ac4cced318eee87d6c470b89ce9b128bdd01e 100644 --- a/tests/pyrest_tests/hive_api/hive_api_test.yaml +++ b/tests/pyrest_tests/hive_api/hive_api_test.yaml @@ -11,18 +11,20 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: - extract_test: {jsonpath_mini: "error", test: "not_exists"} - extract_test: {jsonpath_mini: "result", test: "exists"} + - extract_test: {jsonpath_mini: "result.db_head_block", test: "exists"} + - extract_test: {jsonpath_mini: "result.db_head_time", test: "exists"} + - extract_test: {jsonpath_mini: "result.db_head_age", test: "exists"} - compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}} - - json_file_validator: {jsonpath_mini: "result", comparator: "json_compare", expected: {template: '$api/$method'}} - test: - name: "db_head_state" - variable_binds: - method: "db_head_state" - args: {} - - <<: *base_test \ No newline at end of file + - <<: *base_test diff --git a/tests/pyrest_tests/run_api_tests.sh b/tests/pyrest_tests/run_api_tests.sh index bbf42080cffcecd124480eb917a1dc79b6df6c47..0dd08ad6bbd28859e97644195b453a3a46be0759 100644 --- a/tests/pyrest_tests/run_api_tests.sh +++ b/tests/pyrest_tests/run_api_tests.sh @@ -16,7 +16,7 @@ else fi echo COMPARATOR: $COMPARATOR - +echo "Running API tests\n" pyresttest $NODE:$RPC_PORT ./basic_smoketest.yaml [ $? -ne 0 ] && echo FATAL: hivemind not running? && exit -1 @@ -37,5 +37,26 @@ pyresttest $NODE:$RPC_PORT ./hive_api/hive_api_test.yaml --import_extensions='va pyresttest $NODE:$RPC_PORT ./tags_api/tags_api_test.yaml --import_extensions='validator_ex;'$COMPARATOR [ $? -ne 0 ] && EXIT_CODE=-1 +echo "Done!\n" + +echo "Running API benchmark tests\n" +pyresttest $NODE:$RPC_PORT ./bridge_api/bridge_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 + +pyresttest $NODE:$RPC_PORT ./condenser_api/condenser_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 + +pyresttest $NODE:$RPC_PORT ./database_api/database_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 + +pyresttest $NODE:$RPC_PORT ./follow_api/follow_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 + +pyresttest $NODE:$RPC_PORT ./hive_api/hive_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 + +pyresttest $NODE:$RPC_PORT ./tags_api/tags_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR +[ $? -ne 0 ] && EXIT_CODE=-1 +echo "Done!\n" exit $EXIT_CODE diff --git a/tests/pyrest_tests/tags_api/tags_api_benchmark.yaml b/tests/pyrest_tests/tags_api/tags_api_benchmark.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9d9bbb9165a13b9b51b7e5b2ebfc1b319e36ede4 --- /dev/null +++ b/tests/pyrest_tests/tags_api/tags_api_benchmark.yaml @@ -0,0 +1,23 @@ +--- + - config: + - testset: "Hive API Benchmark Tests" + - api: &api "hive" + - variable_binds: + - api: *api + - generators: + - test_id: {type: 'number_sequence', start: 1} + + - base_benchmark: &base_benchmark + - url: "/" + - group: *api + - method: "POST" + - generator_binds: + - test_id: test_id + - body: {template: {file: "./templates/request_template.json"}} + - warmup_runs: 0 + - benchmark_runs: '1000' + - output_format: csv + - metrics: + - total_time + - total_time: mean + - total_time: median \ No newline at end of file diff --git a/tests/pyrest_tests/tags_api/tags_api_test.yaml b/tests/pyrest_tests/tags_api/tags_api_test.yaml index b30c99d38f71330016449cea07829b8fd53dffce..48871eaf8a4ca7b024920d4e17d6880fb48be47a 100644 --- a/tests/pyrest_tests/tags_api/tags_api_test.yaml +++ b/tests/pyrest_tests/tags_api/tags_api_test.yaml @@ -11,7 +11,7 @@ - generator_binds: - test_id: test_id - group: *api - - url: "/rpc" + - url: "/" - method: "POST" - body: {template: {file: "../templates/request_template.json"}} - validators: