ruby-jmeter 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/basic_header.rb +5 -1
- data/examples/basic_user_defined_variables.rb +10 -0
- data/lib/ruby-jmeter/dsl/access_log_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/aggregate_graph.rb +3 -3
- data/lib/ruby-jmeter/dsl/aggregate_report.rb +3 -3
- data/lib/ruby-jmeter/dsl/ajp13_sampler.rb +4 -4
- data/lib/ruby-jmeter/dsl/assertion_results.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_listener.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_postprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_preprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/beanshell_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_listener.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_postprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_preprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/bsf_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/compare_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/comparison_assertion_visualizer.rb +3 -3
- data/lib/ruby-jmeter/dsl/constant_throughput_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/constant_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/counter.rb +3 -3
- data/lib/ruby-jmeter/dsl/cssjquery_extractor.rb +3 -3
- data/lib/ruby-jmeter/dsl/csv_data_set_config.rb +3 -3
- data/lib/ruby-jmeter/dsl/debug_postprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/debug_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/distribution_graphalpha.rb +3 -3
- data/lib/ruby-jmeter/dsl/duration_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/foreach_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/ftp_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/ftp_request_defaults.rb +3 -3
- data/lib/ruby-jmeter/dsl/gaussian_random_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/generate_summary_results.rb +3 -3
- data/lib/ruby-jmeter/dsl/graph_results.rb +3 -3
- data/lib/ruby-jmeter/dsl/html_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/html_link_parser.rb +3 -3
- data/lib/ruby-jmeter/dsl/html_parameter_mask.rb +3 -3
- data/lib/ruby-jmeter/dsl/http_authorization_manager.rb +3 -3
- data/lib/ruby-jmeter/dsl/http_cache_manager.rb +3 -3
- data/lib/ruby-jmeter/dsl/http_cookie_manager.rb +3 -3
- data/lib/ruby-jmeter/dsl/http_header_manager.rb +3 -3
- data/lib/ruby-jmeter/dsl/http_request.rb +4 -4
- data/lib/ruby-jmeter/dsl/http_request_defaults.rb +4 -4
- data/lib/ruby-jmeter/dsl/http_url_rewriting_modifier.rb +3 -3
- data/lib/ruby-jmeter/dsl/if_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/include_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/java_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/java_request_defaults.rb +3 -3
- data/lib/ruby-jmeter/dsl/jdbc_connection_configuration.rb +3 -3
- data/lib/ruby-jmeter/dsl/jdbc_postprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/jdbc_preprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/jdbc_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/jms_pointtopoint.rb +5 -5
- data/lib/ruby-jmeter/dsl/jms_publisher.rb +4 -4
- data/lib/ruby-jmeter/dsl/jms_subscriber.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_listener.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_postprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_preprocessor.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/jsr223_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/junit_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/keystore_configuration.rb +3 -3
- data/lib/ruby-jmeter/dsl/ldap_extended_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/ldap_extended_request_defaults.rb +3 -3
- data/lib/ruby-jmeter/dsl/ldap_request.rb +4 -4
- data/lib/ruby-jmeter/dsl/ldap_request_defaults.rb +4 -4
- data/lib/ruby-jmeter/dsl/login_config_element.rb +3 -3
- data/lib/ruby-jmeter/dsl/loop_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/mail_reader_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/mailer_visualizer.rb +3 -3
- data/lib/ruby-jmeter/dsl/md5hex_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/module_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/monitor_results.rb +3 -3
- data/lib/ruby-jmeter/dsl/once_only_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/os_process_sampler.rb +5 -5
- data/lib/ruby-jmeter/dsl/poisson_random_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/random_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/random_order_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/random_variable.rb +3 -3
- data/lib/ruby-jmeter/dsl/recording_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/regex_user_parameters.rb +3 -3
- data/lib/ruby-jmeter/dsl/regular_expression_extractor.rb +3 -3
- data/lib/ruby-jmeter/dsl/response_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/response_time_graph.rb +3 -3
- data/lib/ruby-jmeter/dsl/result_status_action_handler.rb +3 -3
- data/lib/ruby-jmeter/dsl/runtime_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/save_responses_to_a_file.rb +3 -3
- data/lib/ruby-jmeter/dsl/simple_config_element.rb +3 -3
- data/lib/ruby-jmeter/dsl/simple_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/simple_data_writer.rb +3 -3
- data/lib/ruby-jmeter/dsl/smime_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/smtp_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/soapxmlrpc_request.rb +3 -3
- data/lib/ruby-jmeter/dsl/spline_visualizer.rb +3 -3
- data/lib/ruby-jmeter/dsl/summary_report.rb +3 -3
- data/lib/ruby-jmeter/dsl/switch_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/synchronizing_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/tcp_sampler.rb +3 -3
- data/lib/ruby-jmeter/dsl/tcp_sampler_config.rb +3 -3
- data/lib/ruby-jmeter/dsl/test_action.rb +3 -3
- data/lib/ruby-jmeter/dsl/test_plan.rb +4 -4
- data/lib/ruby-jmeter/dsl/thread_group.rb +4 -4
- data/lib/ruby-jmeter/dsl/throughput_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/transaction_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/uniform_random_timer.rb +3 -3
- data/lib/ruby-jmeter/dsl/user_defined_variables.rb +3 -3
- data/lib/ruby-jmeter/dsl/user_parameters.rb +3 -3
- data/lib/ruby-jmeter/dsl/view_results_in_table.rb +3 -3
- data/lib/ruby-jmeter/dsl/view_results_tree.rb +3 -3
- data/lib/ruby-jmeter/dsl/while_controller.rb +3 -3
- data/lib/ruby-jmeter/dsl/xml_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/xml_schema_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/xpath_assertion.rb +3 -3
- data/lib/ruby-jmeter/dsl/xpath_extractor.rb +3 -3
- data/lib/ruby-jmeter/dsl.rb +6 -2
- data/lib/ruby-jmeter/helpers/helper.rb +20 -3
- data/lib/ruby-jmeter/idl.rb +3 -3
- data/lib/ruby-jmeter/version.rb +1 -1
- data/spec/dsl_spec.rb +22 -0
- metadata +4 -6
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'ForeachController' : (params[:name] || 'ForeachController')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="#{
|
16
|
+
<ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="ForeachController.inputVal"/>
|
18
18
|
<stringProp name="ForeachController.returnVal"/>
|
19
19
|
<boolProp name="ForeachController.useSeparator">true</boolProp>
|
@@ -22,7 +22,7 @@ module RubyJmeter
|
|
22
22
|
</ForeachController>)
|
23
23
|
EOS
|
24
24
|
update params
|
25
|
-
update_at_xpath params if params[:update_at_xpath]
|
25
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'FtpRequest' : (params[:name] || 'FtpRequest')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="#{
|
16
|
+
<FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="FTPSampler.server"/>
|
18
18
|
<stringProp name="FTPSampler.port"/>
|
19
19
|
<stringProp name="FTPSampler.filename"/>
|
@@ -27,7 +27,7 @@ module RubyJmeter
|
|
27
27
|
</FTPSampler>)
|
28
28
|
EOS
|
29
29
|
update params
|
30
|
-
update_at_xpath params if params[:update_at_xpath]
|
30
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'FtpRequestDefaults' : (params[:name] || 'FtpRequestDefaults')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<ConfigTestElement guiclass="FtpConfigGui" testclass="ConfigTestElement" testname="#{
|
16
|
+
<ConfigTestElement guiclass="FtpConfigGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="FTPSampler.server"/>
|
18
18
|
<stringProp name="FTPSampler.port"/>
|
19
19
|
<stringProp name="FTPSampler.filename"/>
|
@@ -25,7 +25,7 @@ module RubyJmeter
|
|
25
25
|
</ConfigTestElement>)
|
26
26
|
EOS
|
27
27
|
update params
|
28
|
-
update_at_xpath params if params[:update_at_xpath]
|
28
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -11,15 +11,15 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'GaussianRandomTimer' : (params[:name] || 'GaussianRandomTimer')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="#{
|
16
|
+
<GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="ConstantTimer.delay">300</stringProp>
|
18
18
|
<stringProp name="RandomTimer.range">100.0</stringProp>
|
19
19
|
</GaussianRandomTimer>)
|
20
20
|
EOS
|
21
21
|
update params
|
22
|
-
update_at_xpath params if params[:update_at_xpath]
|
22
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -11,12 +11,12 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'GenerateSummaryResults' : (params[:name] || 'GenerateSummaryResults')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<Summariser guiclass="SummariserGui" testclass="Summariser" testname="#{
|
16
|
+
<Summariser guiclass="SummariserGui" testclass="Summariser" testname="#{testname}" enabled="true"/>)
|
17
17
|
EOS
|
18
18
|
update params
|
19
|
-
update_at_xpath params if params[:update_at_xpath]
|
19
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'GraphResults' : (params[:name] || 'GraphResults')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="#{
|
16
|
+
<ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
|
17
17
|
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
18
18
|
<objProp>
|
19
19
|
<name>saveConfig</name>
|
@@ -48,7 +48,7 @@ module RubyJmeter
|
|
48
48
|
</ResultCollector>)
|
49
49
|
EOS
|
50
50
|
update params
|
51
|
-
update_at_xpath params if params[:update_at_xpath]
|
51
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HtmlAssertion' : (params[:name] || 'HtmlAssertion')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<HTMLAssertion guiclass="HTMLAssertionGui" testclass="HTMLAssertion" testname="#{
|
16
|
+
<HTMLAssertion guiclass="HTMLAssertionGui" testclass="HTMLAssertion" testname="#{testname}" enabled="true">
|
17
17
|
<longProp name="html_assertion_error_threshold">0</longProp>
|
18
18
|
<longProp name="html_assertion_warning_threshold">0</longProp>
|
19
19
|
<stringProp name="html_assertion_doctype">omit</stringProp>
|
@@ -23,7 +23,7 @@ module RubyJmeter
|
|
23
23
|
</HTMLAssertion>)
|
24
24
|
EOS
|
25
25
|
update params
|
26
|
-
update_at_xpath params if params[:update_at_xpath]
|
26
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -11,12 +11,12 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HtmlLinkParser' : (params[:name] || 'HtmlLinkParser')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<AnchorModifier guiclass="AnchorModifierGui" testclass="AnchorModifier" testname="#{
|
16
|
+
<AnchorModifier guiclass="AnchorModifierGui" testclass="AnchorModifier" testname="#{testname}" enabled="true"/>)
|
17
17
|
EOS
|
18
18
|
update params
|
19
|
-
update_at_xpath params if params[:update_at_xpath]
|
19
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HtmlParameterMask' : (params[:name] || 'HtmlParameterMask')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="#{
|
16
|
+
<ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="#{testname}" enabled="true">
|
17
17
|
<elementProp name="ParamModifier.mask" elementType="ParamMask">
|
18
18
|
<stringProp name="ParamModifier.field_name"/>
|
19
19
|
<stringProp name="ParamModifier.prefix"/>
|
@@ -25,7 +25,7 @@ module RubyJmeter
|
|
25
25
|
</ParamModifier>)
|
26
26
|
EOS
|
27
27
|
update params
|
28
|
-
update_at_xpath params if params[:update_at_xpath]
|
28
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpAuthorizationManager' : (params[:name] || 'HttpAuthorizationManager')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="#{
|
16
|
+
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="#{testname}" enabled="true">
|
17
17
|
<collectionProp name="AuthManager.auth_list">
|
18
18
|
<elementProp name="" elementType="Authorization">
|
19
19
|
<stringProp name="Authorization.url"/>
|
@@ -26,7 +26,7 @@ module RubyJmeter
|
|
26
26
|
</AuthManager>)
|
27
27
|
EOS
|
28
28
|
update params
|
29
|
-
update_at_xpath params if params[:update_at_xpath]
|
29
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -11,15 +11,15 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpCacheManager' : (params[:name] || 'HttpCacheManager')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="#{
|
16
|
+
<CacheManager guiclass="CacheManagerGui" testclass="CacheManager" testname="#{testname}" enabled="true">
|
17
17
|
<boolProp name="clearEachIteration">false</boolProp>
|
18
18
|
<boolProp name="useExpires">false</boolProp>
|
19
19
|
</CacheManager>)
|
20
20
|
EOS
|
21
21
|
update params
|
22
|
-
update_at_xpath params if params[:update_at_xpath]
|
22
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -11,16 +11,16 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpCookieManager' : (params[:name] || 'HttpCookieManager')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="#{
|
16
|
+
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="#{testname}" enabled="true">
|
17
17
|
<collectionProp name="CookieManager.cookies"/>
|
18
18
|
<boolProp name="CookieManager.clearEachIteration">false</boolProp>
|
19
19
|
<stringProp name="CookieManager.policy">default</stringProp>
|
20
20
|
</CookieManager>)
|
21
21
|
EOS
|
22
22
|
update params
|
23
|
-
update_at_xpath params if params[:update_at_xpath]
|
23
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpHeaderManager' : (params[:name] || 'HttpHeaderManager')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="#{
|
16
|
+
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="#{testname}" enabled="true">
|
17
17
|
<collectionProp name="HeaderManager.headers">
|
18
18
|
<elementProp name="" elementType="Header">
|
19
19
|
<stringProp name="Header.name"/>
|
@@ -23,7 +23,7 @@ module RubyJmeter
|
|
23
23
|
</HeaderManager>)
|
24
24
|
EOS
|
25
25
|
update params
|
26
|
-
update_at_xpath params if params[:update_at_xpath]
|
26
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -11,10 +11,10 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpRequest' : (params[:name] || 'HttpRequest')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="#{
|
17
|
-
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{
|
16
|
+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="#{testname}" enabled="true">
|
17
|
+
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
18
18
|
<collectionProp name="Arguments.arguments"/>
|
19
19
|
</elementProp>
|
20
20
|
<stringProp name="HTTPSampler.domain"/>
|
@@ -34,7 +34,7 @@ module RubyJmeter
|
|
34
34
|
</HTTPSamplerProxy>)
|
35
35
|
EOS
|
36
36
|
update params
|
37
|
-
update_at_xpath params if params[:update_at_xpath]
|
37
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -11,10 +11,10 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpRequestDefaults' : (params[:name] || 'HttpRequestDefaults')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="#{
|
17
|
-
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{
|
16
|
+
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
|
17
|
+
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
18
18
|
<collectionProp name="Arguments.arguments"/>
|
19
19
|
</elementProp>
|
20
20
|
<stringProp name="HTTPSampler.domain"/>
|
@@ -37,7 +37,7 @@ module RubyJmeter
|
|
37
37
|
</ConfigTestElement>)
|
38
38
|
EOS
|
39
39
|
update params
|
40
|
-
update_at_xpath params if params[:update_at_xpath]
|
40
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'HttpUrlRewritingModifier' : (params[:name] || 'HttpUrlRewritingModifier')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<URLRewritingModifier guiclass="URLRewritingModifierGui" testclass="URLRewritingModifier" testname="#{
|
16
|
+
<URLRewritingModifier guiclass="URLRewritingModifierGui" testclass="URLRewritingModifier" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="argument_name"/>
|
18
18
|
<boolProp name="path_extension">false</boolProp>
|
19
19
|
<boolProp name="path_extension_no_equals">false</boolProp>
|
@@ -22,7 +22,7 @@ module RubyJmeter
|
|
22
22
|
</URLRewritingModifier>)
|
23
23
|
EOS
|
24
24
|
update params
|
25
|
-
update_at_xpath params if params[:update_at_xpath]
|
25
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -11,16 +11,16 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'IfController' : (params[:name] || 'IfController')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="#{
|
16
|
+
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="IfController.condition"/>
|
18
18
|
<boolProp name="IfController.evaluateAll">false</boolProp>
|
19
19
|
<boolProp name="IfController.useExpression">false</boolProp>
|
20
20
|
</IfController>)
|
21
21
|
EOS
|
22
22
|
update params
|
23
|
-
update_at_xpath params if params[:update_at_xpath]
|
23
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -11,14 +11,14 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'IncludeController' : (params[:name] || 'IncludeController')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="#{
|
16
|
+
<IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="IncludeController.includepath"/>
|
18
18
|
</IncludeController>)
|
19
19
|
EOS
|
20
20
|
update params
|
21
|
-
update_at_xpath params if params[:update_at_xpath]
|
21
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JavaRequest' : (params[:name] || 'JavaRequest')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="#{
|
16
|
+
<JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="#{testname}" enabled="true">
|
17
17
|
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
|
18
18
|
<collectionProp name="Arguments.arguments">
|
19
19
|
<elementProp name="Sleep_Time" elementType="Argument">
|
@@ -62,7 +62,7 @@ module RubyJmeter
|
|
62
62
|
</JavaSampler>)
|
63
63
|
EOS
|
64
64
|
update params
|
65
|
-
update_at_xpath params if params[:update_at_xpath]
|
65
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JavaRequestDefaults' : (params[:name] || 'JavaRequestDefaults')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="#{
|
16
|
+
<JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="#{testname}" enabled="true">
|
17
17
|
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
|
18
18
|
<collectionProp name="Arguments.arguments">
|
19
19
|
<elementProp name="Sleep_Time" elementType="Argument">
|
@@ -62,7 +62,7 @@ module RubyJmeter
|
|
62
62
|
</JavaConfig>)
|
63
63
|
EOS
|
64
64
|
update params
|
65
|
-
update_at_xpath params if params[:update_at_xpath]
|
65
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JdbcConnectionConfiguration' : (params[:name] || 'JdbcConnectionConfiguration')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="#{
|
16
|
+
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="#{testname}" enabled="true">
|
17
17
|
<boolProp name="autocommit">true</boolProp>
|
18
18
|
<stringProp name="checkQuery">Select 1</stringProp>
|
19
19
|
<stringProp name="connectionAge">5000</stringProp>
|
@@ -30,7 +30,7 @@ module RubyJmeter
|
|
30
30
|
</JDBCDataSource>)
|
31
31
|
EOS
|
32
32
|
update params
|
33
|
-
update_at_xpath params if params[:update_at_xpath]
|
33
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JdbcPostprocessor' : (params[:name] || 'JdbcPostprocessor')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JDBCPostProcessor guiclass="TestBeanGUI" testclass="JDBCPostProcessor" testname="#{
|
16
|
+
<JDBCPostProcessor guiclass="TestBeanGUI" testclass="JDBCPostProcessor" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="dataSource"/>
|
18
18
|
<stringProp name="query"/>
|
19
19
|
<stringProp name="queryArguments"/>
|
@@ -24,7 +24,7 @@ module RubyJmeter
|
|
24
24
|
</JDBCPostProcessor>)
|
25
25
|
EOS
|
26
26
|
update params
|
27
|
-
update_at_xpath params if params[:update_at_xpath]
|
27
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JdbcPreprocessor' : (params[:name] || 'JdbcPreprocessor')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="#{
|
16
|
+
<JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="dataSource"/>
|
18
18
|
<stringProp name="query"/>
|
19
19
|
<stringProp name="queryArguments"/>
|
@@ -24,7 +24,7 @@ module RubyJmeter
|
|
24
24
|
</JDBCPreProcessor>)
|
25
25
|
EOS
|
26
26
|
update params
|
27
|
-
update_at_xpath params if params[:update_at_xpath]
|
27
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JdbcRequest' : (params[:name] || 'JdbcRequest')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="#{
|
16
|
+
<JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="dataSource"/>
|
18
18
|
<stringProp name="query"/>
|
19
19
|
<stringProp name="queryArguments"/>
|
@@ -24,7 +24,7 @@ module RubyJmeter
|
|
24
24
|
</JDBCSampler>)
|
25
25
|
EOS
|
26
26
|
update params
|
27
|
-
update_at_xpath params if params[:update_at_xpath]
|
27
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JmsPointtopoint' : (params[:name] || 'JmsPointtopoint')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="#{
|
16
|
+
<JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="JMSSampler.queueconnectionfactory"/>
|
18
18
|
<stringProp name="JMSSampler.SendQueue"/>
|
19
19
|
<stringProp name="JMSSampler.ReceiveQueue"/>
|
@@ -24,16 +24,16 @@ module RubyJmeter
|
|
24
24
|
<stringProp name="HTTPSamper.xml_data"/>
|
25
25
|
<stringProp name="JMSSampler.initialContextFactory"/>
|
26
26
|
<stringProp name="JMSSampler.contextProviderUrl"/>
|
27
|
-
<elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{
|
27
|
+
<elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
28
28
|
<collectionProp name="Arguments.arguments"/>
|
29
29
|
</elementProp>
|
30
|
-
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{
|
30
|
+
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
31
31
|
<collectionProp name="Arguments.arguments"/>
|
32
32
|
</elementProp>
|
33
33
|
</JMSSampler>)
|
34
34
|
EOS
|
35
35
|
update params
|
36
|
-
update_at_xpath params if params[:update_at_xpath]
|
36
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JmsPublisher' : (params[:name] || 'JmsPublisher')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<PublisherSampler guiclass="JMSPublisherGui" testclass="PublisherSampler" testname="#{
|
16
|
+
<PublisherSampler guiclass="JMSPublisherGui" testclass="PublisherSampler" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="jms.jndi_properties">false</stringProp>
|
18
18
|
<stringProp name="jms.initial_context_factory"/>
|
19
19
|
<stringProp name="jms.provider_url"/>
|
@@ -28,13 +28,13 @@ module RubyJmeter
|
|
28
28
|
<stringProp name="jms.config_msg_type">jms_text_message</stringProp>
|
29
29
|
<stringProp name="jms.iterations">1</stringProp>
|
30
30
|
<boolProp name="jms.authenticate">false</boolProp>
|
31
|
-
<elementProp name="jms.jmsProperties" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{
|
31
|
+
<elementProp name="jms.jmsProperties" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
32
32
|
<collectionProp name="Arguments.arguments"/>
|
33
33
|
</elementProp>
|
34
34
|
</PublisherSampler>)
|
35
35
|
EOS
|
36
36
|
update params
|
37
|
-
update_at_xpath params if params[:update_at_xpath]
|
37
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'JmsSubscriber' : (params[:name] || 'JmsSubscriber')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<SubscriberSampler guiclass="JMSSubscriberGui" testclass="SubscriberSampler" testname="#{
|
16
|
+
<SubscriberSampler guiclass="JMSSubscriberGui" testclass="SubscriberSampler" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="jms.jndi_properties">false</stringProp>
|
18
18
|
<stringProp name="jms.initial_context_factory"/>
|
19
19
|
<stringProp name="jms.provider_url"/>
|
@@ -28,7 +28,7 @@ module RubyJmeter
|
|
28
28
|
</SubscriberSampler>)
|
29
29
|
EOS
|
30
30
|
update params
|
31
|
-
update_at_xpath params if params[:update_at_xpath]
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -11,9 +11,9 @@ module RubyJmeter
|
|
11
11
|
include Helper
|
12
12
|
|
13
13
|
def initialize(params={})
|
14
|
-
params[:name]
|
14
|
+
testname = params.kind_of?(Array) ? 'Jsr223Assertion' : (params[:name] || 'Jsr223Assertion')
|
15
15
|
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
|
16
|
-
<JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="#{
|
16
|
+
<JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="#{testname}" enabled="true">
|
17
17
|
<stringProp name="scriptLanguage"/>
|
18
18
|
<stringProp name="parameters"/>
|
19
19
|
<stringProp name="filename"/>
|
@@ -22,7 +22,7 @@ module RubyJmeter
|
|
22
22
|
</JSR223Assertion>)
|
23
23
|
EOS
|
24
24
|
update params
|
25
|
-
update_at_xpath params if params[:update_at_xpath]
|
25
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|