gridinit-jmeter 0.3.2 → 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/Gemfile +2 -1
  2. data/README.md +51 -72
  3. data/examples/basic_assertion.rb +6 -6
  4. data/examples/basic_auth.rb +5 -5
  5. data/examples/basic_cache.rb +5 -5
  6. data/examples/basic_cookies.rb +5 -5
  7. data/examples/basic_extract.rb +4 -10
  8. data/examples/basic_gc_results.rb +12 -9
  9. data/examples/basic_google.rb +3 -3
  10. data/examples/basic_grid.rb +3 -6
  11. data/examples/basic_header.rb +12 -10
  12. data/examples/basic_ldap_ext.rb +11 -12
  13. data/examples/basic_post.rb +5 -6
  14. data/examples/basic_query_params.rb +3 -3
  15. data/examples/basic_think_time.rb +7 -4
  16. data/examples/basic_throughput_shaping_timer.rb +4 -4
  17. data/examples/etsy_login_browse.rb +21 -21
  18. data/lib/gridinit-jmeter/DSL.md +237 -0
  19. data/lib/gridinit-jmeter/{idl → dsl}/access_log_sampler.rb +4 -2
  20. data/lib/gridinit-jmeter/{idl → dsl}/aggregate_graph.rb +4 -2
  21. data/lib/gridinit-jmeter/{idl → dsl}/aggregate_report.rb +4 -2
  22. data/lib/gridinit-jmeter/{idl → dsl}/ajp13_sampler.rb +5 -3
  23. data/lib/gridinit-jmeter/{idl → dsl}/assertion_results.rb +4 -2
  24. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_assertion.rb +4 -2
  25. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_listener.rb +4 -2
  26. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_postprocessor.rb +4 -2
  27. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_preprocessor.rb +4 -2
  28. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_sampler.rb +4 -2
  29. data/lib/gridinit-jmeter/{idl → dsl}/beanshell_timer.rb +4 -2
  30. data/lib/gridinit-jmeter/{idl → dsl}/bsf_assertion.rb +4 -2
  31. data/lib/gridinit-jmeter/{idl → dsl}/bsf_listener.rb +4 -2
  32. data/lib/gridinit-jmeter/{idl → dsl}/bsf_postprocessor.rb +4 -2
  33. data/lib/gridinit-jmeter/{idl → dsl}/bsf_preprocessor.rb +4 -2
  34. data/lib/gridinit-jmeter/{idl → dsl}/bsf_sampler.rb +4 -2
  35. data/lib/gridinit-jmeter/{idl → dsl}/bsf_timer.rb +4 -2
  36. data/lib/gridinit-jmeter/{idl → dsl}/compare_assertion.rb +4 -2
  37. data/lib/gridinit-jmeter/{idl → dsl}/comparison_assertion_visualizer.rb +4 -2
  38. data/lib/gridinit-jmeter/{idl → dsl}/constant_throughput_timer.rb +4 -2
  39. data/lib/gridinit-jmeter/{idl → dsl}/constant_timer.rb +4 -2
  40. data/lib/gridinit-jmeter/{idl → dsl}/counter.rb +4 -2
  41. data/lib/gridinit-jmeter/{idl → dsl}/cssjquery_extractor.rb +4 -2
  42. data/lib/gridinit-jmeter/{idl → dsl}/csv_data_set_config.rb +4 -2
  43. data/lib/gridinit-jmeter/{idl → dsl}/debug_postprocessor.rb +4 -2
  44. data/lib/gridinit-jmeter/{idl → dsl}/debug_sampler.rb +4 -2
  45. data/lib/gridinit-jmeter/{idl → dsl}/distribution_graphalpha.rb +4 -2
  46. data/lib/gridinit-jmeter/{idl → dsl}/duration_assertion.rb +4 -2
  47. data/lib/gridinit-jmeter/{idl → dsl}/foreach_controller.rb +4 -2
  48. data/lib/gridinit-jmeter/{idl → dsl}/ftp_request.rb +4 -2
  49. data/lib/gridinit-jmeter/{idl → dsl}/ftp_request_defaults.rb +4 -2
  50. data/lib/gridinit-jmeter/{idl → dsl}/gaussian_random_timer.rb +4 -2
  51. data/lib/gridinit-jmeter/{idl → dsl}/generate_summary_results.rb +4 -2
  52. data/lib/gridinit-jmeter/{idl → dsl}/graph_results.rb +4 -2
  53. data/lib/gridinit-jmeter/{idl → dsl}/html_assertion.rb +4 -2
  54. data/lib/gridinit-jmeter/{idl → dsl}/html_link_parser.rb +4 -2
  55. data/lib/gridinit-jmeter/{idl → dsl}/html_parameter_mask.rb +4 -2
  56. data/lib/gridinit-jmeter/dsl/http_authorization_manager.rb +36 -0
  57. data/lib/gridinit-jmeter/{idl → dsl}/http_cache_manager.rb +4 -2
  58. data/lib/gridinit-jmeter/{idl → dsl}/http_cookie_manager.rb +5 -2
  59. data/lib/gridinit-jmeter/{idl → dsl}/http_header_manager.rb +10 -3
  60. data/lib/gridinit-jmeter/{idl → dsl}/http_request.rb +5 -3
  61. data/lib/gridinit-jmeter/{idl → dsl}/http_request_defaults.rb +15 -4
  62. data/lib/gridinit-jmeter/{idl → dsl}/http_url_rewriting_modifier.rb +4 -2
  63. data/lib/gridinit-jmeter/{idl → dsl}/if_controller.rb +5 -2
  64. data/lib/gridinit-jmeter/{idl → dsl}/include_controller.rb +4 -2
  65. data/lib/gridinit-jmeter/{idl → dsl}/java_request.rb +4 -2
  66. data/lib/gridinit-jmeter/{idl → dsl}/java_request_defaults.rb +4 -2
  67. data/lib/gridinit-jmeter/{idl → dsl}/jdbc_connection_configuration.rb +4 -2
  68. data/lib/gridinit-jmeter/{idl → dsl}/jdbc_postprocessor.rb +4 -2
  69. data/lib/gridinit-jmeter/{idl → dsl}/jdbc_preprocessor.rb +4 -2
  70. data/lib/gridinit-jmeter/{idl → dsl}/jdbc_request.rb +4 -2
  71. data/lib/gridinit-jmeter/{idl → dsl}/jms_pointtopoint.rb +6 -4
  72. data/lib/gridinit-jmeter/{idl → dsl}/jms_publisher.rb +5 -3
  73. data/lib/gridinit-jmeter/{idl → dsl}/jms_subscriber.rb +4 -2
  74. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_assertion.rb +4 -2
  75. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_listener.rb +4 -2
  76. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_postprocessor.rb +4 -2
  77. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_preprocessor.rb +4 -2
  78. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_sampler.rb +4 -2
  79. data/lib/gridinit-jmeter/{idl → dsl}/jsr223_timer.rb +4 -2
  80. data/lib/gridinit-jmeter/{idl → dsl}/junit_request.rb +4 -2
  81. data/lib/gridinit-jmeter/{idl → dsl}/keystore_configuration.rb +4 -2
  82. data/lib/gridinit-jmeter/{idl → dsl}/ldap_extended_request.rb +4 -2
  83. data/lib/gridinit-jmeter/{idl → dsl}/ldap_extended_request_defaults.rb +4 -2
  84. data/lib/gridinit-jmeter/{idl → dsl}/ldap_request.rb +5 -3
  85. data/lib/gridinit-jmeter/{idl → dsl}/ldap_request_defaults.rb +13 -4
  86. data/lib/gridinit-jmeter/{idl → dsl}/login_config_element.rb +4 -2
  87. data/lib/gridinit-jmeter/{idl → dsl}/loop_controller.rb +4 -2
  88. data/lib/gridinit-jmeter/{idl → dsl}/mail_reader_sampler.rb +4 -2
  89. data/lib/gridinit-jmeter/{idl → dsl}/mailer_visualizer.rb +4 -2
  90. data/lib/gridinit-jmeter/{idl → dsl}/md5hex_assertion.rb +4 -2
  91. data/lib/gridinit-jmeter/{idl → dsl}/module_controller.rb +4 -2
  92. data/lib/gridinit-jmeter/{idl → dsl}/monitor_results.rb +4 -2
  93. data/lib/gridinit-jmeter/{idl → dsl}/once_only_controller.rb +4 -2
  94. data/lib/gridinit-jmeter/{idl → dsl}/os_process_sampler.rb +6 -4
  95. data/lib/gridinit-jmeter/{idl → dsl}/poisson_random_timer.rb +4 -2
  96. data/lib/gridinit-jmeter/{idl → dsl}/random_controller.rb +4 -2
  97. data/lib/gridinit-jmeter/{idl → dsl}/random_order_controller.rb +4 -2
  98. data/lib/gridinit-jmeter/{idl → dsl}/random_variable.rb +4 -2
  99. data/lib/gridinit-jmeter/{idl → dsl}/recording_controller.rb +4 -2
  100. data/lib/gridinit-jmeter/{idl → dsl}/regex_user_parameters.rb +4 -2
  101. data/lib/gridinit-jmeter/{idl → dsl}/regular_expression_extractor.rb +5 -2
  102. data/lib/gridinit-jmeter/{idl → dsl}/response_assertion.rb +8 -3
  103. data/lib/gridinit-jmeter/{idl → dsl}/response_time_graph.rb +4 -2
  104. data/lib/gridinit-jmeter/{idl → dsl}/result_status_action_handler.rb +4 -2
  105. data/lib/gridinit-jmeter/{idl → dsl}/runtime_controller.rb +4 -2
  106. data/lib/gridinit-jmeter/{idl → dsl}/save_responses_to_a_file.rb +4 -2
  107. data/lib/gridinit-jmeter/{idl → dsl}/simple_config_element.rb +4 -2
  108. data/lib/gridinit-jmeter/{idl → dsl}/simple_controller.rb +4 -2
  109. data/lib/gridinit-jmeter/{idl → dsl}/simple_data_writer.rb +4 -2
  110. data/lib/gridinit-jmeter/{idl → dsl}/smime_assertion.rb +4 -2
  111. data/lib/gridinit-jmeter/{idl → dsl}/smtp_sampler.rb +4 -2
  112. data/lib/gridinit-jmeter/{idl → dsl}/soapxmlrpc_request.rb +4 -2
  113. data/lib/gridinit-jmeter/{idl → dsl}/spline_visualizer.rb +4 -2
  114. data/lib/gridinit-jmeter/{idl → dsl}/summary_report.rb +4 -2
  115. data/lib/gridinit-jmeter/{idl → dsl}/switch_controller.rb +4 -2
  116. data/lib/gridinit-jmeter/{idl → dsl}/synchronizing_timer.rb +4 -2
  117. data/lib/gridinit-jmeter/{idl → dsl}/tcp_sampler.rb +4 -2
  118. data/lib/gridinit-jmeter/{idl → dsl}/tcp_sampler_config.rb +4 -2
  119. data/lib/gridinit-jmeter/{idl → dsl}/test_action.rb +4 -2
  120. data/lib/gridinit-jmeter/{idl → dsl}/test_plan.rb +5 -3
  121. data/lib/gridinit-jmeter/{idl → dsl}/thread_group.rb +5 -3
  122. data/lib/gridinit-jmeter/{idl → dsl}/throughput_controller.rb +5 -3
  123. data/lib/gridinit-jmeter/{idl → dsl}/transaction_controller.rb +6 -3
  124. data/lib/gridinit-jmeter/{idl → dsl}/uniform_random_timer.rb +4 -2
  125. data/lib/gridinit-jmeter/dsl/user_defined_variables.rb +35 -0
  126. data/lib/gridinit-jmeter/{idl → dsl}/user_parameters.rb +4 -2
  127. data/lib/gridinit-jmeter/{idl → dsl}/view_results_in_table.rb +4 -2
  128. data/lib/gridinit-jmeter/{idl → dsl}/view_results_tree.rb +4 -2
  129. data/lib/gridinit-jmeter/{idl → dsl}/while_controller.rb +4 -2
  130. data/lib/gridinit-jmeter/{idl → dsl}/xml_assertion.rb +4 -2
  131. data/lib/gridinit-jmeter/{idl → dsl}/xml_schema_assertion.rb +4 -2
  132. data/lib/gridinit-jmeter/{idl → dsl}/xpath_assertion.rb +4 -2
  133. data/lib/gridinit-jmeter/{idl → dsl}/xpath_extractor.rb +4 -2
  134. data/lib/gridinit-jmeter/dsl.rb +170 -187
  135. data/lib/gridinit-jmeter/helpers/helper.rb +43 -0
  136. data/lib/gridinit-jmeter/helpers/parser.rb +109 -0
  137. data/lib/gridinit-jmeter/idl.rb +16 -6
  138. data/lib/gridinit-jmeter/idl.xml +54 -11
  139. data/lib/gridinit-jmeter/{listeners → plugins}/gc_console_status_logger.rb +0 -0
  140. data/lib/gridinit-jmeter/{listeners → plugins}/gc_latencies_over_time.rb +0 -0
  141. data/lib/gridinit-jmeter/{listeners → plugins}/gc_response_codes_per_second.rb +0 -0
  142. data/lib/gridinit-jmeter/{listeners → plugins}/gc_response_times_distribution.rb +0 -0
  143. data/lib/gridinit-jmeter/{listeners → plugins}/gc_response_times_over_time.rb +0 -0
  144. data/lib/gridinit-jmeter/{listeners → plugins}/gc_response_times_percentiles.rb +0 -0
  145. data/lib/gridinit-jmeter/{listeners → plugins}/gc_transactions_per_second.rb +0 -0
  146. data/lib/gridinit-jmeter/{timers/gc_throughput_shaping_timer.rb → plugins/gc_variable_throughput_timer.rb} +1 -1
  147. data/lib/gridinit-jmeter/version.rb +1 -1
  148. data/lib/gridinit-jmeter.rb +6 -105
  149. data/spec/dsl_spec.rb +377 -82
  150. metadata +131 -174
  151. data/examples/basic_proxy.rb +0 -8
  152. data/examples/basic_results.rb +0 -22
  153. data/examples/basic_run.rb +0 -12
  154. data/examples/basic_simple_data_writer.rb +0 -14
  155. data/examples/basic_stdout.rb +0 -8
  156. data/examples/basic_test_data.rb +0 -15
  157. data/examples/basic_testplan.jmx +0 -138
  158. data/examples/basic_testplan.rb +0 -44
  159. data/examples/jbhifi_now_search.rb +0 -94
  160. data/lib/gridinit-jmeter/assertions/response_assertion.rb +0 -55
  161. data/lib/gridinit-jmeter/config/auth_manager.rb +0 -26
  162. data/lib/gridinit-jmeter/config/cache_manager.rb +0 -20
  163. data/lib/gridinit-jmeter/config/cookie_manager.rb +0 -21
  164. data/lib/gridinit-jmeter/config/counter_config.rb +0 -24
  165. data/lib/gridinit-jmeter/config/header_manager.rb +0 -26
  166. data/lib/gridinit-jmeter/config/random_variable.rb +0 -24
  167. data/lib/gridinit-jmeter/config/request_defaults.rb +0 -31
  168. data/lib/gridinit-jmeter/config/user_defined_variable.rb +0 -25
  169. data/lib/gridinit-jmeter/controllers/if_controller.rb +0 -20
  170. data/lib/gridinit-jmeter/controllers/interleave.rb +0 -18
  171. data/lib/gridinit-jmeter/controllers/loop_controller.rb +0 -19
  172. data/lib/gridinit-jmeter/controllers/once_only.rb +0 -17
  173. data/lib/gridinit-jmeter/controllers/random_order.rb +0 -16
  174. data/lib/gridinit-jmeter/controllers/simple.rb +0 -17
  175. data/lib/gridinit-jmeter/controllers/switch.rb +0 -20
  176. data/lib/gridinit-jmeter/controllers/throughput.rb +0 -26
  177. data/lib/gridinit-jmeter/controllers/transaction.rb +0 -19
  178. data/lib/gridinit-jmeter/controllers/while_controller.rb +0 -18
  179. data/lib/gridinit-jmeter/helpers/dsl_helper.rb +0 -21
  180. data/lib/gridinit-jmeter/idl/http_authorization_manager.rb +0 -26
  181. data/lib/gridinit-jmeter/idl/user_defined_variables.rb +0 -26
  182. data/lib/gridinit-jmeter/listeners/aggregate_report.rb +0 -47
  183. data/lib/gridinit-jmeter/listeners/graph_visualizer.rb +0 -46
  184. data/lib/gridinit-jmeter/listeners/response_time_graph_visualizer.rb +0 -47
  185. data/lib/gridinit-jmeter/listeners/simple_data_writer.rb +0 -51
  186. data/lib/gridinit-jmeter/listeners/stat_visualizer.rb +0 -46
  187. data/lib/gridinit-jmeter/listeners/summary_report.rb +0 -46
  188. data/lib/gridinit-jmeter/listeners/table_visualizer.rb +0 -46
  189. data/lib/gridinit-jmeter/listeners/view_results_full_visualizer.rb +0 -57
  190. data/lib/gridinit-jmeter/post_processors/regex_extractor.rb +0 -34
  191. data/lib/gridinit-jmeter/post_processors/xpath_extractor.rb +0 -23
  192. data/lib/gridinit-jmeter/pre_processors/bean_shell_pre_processor.rb +0 -23
  193. data/lib/gridinit-jmeter/samplers/http_sampler.rb +0 -99
  194. data/lib/gridinit-jmeter/samplers/ldap_ext_sampler.rb +0 -36
  195. data/lib/gridinit-jmeter/samplers/soap_sampler.rb +0 -26
  196. data/lib/gridinit-jmeter/test_plan/test_plan.rb +0 -23
  197. data/lib/gridinit-jmeter/threads/thread_group.rb +0 -30
  198. data/lib/gridinit-jmeter/timers/gaussian_random_timer.rb +0 -18
@@ -1,23 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class TestPlan
5
- attr_accessor :doc
6
- include Helper
7
- def initialize
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
10
- <stringProp name="TestPlan.comments"></stringProp>
11
- <boolProp name="TestPlan.functional_mode">false</boolProp>
12
- <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
13
- <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
14
- <collectionProp name="Arguments.arguments"/>
15
- </elementProp>
16
- <stringProp name="TestPlan.user_define_classpath"></stringProp>
17
- </TestPlan>
18
- EOF
19
- end
20
- end
21
-
22
- end
23
- end
@@ -1,30 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class ThreadGroup
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(num_threads, params={})
8
- params[:ramp_time] ||= num_threads/2
9
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
10
- <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
11
- <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
12
- <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
13
- <boolProp name="LoopController.continue_forever">false</boolProp>
14
- <stringProp name="LoopController.loops">1</stringProp>
15
- </elementProp>
16
- <stringProp name="ThreadGroup.num_threads">#{num_threads}</stringProp>
17
- <stringProp name="ThreadGroup.ramp_time">#{params[:ramp_time]}</stringProp>
18
- <longProp name="ThreadGroup.start_time">#{Time.now.to_i * 1000}</longProp>
19
- <longProp name="ThreadGroup.end_time">#{Time.now.to_i * 1000}</longProp>
20
- <boolProp name="ThreadGroup.scheduler">true</boolProp>
21
- <stringProp name="ThreadGroup.duration"></stringProp>
22
- <stringProp name="ThreadGroup.delay"></stringProp>
23
- </ThreadGroup>
24
- EOF
25
- update params
26
- end
27
- end
28
-
29
- end
30
- end
@@ -1,18 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class GaussianRandomTimer
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(delay, range)
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Think Time" enabled="true">
10
- <stringProp name="ConstantTimer.delay">#{delay}</stringProp>
11
- <stringProp name="RandomTimer.range">#{range}</stringProp>
12
- </GaussianRandomTimer>
13
- EOF
14
- end
15
- end
16
-
17
- end
18
- end