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,47 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class AggregateReport
5
- attr_accessor :doc
6
- include Helper
7
-
8
- def initialize(name, params={})
9
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
10
- <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
11
- <boolProp name="ResultCollector.error_logging">false</boolProp>
12
- <objProp>
13
- <name>saveConfig</name>
14
- <value class="SampleSaveConfiguration">
15
- <time>true</time>
16
- <latency>true</latency>
17
- <timestamp>true</timestamp>
18
- <success>true</success>
19
- <label>true</label>
20
- <code>true</code>
21
- <message>true</message>
22
- <threadName>true</threadName>
23
- <dataType>true</dataType>
24
- <encoding>false</encoding>
25
- <assertions>true</assertions>
26
- <subresults>true</subresults>
27
- <responseData>false</responseData>
28
- <samplerData>false</samplerData>
29
- <xml>false</xml>
30
- <fieldNames>false</fieldNames>
31
- <responseHeaders>false</responseHeaders>
32
- <requestHeaders>false</requestHeaders>
33
- <responseDataOnError>false</responseDataOnError>
34
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
35
- <assertionsResultsToSave>0</assertionsResultsToSave>
36
- <bytes>true</bytes>
37
- </value>
38
- </objProp>
39
- <stringProp name="filename"></stringProp>
40
- </ResultCollector>
41
- EOF
42
- update params
43
- end
44
- end
45
-
46
- end
47
- end
@@ -1,46 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class GraphVisualizer
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
10
- <boolProp name="ResultCollector.error_logging">false</boolProp>
11
- <objProp>
12
- <name>saveConfig</name>
13
- <value class="SampleSaveConfiguration">
14
- <time>true</time>
15
- <latency>true</latency>
16
- <timestamp>true</timestamp>
17
- <success>true</success>
18
- <label>true</label>
19
- <code>true</code>
20
- <message>true</message>
21
- <threadName>true</threadName>
22
- <dataType>true</dataType>
23
- <encoding>false</encoding>
24
- <assertions>true</assertions>
25
- <subresults>true</subresults>
26
- <responseData>false</responseData>
27
- <samplerData>false</samplerData>
28
- <xml>true</xml>
29
- <fieldNames>false</fieldNames>
30
- <responseHeaders>false</responseHeaders>
31
- <requestHeaders>false</requestHeaders>
32
- <responseDataOnError>false</responseDataOnError>
33
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
34
- <assertionsResultsToSave>0</assertionsResultsToSave>
35
- <bytes>true</bytes>
36
- </value>
37
- </objProp>
38
- <stringProp name="filename"></stringProp>
39
- </ResultCollector>
40
- EOF
41
- update params
42
- end
43
- end
44
-
45
- end
46
- end
@@ -1,47 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class ResponseTimeGraphVisualizer
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
-
10
- <ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
11
- <boolProp name="ResultCollector.error_logging">false</boolProp>
12
- <objProp>
13
- <name>saveConfig</name>
14
- <value class="SampleSaveConfiguration">
15
- <time>true</time>
16
- <latency>true</latency>
17
- <timestamp>true</timestamp>
18
- <success>true</success>
19
- <label>true</label>
20
- <code>true</code>
21
- <message>true</message>
22
- <threadName>true</threadName>
23
- <dataType>true</dataType>
24
- <encoding>false</encoding>
25
- <assertions>true</assertions>
26
- <subresults>true</subresults>
27
- <responseData>false</responseData>
28
- <samplerData>false</samplerData>
29
- <xml>true</xml>
30
- <fieldNames>false</fieldNames>
31
- <responseHeaders>false</responseHeaders>
32
- <requestHeaders>false</requestHeaders>
33
- <responseDataOnError>false</responseDataOnError>
34
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
35
- <assertionsResultsToSave>0</assertionsResultsToSave>
36
- <bytes>true</bytes>
37
- </value>
38
- </objProp>
39
- <stringProp name="filename"></stringProp>
40
- </ResultCollector>
41
- EOF
42
- update params
43
- end
44
- end
45
-
46
- end
47
- end
@@ -1,51 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class SimpleDataWriter
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
10
- <boolProp name="ResultCollector.error_logging">false</boolProp>
11
- <objProp>
12
- <name>saveConfig</name>
13
- <value class="SampleSaveConfiguration">
14
- <time>true</time>
15
- <latency>true</latency>
16
- <timestamp>true</timestamp>
17
- <success>true</success>
18
- <label>true</label>
19
- <code>true</code>
20
- <message>true</message>
21
- <threadName>true</threadName>
22
- <dataType>false</dataType>
23
- <encoding>false</encoding>
24
- <assertions>false</assertions>
25
- <subresults>true</subresults>
26
- <responseData>false</responseData>
27
- <samplerData>false</samplerData>
28
- <xml>true</xml>
29
- <fieldNames>false</fieldNames>
30
- <responseHeaders>true</responseHeaders>
31
- <requestHeaders>false</requestHeaders>
32
- <responseDataOnError>false</responseDataOnError>
33
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
34
- <assertionsResultsToSave>0</assertionsResultsToSave>
35
- <bytes>true</bytes>
36
- <url>true</url>
37
- <hostname>true</hostname>
38
- <threadCounts>true</threadCounts>
39
- <sampleCount>true</sampleCount>
40
- <idleTime>true</idleTime>
41
- </value>
42
- </objProp>
43
- <stringProp name="filename">/var/log/gridnode/stderr.log</stringProp>
44
- </ResultCollector>
45
- EOF
46
- update params
47
- end
48
- end
49
-
50
- end
51
- end
@@ -1,46 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class StatVisualizer
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
10
- <boolProp name="ResultCollector.error_logging">false</boolProp>
11
- <objProp>
12
- <name>saveConfig</name>
13
- <value class="SampleSaveConfiguration">
14
- <time>true</time>
15
- <latency>true</latency>
16
- <timestamp>true</timestamp>
17
- <success>true</success>
18
- <label>true</label>
19
- <code>true</code>
20
- <message>true</message>
21
- <threadName>true</threadName>
22
- <dataType>true</dataType>
23
- <encoding>false</encoding>
24
- <assertions>true</assertions>
25
- <subresults>true</subresults>
26
- <responseData>false</responseData>
27
- <samplerData>false</samplerData>
28
- <xml>true</xml>
29
- <fieldNames>false</fieldNames>
30
- <responseHeaders>false</responseHeaders>
31
- <requestHeaders>false</requestHeaders>
32
- <responseDataOnError>false</responseDataOnError>
33
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
34
- <assertionsResultsToSave>0</assertionsResultsToSave>
35
- <bytes>true</bytes>
36
- </value>
37
- </objProp>
38
- <stringProp name="filename"></stringProp>
39
- </ResultCollector>
40
- EOF
41
- update params
42
- end
43
- end
44
-
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class SummaryReport
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
10
- <boolProp name="ResultCollector.error_logging">false</boolProp>
11
- <objProp>
12
- <name>saveConfig</name>
13
- <value class="SampleSaveConfiguration">
14
- <time>true</time>
15
- <latency>true</latency>
16
- <timestamp>true</timestamp>
17
- <success>true</success>
18
- <label>true</label>
19
- <code>true</code>
20
- <message>true</message>
21
- <threadName>true</threadName>
22
- <dataType>true</dataType>
23
- <encoding>false</encoding>
24
- <assertions>true</assertions>
25
- <subresults>true</subresults>
26
- <responseData>false</responseData>
27
- <samplerData>false</samplerData>
28
- <xml>true</xml>
29
- <fieldNames>false</fieldNames>
30
- <responseHeaders>false</responseHeaders>
31
- <requestHeaders>false</requestHeaders>
32
- <responseDataOnError>false</responseDataOnError>
33
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
34
- <assertionsResultsToSave>0</assertionsResultsToSave>
35
- <bytes>true</bytes>
36
- </value>
37
- </objProp>
38
- <stringProp name="filename"></stringProp>
39
- </ResultCollector>
40
- EOF
41
- update params
42
- end
43
- end
44
-
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class TableVisualizer
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
10
- <boolProp name="ResultCollector.error_logging">false</boolProp>
11
- <objProp>
12
- <name>saveConfig</name>
13
- <value class="SampleSaveConfiguration">
14
- <time>true</time>
15
- <latency>true</latency>
16
- <timestamp>true</timestamp>
17
- <success>true</success>
18
- <label>true</label>
19
- <code>true</code>
20
- <message>true</message>
21
- <threadName>true</threadName>
22
- <dataType>true</dataType>
23
- <encoding>false</encoding>
24
- <assertions>true</assertions>
25
- <subresults>true</subresults>
26
- <responseData>false</responseData>
27
- <samplerData>false</samplerData>
28
- <xml>true</xml>
29
- <fieldNames>false</fieldNames>
30
- <responseHeaders>false</responseHeaders>
31
- <requestHeaders>false</requestHeaders>
32
- <responseDataOnError>false</responseDataOnError>
33
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
34
- <assertionsResultsToSave>0</assertionsResultsToSave>
35
- <bytes>true</bytes>
36
- </value>
37
- </objProp>
38
- <stringProp name="filename"></stringProp>
39
- </ResultCollector>
40
- EOF
41
- update params
42
- end
43
- end
44
-
45
- end
46
- end
@@ -1,57 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class ViewResultsFullVisualizer
5
- attr_accessor :doc
6
- include Helper
7
-
8
- def initialize(name, params={})
9
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
10
- <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="#{name}" enabled="#{enabled(params)}">
11
- <boolProp name="ResultCollector.error_logging">#{error_only(params)}</boolProp>
12
- <objProp>
13
- <name>saveConfig</name>
14
- <value class="SampleSaveConfiguration">
15
- <time>true</time>
16
- <latency>true</latency>
17
- <timestamp>true</timestamp>
18
- <success>true</success>
19
- <label>true</label>
20
- <code>true</code>
21
- <message>true</message>
22
- <threadName>true</threadName>
23
- <dataType>true</dataType>
24
- <encoding>false</encoding>
25
- <assertions>true</assertions>
26
- <subresults>true</subresults>
27
- <responseData>false</responseData>
28
- <samplerData>false</samplerData>
29
- <xml>true</xml>
30
- <fieldNames>false</fieldNames>
31
- <responseHeaders>false</responseHeaders>
32
- <requestHeaders>false</requestHeaders>
33
- <responseDataOnError>false</responseDataOnError>
34
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
35
- <assertionsResultsToSave>0</assertionsResultsToSave>
36
- <bytes>true</bytes>
37
- </value>
38
- </objProp>
39
- <stringProp name="filename"></stringProp>
40
- </ResultCollector>
41
- EOF
42
- update params
43
- end
44
-
45
- def error_only(params)
46
- #default to true unless explicitly set to false
47
- if params.has_key?(:error_only) && params[:error_only] == true
48
- 'true'
49
- else
50
- 'false'
51
- end
52
- end
53
- end
54
-
55
-
56
- end
57
- end
@@ -1,34 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class RegexExtractor
5
- attr_accessor :doc
6
- include Helper
7
-
8
- def initialize(name, regex, params={})
9
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
10
- <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="#{name}" enabled="true">
11
- <stringProp name="RegexExtractor.useHeaders">#{use_headers_type(params)}</stringProp>
12
- <stringProp name="RegexExtractor.refname">#{name}</stringProp>
13
- <stringProp name="RegexExtractor.regex">#{CGI.escapeHTML regex}</stringProp>
14
- <stringProp name="RegexExtractor.template">$1$</stringProp>
15
- <stringProp name="RegexExtractor.default">#{params[:default]}</stringProp>
16
- <stringProp name="RegexExtractor.match_number">0</stringProp>
17
- <stringProp name="Sample.scope">all</stringProp>
18
- </RegexExtractor>
19
- EOF
20
- update params
21
- end
22
-
23
- def use_headers_type(params)
24
- #default to true unless explicitly set to false
25
- if params.has_key?(:match_on)
26
- params[:match_on]
27
- else
28
- 'false'
29
- end
30
- end
31
- end
32
-
33
- end
34
- end
@@ -1,23 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class XpathExtractor
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, xpath, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <XPathExtractor guiclass="XPathExtractorGui" testclass="XPathExtractor" testname="#{name}" enabled="true">
10
- <stringProp name="XPathExtractor.default"></stringProp>
11
- <stringProp name="XPathExtractor.refname">#{name}</stringProp>
12
- <stringProp name="XPathExtractor.xpathQuery">#{xpath}</stringProp>
13
- <boolProp name="XPathExtractor.validate">false</boolProp>
14
- <boolProp name="XPathExtractor.tolerant">false</boolProp>
15
- <boolProp name="XPathExtractor.namespace">false</boolProp>
16
- </XPathExtractor>
17
- EOF
18
- update params
19
- end
20
- end
21
-
22
- end
23
- end
@@ -1,23 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class BeanShellPreProcessor
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(script, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true">
10
- <stringProp name="filename"></stringProp>
11
- <stringProp name="parameters"></stringProp>
12
- <boolProp name="resetInterpreter">false</boolProp>
13
- <stringProp name="script"><![CDATA[
14
- #{script}
15
- ]]></stringProp>
16
- </BeanShellPreProcessor>
17
- EOF
18
- update params
19
- end
20
- end
21
-
22
- end
23
- end
@@ -1,99 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class HttpSampler
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, url, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="#{name}" enabled="true">
10
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
11
- <collectionProp name="Arguments.arguments"/>
12
- </elementProp>
13
- <stringProp name="HTTPSampler.domain"></stringProp>
14
- <stringProp name="HTTPSampler.port"></stringProp>
15
- <stringProp name="HTTPSampler.connect_timeout"></stringProp>
16
- <stringProp name="HTTPSampler.response_timeout"></stringProp>
17
- <stringProp name="HTTPSampler.protocol"></stringProp>
18
- <stringProp name="HTTPSampler.contentEncoding"></stringProp>
19
- <stringProp name="HTTPSampler.path">/</stringProp>
20
- <stringProp name="HTTPSampler.method">GET</stringProp>
21
- <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
22
- <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
23
- <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
24
- <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
25
- <boolProp name="HTTPSampler.monitor">false</boolProp>
26
- <boolProp name="HTTPSampler.image_parser">false</boolProp>
27
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
28
- <boolProp name="HTTPSampler.concurrentDwn">false</boolProp>
29
- <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
30
- </HTTPSamplerProxy>
31
- EOF
32
- parse_url(url, params) unless url.empty?
33
- fill_in(params) if params[:fill_in]
34
- raw_body(params) if params[:raw_body]
35
- if params[:raw_path]
36
- params[:path] = url
37
- else
38
- params[:params] && params[:params].split('&').each do |param|
39
- name,value = param.split('=')
40
- fill_in({ :fill_in => { "#{name}" => value }, :always_encode => params[:always_encode] })
41
- end
42
- end
43
-
44
- update params
45
- end
46
-
47
- def parse_uri(url)
48
- URI.parse(URI::encode(url)).scheme.nil? ? URI.parse(URI::encode("http://#{url}")) : URI.parse(URI::encode(url))
49
- end
50
-
51
- def parse_url(url, params)
52
- if url[0] == '$'
53
- params[:path] = url # special case for named expressions
54
- else
55
- uri = parse_uri(url)
56
- params[:port] ||= uri.port unless URI.parse(URI::encode(url)).scheme.nil?
57
- params[:protocol] ||= uri.scheme unless URI.parse(URI::encode(url)).scheme.nil?
58
- params[:domain] ||= uri.host
59
- params[:path] ||= uri.path && URI::decode(uri.path)
60
- params[:params] ||= uri.query && URI::decode(uri.query)
61
- end
62
- end
63
-
64
- def fill_in(params)
65
- params[:fill_in].each do |name, value|
66
- @doc.at_xpath('//collectionProp') <<
67
- Nokogiri::XML(<<-EOF.strip_heredoc).children
68
- <elementProp name="#{name}" elementType="HTTPArgument">
69
- <boolProp name="HTTPArgument.always_encode">#{params[:always_encode] ? 'true' : false}</boolProp>
70
- <stringProp name="Argument.value">#{value}</stringProp>
71
- <stringProp name="Argument.metadata">=</stringProp>
72
- <boolProp name="HTTPArgument.use_equals">true</boolProp>
73
- <stringProp name="Argument.name">#{name}</stringProp>
74
- </elementProp>
75
- EOF
76
- end
77
- params.delete :fill_in
78
- end
79
-
80
- def raw_body(params)
81
- @doc.at_xpath('//HTTPSamplerProxy') <<
82
- Nokogiri::XML(<<-EOF.strip_heredoc).children
83
- <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
84
- EOF
85
- @doc.at_xpath('//collectionProp') <<
86
- Nokogiri::XML(<<-EOF.strip_heredoc).children
87
- <elementProp name="" elementType="HTTPArgument">
88
- <boolProp name="HTTPArgument.always_encode">false</boolProp>
89
- <stringProp name="Argument.value">#{params[:raw_body]}</stringProp>
90
- <stringProp name="Argument.metadata">=</stringProp>
91
- </elementProp>
92
- EOF
93
- params.delete :raw_body
94
- end
95
-
96
- end
97
-
98
- end
99
- end
@@ -1,36 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class LDAPExtSampler
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <LDAPExtSampler guiclass="LdapExtTestSamplerGui" testclass="LDAPExtSampler" testname="#{name}" enabled="true">
10
- <stringProp name="servername"></stringProp>
11
- <stringProp name="port">389</stringProp>
12
- <stringProp name="rootdn"></stringProp>
13
- <stringProp name="scope">2</stringProp>
14
- <stringProp name="countlimit"></stringProp>
15
- <stringProp name="timelimit"></stringProp>
16
- <stringProp name="attributes"></stringProp>
17
- <stringProp name="return_object">false</stringProp>
18
- <stringProp name="deref_aliases">false</stringProp>
19
- <stringProp name="connection_timeout"></stringProp>
20
- <stringProp name="parseflag">false</stringProp>
21
- <stringProp name="secure">false</stringProp>
22
- <stringProp name="user_dn"></stringProp>
23
- <stringProp name="user_pw"></stringProp>
24
- <stringProp name="comparedn"></stringProp>
25
- <stringProp name="comparefilt"></stringProp>
26
- <stringProp name="modddn"></stringProp>
27
- <stringProp name="newdn"></stringProp>
28
- <stringProp name="test">bind</stringProp>
29
- </LDAPExtSampler>
30
- EOF
31
- update params
32
- end
33
- end
34
-
35
- end
36
- end
@@ -1,26 +0,0 @@
1
- module Gridinit
2
- module Jmeter
3
-
4
- class SoapSampler
5
- attr_accessor :doc
6
- include Helper
7
- def initialize(name, params={})
8
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
- <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="#{name}" enabled="true">
10
- <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
11
- <collectionProp name="Arguments.arguments"/>
12
- </elementProp>
13
- <stringProp name="SoapSampler.URL_DATA"></stringProp>
14
- <stringProp name="HTTPSamper.xml_data"></stringProp>
15
- <stringProp name="SoapSampler.xml_data_file"></stringProp>
16
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
17
- <stringProp name="SoapSampler.SEND_SOAP_ACTION">true</stringProp>
18
- <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
19
- </SoapSampler>
20
- EOF
21
- update params
22
- end
23
- end
24
-
25
- end
26
- end