gridinit-jmeter 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/lib/gridinit-jmeter/controllers/if_controller.rb +2 -2
  2. data/lib/gridinit-jmeter/idl.rb +63 -0
  3. data/lib/gridinit-jmeter/{dsl.xml → idl.xml} +0 -0
  4. data/lib/gridinit-jmeter/idl/access_log_sampler.rb +33 -0
  5. data/lib/gridinit-jmeter/idl/aggregate_graph.rb +56 -0
  6. data/lib/gridinit-jmeter/idl/aggregate_report.rb +56 -0
  7. data/lib/gridinit-jmeter/idl/ajp13_sampler.rb +42 -0
  8. data/lib/gridinit-jmeter/idl/assertion_results.rb +56 -0
  9. data/lib/gridinit-jmeter/idl/beanshell_assertion.rb +29 -0
  10. data/lib/gridinit-jmeter/idl/beanshell_listener.rb +29 -0
  11. data/lib/gridinit-jmeter/idl/beanshell_postprocessor.rb +29 -0
  12. data/lib/gridinit-jmeter/idl/beanshell_preprocessor.rb +29 -0
  13. data/lib/gridinit-jmeter/idl/beanshell_sampler.rb +29 -0
  14. data/lib/gridinit-jmeter/idl/beanshell_timer.rb +29 -0
  15. data/lib/gridinit-jmeter/idl/bsf_assertion.rb +29 -0
  16. data/lib/gridinit-jmeter/idl/bsf_listener.rb +29 -0
  17. data/lib/gridinit-jmeter/idl/bsf_postprocessor.rb +29 -0
  18. data/lib/gridinit-jmeter/idl/bsf_preprocessor.rb +29 -0
  19. data/lib/gridinit-jmeter/idl/bsf_sampler.rb +29 -0
  20. data/lib/gridinit-jmeter/idl/bsf_timer.rb +29 -0
  21. data/lib/gridinit-jmeter/idl/compare_assertion.rb +28 -0
  22. data/lib/gridinit-jmeter/idl/comparison_assertion_visualizer.rb +56 -0
  23. data/lib/gridinit-jmeter/idl/constant_throughput_timer.rb +31 -0
  24. data/lib/gridinit-jmeter/idl/constant_timer.rb +26 -0
  25. data/lib/gridinit-jmeter/idl/counter.rb +31 -0
  26. data/lib/gridinit-jmeter/idl/cssjquery_extractor.rb +31 -0
  27. data/lib/gridinit-jmeter/idl/csv_data_set_config.rb +33 -0
  28. data/lib/gridinit-jmeter/idl/debug_postprocessor.rb +29 -0
  29. data/lib/gridinit-jmeter/idl/debug_sampler.rb +28 -0
  30. data/lib/gridinit-jmeter/idl/distribution_graphalpha.rb +56 -0
  31. data/lib/gridinit-jmeter/idl/duration_assertion.rb +26 -0
  32. data/lib/gridinit-jmeter/idl/foreach_controller.rb +28 -0
  33. data/lib/gridinit-jmeter/idl/ftp_request.rb +35 -0
  34. data/lib/gridinit-jmeter/idl/ftp_request_defaults.rb +33 -0
  35. data/lib/gridinit-jmeter/idl/gaussian_random_timer.rb +27 -0
  36. data/lib/gridinit-jmeter/idl/generate_summary_results.rb +24 -0
  37. data/lib/gridinit-jmeter/idl/graph_results.rb +56 -0
  38. data/lib/gridinit-jmeter/idl/html_assertion.rb +31 -0
  39. data/lib/gridinit-jmeter/idl/html_link_parser.rb +24 -0
  40. data/lib/gridinit-jmeter/idl/html_parameter_mask.rb +33 -0
  41. data/lib/gridinit-jmeter/idl/http_authorization_manager.rb +26 -0
  42. data/lib/gridinit-jmeter/idl/http_cache_manager.rb +27 -0
  43. data/lib/gridinit-jmeter/idl/http_cookie_manager.rb +27 -0
  44. data/lib/gridinit-jmeter/idl/http_header_manager.rb +26 -0
  45. data/lib/gridinit-jmeter/idl/http_request.rb +42 -0
  46. data/lib/gridinit-jmeter/idl/http_request_defaults.rb +36 -0
  47. data/lib/gridinit-jmeter/idl/http_url_rewriting_modifier.rb +30 -0
  48. data/lib/gridinit-jmeter/idl/if_controller.rb +27 -0
  49. data/lib/gridinit-jmeter/idl/include_controller.rb +26 -0
  50. data/lib/gridinit-jmeter/idl/java_request.rb +70 -0
  51. data/lib/gridinit-jmeter/idl/java_request_defaults.rb +70 -0
  52. data/lib/gridinit-jmeter/idl/jdbc_connection_configuration.rb +38 -0
  53. data/lib/gridinit-jmeter/idl/jdbc_postprocessor.rb +32 -0
  54. data/lib/gridinit-jmeter/idl/jdbc_preprocessor.rb +32 -0
  55. data/lib/gridinit-jmeter/idl/jdbc_request.rb +32 -0
  56. data/lib/gridinit-jmeter/idl/jms_pointtopoint.rb +41 -0
  57. data/lib/gridinit-jmeter/idl/jms_publisher.rb +42 -0
  58. data/lib/gridinit-jmeter/idl/jms_subscriber.rb +36 -0
  59. data/lib/gridinit-jmeter/idl/jsr223_assertion.rb +30 -0
  60. data/lib/gridinit-jmeter/idl/jsr223_listener.rb +30 -0
  61. data/lib/gridinit-jmeter/idl/jsr223_postprocessor.rb +30 -0
  62. data/lib/gridinit-jmeter/idl/jsr223_preprocessor.rb +30 -0
  63. data/lib/gridinit-jmeter/idl/jsr223_sampler.rb +30 -0
  64. data/lib/gridinit-jmeter/idl/jsr223_timer.rb +30 -0
  65. data/lib/gridinit-jmeter/idl/junit_request.rb +38 -0
  66. data/lib/gridinit-jmeter/idl/keystore_configuration.rb +28 -0
  67. data/lib/gridinit-jmeter/idl/ldap_extended_request.rb +43 -0
  68. data/lib/gridinit-jmeter/idl/ldap_extended_request_defaults.rb +43 -0
  69. data/lib/gridinit-jmeter/idl/ldap_request.rb +36 -0
  70. data/lib/gridinit-jmeter/idl/ldap_request_defaults.rb +34 -0
  71. data/lib/gridinit-jmeter/idl/login_config_element.rb +27 -0
  72. data/lib/gridinit-jmeter/idl/loop_controller.rb +27 -0
  73. data/lib/gridinit-jmeter/idl/mail_reader_sampler.rb +38 -0
  74. data/lib/gridinit-jmeter/idl/mailer_visualizer.rb +65 -0
  75. data/lib/gridinit-jmeter/idl/md5hex_assertion.rb +26 -0
  76. data/lib/gridinit-jmeter/idl/module_controller.rb +24 -0
  77. data/lib/gridinit-jmeter/idl/monitor_results.rb +56 -0
  78. data/lib/gridinit-jmeter/idl/once_only_controller.rb +24 -0
  79. data/lib/gridinit-jmeter/idl/os_process_sampler.rb +35 -0
  80. data/lib/gridinit-jmeter/idl/poisson_random_timer.rb +27 -0
  81. data/lib/gridinit-jmeter/idl/random_controller.rb +26 -0
  82. data/lib/gridinit-jmeter/idl/random_order_controller.rb +24 -0
  83. data/lib/gridinit-jmeter/idl/random_variable.rb +31 -0
  84. data/lib/gridinit-jmeter/idl/recording_controller.rb +24 -0
  85. data/lib/gridinit-jmeter/idl/regex_user_parameters.rb +28 -0
  86. data/lib/gridinit-jmeter/idl/regular_expression_extractor.rb +31 -0
  87. data/lib/gridinit-jmeter/idl/response_assertion.rb +29 -0
  88. data/lib/gridinit-jmeter/idl/response_time_graph.rb +56 -0
  89. data/lib/gridinit-jmeter/idl/result_status_action_handler.rb +26 -0
  90. data/lib/gridinit-jmeter/idl/runtime_controller.rb +26 -0
  91. data/lib/gridinit-jmeter/idl/save_responses_to_a_file.rb +30 -0
  92. data/lib/gridinit-jmeter/idl/simple_config_element.rb +24 -0
  93. data/lib/gridinit-jmeter/idl/simple_controller.rb +24 -0
  94. data/lib/gridinit-jmeter/idl/simple_data_writer.rb +56 -0
  95. data/lib/gridinit-jmeter/idl/smime_assertion.rb +36 -0
  96. data/lib/gridinit-jmeter/idl/smtp_sampler.rb +52 -0
  97. data/lib/gridinit-jmeter/idl/soapxmlrpc_request.rb +34 -0
  98. data/lib/gridinit-jmeter/idl/spline_visualizer.rb +56 -0
  99. data/lib/gridinit-jmeter/idl/summary_report.rb +56 -0
  100. data/lib/gridinit-jmeter/idl/switch_controller.rb +26 -0
  101. data/lib/gridinit-jmeter/idl/synchronizing_timer.rb +26 -0
  102. data/lib/gridinit-jmeter/idl/tcp_sampler.rb +34 -0
  103. data/lib/gridinit-jmeter/idl/tcp_sampler_config.rb +32 -0
  104. data/lib/gridinit-jmeter/idl/test_action.rb +28 -0
  105. data/lib/gridinit-jmeter/idl/test_plan.rb +32 -0
  106. data/lib/gridinit-jmeter/idl/thread_group.rb +37 -0
  107. data/lib/gridinit-jmeter/idl/throughput_controller.rb +33 -0
  108. data/lib/gridinit-jmeter/idl/transaction_controller.rb +26 -0
  109. data/lib/gridinit-jmeter/idl/uniform_random_timer.rb +27 -0
  110. data/lib/gridinit-jmeter/idl/user_defined_variables.rb +26 -0
  111. data/lib/gridinit-jmeter/idl/user_parameters.rb +30 -0
  112. data/lib/gridinit-jmeter/idl/view_results_in_table.rb +56 -0
  113. data/lib/gridinit-jmeter/idl/view_results_tree.rb +56 -0
  114. data/lib/gridinit-jmeter/idl/while_controller.rb +26 -0
  115. data/lib/gridinit-jmeter/idl/xml_assertion.rb +24 -0
  116. data/lib/gridinit-jmeter/idl/xml_schema_assertion.rb +26 -0
  117. data/lib/gridinit-jmeter/idl/xpath_assertion.rb +31 -0
  118. data/lib/gridinit-jmeter/idl/xpath_extractor.rb +31 -0
  119. data/lib/gridinit-jmeter/version.rb +1 -1
  120. metadata +120 -7
@@ -0,0 +1,33 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def html_parameter_mask(params={}, &block)
6
+ node = Gridinit::Jmeter::HtmlParameterMask.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HtmlParameterMask
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="#{name}" enabled="true">
18
+ <elementProp name="ParamModifier.mask" elementType="ParamMask">
19
+ <stringProp name="ParamModifier.field_name"/>
20
+ <stringProp name="ParamModifier.prefix"/>
21
+ <longProp name="ParamModifier.lower_bound">0</longProp>
22
+ <longProp name="ParamModifier.upper_bound">10</longProp>
23
+ <longProp name="ParamModifier.increment">1</longProp>
24
+ <stringProp name="ParamModifier.suffix"/>
25
+ </elementProp>
26
+ </ParamModifier>)
27
+ EOS
28
+ update params
29
+ end
30
+ end
31
+
32
+ end
33
+ end
@@ -0,0 +1,26 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_authorization_manager(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpAuthorizationManager.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpAuthorizationManager
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="#{name}" enabled="true">
18
+ <collectionProp name="AuthManager.auth_list"/>
19
+ </AuthManager>)
20
+ EOS
21
+ update params
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,27 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_cache_manager(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpCacheManager.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpCacheManager
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="#{name}" enabled="true">
18
+ <boolProp name="clearEachIteration">false</boolProp>
19
+ <boolProp name="useExpires">false</boolProp>
20
+ </CacheManager>)
21
+ EOS
22
+ update params
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_cookie_manager(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpCookieManager.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpCookieManager
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="#{name}" enabled="true">
18
+ <collectionProp name="CookieManager.cookies"/>
19
+ <boolProp name="CookieManager.clearEachIteration">false</boolProp>
20
+ </CookieManager>)
21
+ EOS
22
+ update params
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_header_manager(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpHeaderManager.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpHeaderManager
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="#{name}" enabled="true">
18
+ <collectionProp name="HeaderManager.headers"/>
19
+ </HeaderManager>)
20
+ EOS
21
+ update params
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,42 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_request(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpRequest.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpRequest
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="#{name}" enabled="true">
18
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{name}" enabled="true">
19
+ <collectionProp name="Arguments.arguments"/>
20
+ </elementProp>
21
+ <stringProp name="HTTPSampler.domain"/>
22
+ <stringProp name="HTTPSampler.port"/>
23
+ <stringProp name="HTTPSampler.connect_timeout"/>
24
+ <stringProp name="HTTPSampler.response_timeout"/>
25
+ <stringProp name="HTTPSampler.protocol"/>
26
+ <stringProp name="HTTPSampler.contentEncoding"/>
27
+ <stringProp name="HTTPSampler.path"/>
28
+ <stringProp name="HTTPSampler.method">GET</stringProp>
29
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
30
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
31
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
32
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
33
+ <boolProp name="HTTPSampler.monitor">false</boolProp>
34
+ <stringProp name="HTTPSampler.embedded_url_re"/>
35
+ </HTTPSamplerProxy>)
36
+ EOS
37
+ update params
38
+ end
39
+ end
40
+
41
+ end
42
+ end
@@ -0,0 +1,36 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_request_defaults(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpRequestDefaults.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpRequestDefaults
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="#{name}" enabled="true">
18
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{name}" enabled="true">
19
+ <collectionProp name="Arguments.arguments"/>
20
+ </elementProp>
21
+ <stringProp name="HTTPSampler.domain"/>
22
+ <stringProp name="HTTPSampler.port"/>
23
+ <stringProp name="HTTPSampler.connect_timeout"/>
24
+ <stringProp name="HTTPSampler.response_timeout"/>
25
+ <stringProp name="HTTPSampler.protocol"/>
26
+ <stringProp name="HTTPSampler.contentEncoding"/>
27
+ <stringProp name="HTTPSampler.path"/>
28
+ <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
29
+ </ConfigTestElement>)
30
+ EOS
31
+ update params
32
+ end
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,30 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def http_url_rewriting_modifier(params={}, &block)
6
+ node = Gridinit::Jmeter::HttpUrlRewritingModifier.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class HttpUrlRewritingModifier
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <URLRewritingModifier guiclass="URLRewritingModifierGui" testclass="URLRewritingModifier" testname="#{name}" enabled="true">
18
+ <stringProp name="argument_name"/>
19
+ <boolProp name="path_extension">false</boolProp>
20
+ <boolProp name="path_extension_no_equals">false</boolProp>
21
+ <boolProp name="path_extension_no_questionmark">false</boolProp>
22
+ <boolProp name="cache_value">false</boolProp>
23
+ </URLRewritingModifier>)
24
+ EOS
25
+ update params
26
+ end
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def if_controller(params={}, &block)
6
+ node = Gridinit::Jmeter::IfController.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class IfController
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <IfController guiclass="IfControllerPanel" testclass="IfController" testname="#{name}" enabled="true">
18
+ <stringProp name="IfController.condition"/>
19
+ <boolProp name="IfController.evaluateAll">false</boolProp>
20
+ </IfController>)
21
+ EOS
22
+ update params
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def include_controller(params={}, &block)
6
+ node = Gridinit::Jmeter::IncludeController.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class IncludeController
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="#{name}" enabled="true">
18
+ <stringProp name="IncludeController.includepath"/>
19
+ </IncludeController>)
20
+ EOS
21
+ update params
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,70 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def java_request(params={}, &block)
6
+ node = Gridinit::Jmeter::JavaRequest.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class JavaRequest
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="#{name}" enabled="true">
18
+ <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
19
+ <collectionProp name="Arguments.arguments">
20
+ <elementProp name="Sleep_Time" elementType="Argument">
21
+ <stringProp name="Argument.name">Sleep_Time</stringProp>
22
+ <stringProp name="Argument.value">100</stringProp>
23
+ <stringProp name="Argument.metadata">=</stringProp>
24
+ </elementProp>
25
+ <elementProp name="Sleep_Mask" elementType="Argument">
26
+ <stringProp name="Argument.name">Sleep_Mask</stringProp>
27
+ <stringProp name="Argument.value">0xFF</stringProp>
28
+ <stringProp name="Argument.metadata">=</stringProp>
29
+ </elementProp>
30
+ <elementProp name="Label" elementType="Argument">
31
+ <stringProp name="Argument.name">Label</stringProp>
32
+ <stringProp name="Argument.value"/>
33
+ <stringProp name="Argument.metadata">=</stringProp>
34
+ </elementProp>
35
+ <elementProp name="ResponseCode" elementType="Argument">
36
+ <stringProp name="Argument.name">ResponseCode</stringProp>
37
+ <stringProp name="Argument.value"/>
38
+ <stringProp name="Argument.metadata">=</stringProp>
39
+ </elementProp>
40
+ <elementProp name="ResponseMessage" elementType="Argument">
41
+ <stringProp name="Argument.name">ResponseMessage</stringProp>
42
+ <stringProp name="Argument.value"/>
43
+ <stringProp name="Argument.metadata">=</stringProp>
44
+ </elementProp>
45
+ <elementProp name="Status" elementType="Argument">
46
+ <stringProp name="Argument.name">Status</stringProp>
47
+ <stringProp name="Argument.value">OK</stringProp>
48
+ <stringProp name="Argument.metadata">=</stringProp>
49
+ </elementProp>
50
+ <elementProp name="SamplerData" elementType="Argument">
51
+ <stringProp name="Argument.name">SamplerData</stringProp>
52
+ <stringProp name="Argument.value"/>
53
+ <stringProp name="Argument.metadata">=</stringProp>
54
+ </elementProp>
55
+ <elementProp name="ResultData" elementType="Argument">
56
+ <stringProp name="Argument.name">ResultData</stringProp>
57
+ <stringProp name="Argument.value"/>
58
+ <stringProp name="Argument.metadata">=</stringProp>
59
+ </elementProp>
60
+ </collectionProp>
61
+ </elementProp>
62
+ <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
63
+ </JavaSampler>)
64
+ EOS
65
+ update params
66
+ end
67
+ end
68
+
69
+ end
70
+ end
@@ -0,0 +1,70 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class DSL
5
+ def java_request_defaults(params={}, &block)
6
+ node = Gridinit::Jmeter::JavaRequestDefaults.new(params)
7
+ attach_node(node, &block)
8
+ end
9
+ end
10
+
11
+ class JavaRequestDefaults
12
+ attr_accessor :doc
13
+ include Helper
14
+
15
+ def initialize(name, params={})
16
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
17
+ <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="#{name}" enabled="true">
18
+ <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
19
+ <collectionProp name="Arguments.arguments">
20
+ <elementProp name="Sleep_Time" elementType="Argument">
21
+ <stringProp name="Argument.name">Sleep_Time</stringProp>
22
+ <stringProp name="Argument.value">100</stringProp>
23
+ <stringProp name="Argument.metadata">=</stringProp>
24
+ </elementProp>
25
+ <elementProp name="Sleep_Mask" elementType="Argument">
26
+ <stringProp name="Argument.name">Sleep_Mask</stringProp>
27
+ <stringProp name="Argument.value">0xFF</stringProp>
28
+ <stringProp name="Argument.metadata">=</stringProp>
29
+ </elementProp>
30
+ <elementProp name="Label" elementType="Argument">
31
+ <stringProp name="Argument.name">Label</stringProp>
32
+ <stringProp name="Argument.value"/>
33
+ <stringProp name="Argument.metadata">=</stringProp>
34
+ </elementProp>
35
+ <elementProp name="ResponseCode" elementType="Argument">
36
+ <stringProp name="Argument.name">ResponseCode</stringProp>
37
+ <stringProp name="Argument.value"/>
38
+ <stringProp name="Argument.metadata">=</stringProp>
39
+ </elementProp>
40
+ <elementProp name="ResponseMessage" elementType="Argument">
41
+ <stringProp name="Argument.name">ResponseMessage</stringProp>
42
+ <stringProp name="Argument.value"/>
43
+ <stringProp name="Argument.metadata">=</stringProp>
44
+ </elementProp>
45
+ <elementProp name="Status" elementType="Argument">
46
+ <stringProp name="Argument.name">Status</stringProp>
47
+ <stringProp name="Argument.value">OK</stringProp>
48
+ <stringProp name="Argument.metadata">=</stringProp>
49
+ </elementProp>
50
+ <elementProp name="SamplerData" elementType="Argument">
51
+ <stringProp name="Argument.name">SamplerData</stringProp>
52
+ <stringProp name="Argument.value"/>
53
+ <stringProp name="Argument.metadata">=</stringProp>
54
+ </elementProp>
55
+ <elementProp name="ResultData" elementType="Argument">
56
+ <stringProp name="Argument.name">ResultData</stringProp>
57
+ <stringProp name="Argument.value"/>
58
+ <stringProp name="Argument.metadata">=</stringProp>
59
+ </elementProp>
60
+ </collectionProp>
61
+ </elementProp>
62
+ <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
63
+ </JavaConfig>)
64
+ EOS
65
+ update params
66
+ end
67
+ end
68
+
69
+ end
70
+ end