jmeter_perf 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +19 -0
- data/.standard.yml +4 -0
- data/CHANGELOG.md +18 -0
- data/DSL.md +235 -0
- data/README.md +24 -0
- data/Rakefile +12 -0
- data/example/Gemfile +39 -0
- data/example/Gemfile.lock +232 -0
- data/example/README.md +3 -0
- data/example/Rakefile +6 -0
- data/example/app/controllers/application_controller.rb +2 -0
- data/example/app/controllers/test_controller.rb +15 -0
- data/example/bin/bundle +109 -0
- data/example/bin/docker-entrypoint +8 -0
- data/example/bin/rails +4 -0
- data/example/bin/rake +4 -0
- data/example/bin/setup +33 -0
- data/example/config/application.rb +44 -0
- data/example/config/boot.rb +3 -0
- data/example/config/credentials.yml.enc +1 -0
- data/example/config/database.yml +25 -0
- data/example/config/environment.rb +5 -0
- data/example/config/environments/development.rb +64 -0
- data/example/config/environments/production.rb +82 -0
- data/example/config/environments/test.rb +61 -0
- data/example/config/initializers/cors.rb +16 -0
- data/example/config/initializers/filter_parameter_logging.rb +8 -0
- data/example/config/initializers/inflections.rb +16 -0
- data/example/config/locales/en.yml +31 -0
- data/example/config/puma.rb +35 -0
- data/example/config/routes.rb +5 -0
- data/example/config.ru +7 -0
- data/example/fast.log +49 -0
- data/example/jmeter.log +28 -0
- data/example/lib/tasks/test.rake +40 -0
- data/example/log/.keep +0 -0
- data/example/public/robots.txt +1 -0
- data/example/random.log +49 -0
- data/example/slow.log +49 -0
- data/example/vendor/.keep +0 -0
- data/lib/Rakefile +4 -0
- data/lib/jmeter_perf/dsl/access_log_sampler.rb +38 -0
- data/lib/jmeter_perf/dsl/aggregate_graph.rb +61 -0
- data/lib/jmeter_perf/dsl/aggregate_report.rb +61 -0
- data/lib/jmeter_perf/dsl/ajp13_sampler.rb +47 -0
- data/lib/jmeter_perf/dsl/assertion_results.rb +61 -0
- data/lib/jmeter_perf/dsl/bean_shell_assertion.rb +34 -0
- data/lib/jmeter_perf/dsl/bean_shell_listener.rb +34 -0
- data/lib/jmeter_perf/dsl/bean_shell_postprocessor.rb +34 -0
- data/lib/jmeter_perf/dsl/bean_shell_preprocessor.rb +34 -0
- data/lib/jmeter_perf/dsl/bean_shell_sampler.rb +34 -0
- data/lib/jmeter_perf/dsl/bean_shell_timer.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_assertion.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_listener.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_postprocessor.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_preprocessor.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_sampler.rb +34 -0
- data/lib/jmeter_perf/dsl/bsf_timer.rb +34 -0
- data/lib/jmeter_perf/dsl/compare_assertion.rb +33 -0
- data/lib/jmeter_perf/dsl/comparison_assertion_visualizer.rb +61 -0
- data/lib/jmeter_perf/dsl/constant_throughput_timer.rb +32 -0
- data/lib/jmeter_perf/dsl/constant_timer.rb +31 -0
- data/lib/jmeter_perf/dsl/counter.rb +37 -0
- data/lib/jmeter_perf/dsl/css_jquery_extractor.rb +37 -0
- data/lib/jmeter_perf/dsl/csv_data_set_config.rb +39 -0
- data/lib/jmeter_perf/dsl/debug_postprocessor.rb +34 -0
- data/lib/jmeter_perf/dsl/debug_sampler.rb +33 -0
- data/lib/jmeter_perf/dsl/distribution_graphalpha.rb +61 -0
- data/lib/jmeter_perf/dsl/duration_assertion.rb +31 -0
- data/lib/jmeter_perf/dsl/for_each_controller.rb +33 -0
- data/lib/jmeter_perf/dsl/ftp_request.rb +40 -0
- data/lib/jmeter_perf/dsl/ftp_request_defaults.rb +38 -0
- data/lib/jmeter_perf/dsl/gaussian_random_timer.rb +32 -0
- data/lib/jmeter_perf/dsl/generate_summary_results.rb +29 -0
- data/lib/jmeter_perf/dsl/graph_results.rb +61 -0
- data/lib/jmeter_perf/dsl/html_assertion.rb +36 -0
- data/lib/jmeter_perf/dsl/html_link_parser.rb +29 -0
- data/lib/jmeter_perf/dsl/html_parameter_mask.rb +38 -0
- data/lib/jmeter_perf/dsl/http_authorization_manager.rb +39 -0
- data/lib/jmeter_perf/dsl/http_cache_manager.rb +32 -0
- data/lib/jmeter_perf/dsl/http_cookie_manager.rb +34 -0
- data/lib/jmeter_perf/dsl/http_header_manager.rb +36 -0
- data/lib/jmeter_perf/dsl/http_request.rb +47 -0
- data/lib/jmeter_perf/dsl/http_request_defaults.rb +53 -0
- data/lib/jmeter_perf/dsl/http_url_rewriting_modifier.rb +36 -0
- data/lib/jmeter_perf/dsl/if_controller.rb +33 -0
- data/lib/jmeter_perf/dsl/include_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/j_unit_request.rb +43 -0
- data/lib/jmeter_perf/dsl/java_request.rb +75 -0
- data/lib/jmeter_perf/dsl/java_request_defaults.rb +75 -0
- data/lib/jmeter_perf/dsl/jdbc_connection_configuration.rb +43 -0
- data/lib/jmeter_perf/dsl/jdbc_postprocessor.rb +39 -0
- data/lib/jmeter_perf/dsl/jdbc_preprocessor.rb +39 -0
- data/lib/jmeter_perf/dsl/jdbc_request.rb +39 -0
- data/lib/jmeter_perf/dsl/jms_pointto_point.rb +47 -0
- data/lib/jmeter_perf/dsl/jms_publisher.rb +49 -0
- data/lib/jmeter_perf/dsl/jms_subscriber.rb +41 -0
- data/lib/jmeter_perf/dsl/json_path_postprocessor.rb +33 -0
- data/lib/jmeter_perf/dsl/jsr223_assertion.rb +35 -0
- data/lib/jmeter_perf/dsl/jsr223_listener.rb +35 -0
- data/lib/jmeter_perf/dsl/jsr223_postprocessor.rb +35 -0
- data/lib/jmeter_perf/dsl/jsr223_preprocessor.rb +35 -0
- data/lib/jmeter_perf/dsl/jsr223_sampler.rb +35 -0
- data/lib/jmeter_perf/dsl/jsr223_timer.rb +35 -0
- data/lib/jmeter_perf/dsl/keystore_configuration.rb +34 -0
- data/lib/jmeter_perf/dsl/ldap_extended_request.rb +48 -0
- data/lib/jmeter_perf/dsl/ldap_extended_request_defaults.rb +48 -0
- data/lib/jmeter_perf/dsl/ldap_request.rb +41 -0
- data/lib/jmeter_perf/dsl/ldap_request_defaults.rb +45 -0
- data/lib/jmeter_perf/dsl/login_config_element.rb +32 -0
- data/lib/jmeter_perf/dsl/loop_controller.rb +32 -0
- data/lib/jmeter_perf/dsl/mail_reader_sampler.rb +43 -0
- data/lib/jmeter_perf/dsl/mailer_visualizer.rb +70 -0
- data/lib/jmeter_perf/dsl/md5_hex_assertion.rb +31 -0
- data/lib/jmeter_perf/dsl/module_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/monitor_results.rb +61 -0
- data/lib/jmeter_perf/dsl/once_only_controller.rb +29 -0
- data/lib/jmeter_perf/dsl/os_process_sampler.rb +40 -0
- data/lib/jmeter_perf/dsl/poisson_random_timer.rb +32 -0
- data/lib/jmeter_perf/dsl/random_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/random_order_controller.rb +29 -0
- data/lib/jmeter_perf/dsl/random_variable.rb +36 -0
- data/lib/jmeter_perf/dsl/recording_controller.rb +29 -0
- data/lib/jmeter_perf/dsl/reg_ex_user_parameters.rb +33 -0
- data/lib/jmeter_perf/dsl/regular_expression_extractor.rb +38 -0
- data/lib/jmeter_perf/dsl/response_assertion.rb +37 -0
- data/lib/jmeter_perf/dsl/response_time_graph.rb +61 -0
- data/lib/jmeter_perf/dsl/result_status_action_handler.rb +31 -0
- data/lib/jmeter_perf/dsl/runtime_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/save_responses_to_a_file.rb +35 -0
- data/lib/jmeter_perf/dsl/simple_config_element.rb +29 -0
- data/lib/jmeter_perf/dsl/simple_controller.rb +29 -0
- data/lib/jmeter_perf/dsl/simple_data_writer.rb +61 -0
- data/lib/jmeter_perf/dsl/smime_assertion.rb +41 -0
- data/lib/jmeter_perf/dsl/smtp_sampler.rb +57 -0
- data/lib/jmeter_perf/dsl/soap_xml_rpc_request.rb +39 -0
- data/lib/jmeter_perf/dsl/spline_visualizer.rb +61 -0
- data/lib/jmeter_perf/dsl/summary_report.rb +61 -0
- data/lib/jmeter_perf/dsl/switch_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/synchronizing_timer.rb +32 -0
- data/lib/jmeter_perf/dsl/tcp_sampler.rb +39 -0
- data/lib/jmeter_perf/dsl/tcp_sampler_config.rb +37 -0
- data/lib/jmeter_perf/dsl/test_action.rb +33 -0
- data/lib/jmeter_perf/dsl/test_fragment.rb +29 -0
- data/lib/jmeter_perf/dsl/test_plan.rb +37 -0
- data/lib/jmeter_perf/dsl/thread_group.rb +43 -0
- data/lib/jmeter_perf/dsl/throughput_controller.rb +38 -0
- data/lib/jmeter_perf/dsl/transaction_controller.rb +32 -0
- data/lib/jmeter_perf/dsl/uniform_random_timer.rb +32 -0
- data/lib/jmeter_perf/dsl/user_defined_variables.rb +39 -0
- data/lib/jmeter_perf/dsl/user_parameters.rb +36 -0
- data/lib/jmeter_perf/dsl/view_results_in_table.rb +61 -0
- data/lib/jmeter_perf/dsl/view_results_tree.rb +61 -0
- data/lib/jmeter_perf/dsl/while_controller.rb +31 -0
- data/lib/jmeter_perf/dsl/x_path_assertion.rb +37 -0
- data/lib/jmeter_perf/dsl/x_path_extractor.rb +37 -0
- data/lib/jmeter_perf/dsl/xml_assertion.rb +29 -0
- data/lib/jmeter_perf/dsl/xml_schema_assertion.rb +31 -0
- data/lib/jmeter_perf/extend/assertions/response_assertion.rb +38 -0
- data/lib/jmeter_perf/extend/config_elements/header_manager.rb +13 -0
- data/lib/jmeter_perf/extend/config_elements/http_cache_manager.rb +12 -0
- data/lib/jmeter_perf/extend/config_elements/http_cookie_manager.rb +39 -0
- data/lib/jmeter_perf/extend/config_elements/http_request_defaults.rb +55 -0
- data/lib/jmeter_perf/extend/config_elements/user_defined_variables.rb +13 -0
- data/lib/jmeter_perf/extend/config_elements/user_parameters.rb +31 -0
- data/lib/jmeter_perf/extend/controllers/foreach_controller.rb +31 -0
- data/lib/jmeter_perf/extend/controllers/loop_controller.rb +11 -0
- data/lib/jmeter_perf/extend/controllers/module_controller.rb +26 -0
- data/lib/jmeter_perf/extend/controllers/throughput_controller.rb +15 -0
- data/lib/jmeter_perf/extend/controllers/transaction_controller.rb +14 -0
- data/lib/jmeter_perf/extend/misc/exists.rb +13 -0
- data/lib/jmeter_perf/extend/misc/rsync.rb +24 -0
- data/lib/jmeter_perf/extend/misc/uuid.rb +12 -0
- data/lib/jmeter_perf/extend/misc/with_helpers.rb +27 -0
- data/lib/jmeter_perf/extend/plugins/jmeter_plugins.rb +124 -0
- data/lib/jmeter_perf/extend/processors/extract.rb +27 -0
- data/lib/jmeter_perf/extend/processors/regular_expression_extractor.rb +27 -0
- data/lib/jmeter_perf/extend/samplers/http_request.rb +66 -0
- data/lib/jmeter_perf/extend/samplers/jms_pointtopoint.rb +23 -0
- data/lib/jmeter_perf/extend/samplers/soapxmlrpc_request.rb +10 -0
- data/lib/jmeter_perf/extend/threads/thread_group.rb +19 -0
- data/lib/jmeter_perf/extend/timers/constant_throughput_timer.rb +11 -0
- data/lib/jmeter_perf/extend/timers/random_timer.rb +14 -0
- data/lib/jmeter_perf/helpers/dsl_generator.rb +157 -0
- data/lib/jmeter_perf/helpers/fallback_content_proxy.rb +96 -0
- data/lib/jmeter_perf/helpers/helper.rb +63 -0
- data/lib/jmeter_perf/helpers/parser.rb +143 -0
- data/lib/jmeter_perf/helpers/running_statistics.rb +62 -0
- data/lib/jmeter_perf/helpers/string.rb +60 -0
- data/lib/jmeter_perf/helpers/user-agents.rb +42 -0
- data/lib/jmeter_perf/plugins/active_threads_over_time.rb +59 -0
- data/lib/jmeter_perf/plugins/composite_graph.rb +77 -0
- data/lib/jmeter_perf/plugins/console_status_logger.rb +19 -0
- data/lib/jmeter_perf/plugins/dummy_sampler.rb +30 -0
- data/lib/jmeter_perf/plugins/jmx_collector.rb +74 -0
- data/lib/jmeter_perf/plugins/json_path_assertion.rb +23 -0
- data/lib/jmeter_perf/plugins/json_path_extractor.rb +22 -0
- data/lib/jmeter_perf/plugins/latencies_over_time.rb +53 -0
- data/lib/jmeter_perf/plugins/loadosophia_uploader.rb +66 -0
- data/lib/jmeter_perf/plugins/perfmon_collector.rb +87 -0
- data/lib/jmeter_perf/plugins/redis_data_set.rb +43 -0
- data/lib/jmeter_perf/plugins/response_codes_per_second.rb +53 -0
- data/lib/jmeter_perf/plugins/response_times_distribution.rb +53 -0
- data/lib/jmeter_perf/plugins/response_times_over_time.rb +53 -0
- data/lib/jmeter_perf/plugins/response_times_percentiles.rb +54 -0
- data/lib/jmeter_perf/plugins/stepping_thread_group.rb +34 -0
- data/lib/jmeter_perf/plugins/transactions_per_second.rb +53 -0
- data/lib/jmeter_perf/plugins/ultimate_thread_group.rb +28 -0
- data/lib/jmeter_perf/plugins/variable_throughput_timer.rb +35 -0
- data/lib/jmeter_perf/report/comparator.rb +258 -0
- data/lib/jmeter_perf/report/summary.rb +268 -0
- data/lib/jmeter_perf/tasks/dsl.rake +19 -0
- data/lib/jmeter_perf/version.rb +5 -0
- data/lib/jmeter_perf/views/report_template.html.erb +114 -0
- data/lib/jmeter_perf.rb +183 -0
- data/lib/specifications/idl.xml +1494 -0
- data/sig/jmeter_perf.rbs +195 -0
- data/sorbet/config +5 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3607 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
- data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +304 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
- data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1151 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10076 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.2.1.rbi +3074 -0
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/rbtree3@0.7.1.rbi +9 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
- data/sorbet/rbi/gems/rexml@3.3.8.rbi +4858 -0
- data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11132 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
- data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
- data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7054 -0
- data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop@1.65.1.rbi +58182 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +225 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
- data/sorbet/rbi/gems/standard-performance@1.4.0.rbi +9 -0
- data/sorbet/rbi/gems/standard@1.40.0.rbi +926 -0
- data/sorbet/rbi/gems/tapioca@0.16.3.rbi +3596 -0
- data/sorbet/rbi/gems/tdigest@0.2.1.rbi +170 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
- data/sorbet/rbi/todo.rbi +31 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +15 -0
- data/tasks/dsl.rake +22 -0
- metadata +355 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Assertion
|
4
|
+
# @param params [Hash] Parameters for the JSR223Assertion element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Assertion element
|
6
|
+
# @return [JmeterPerf::JSR223Assertion], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223assertion
|
8
|
+
def jsr223_assertion(params = {}, &)
|
9
|
+
node = JSR223Assertion.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Assertion
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Assertion" : (params[:name] || "JSR223Assertion")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223Assertion>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Listener
|
4
|
+
# @param params [Hash] Parameters for the JSR223Listener element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Listener element
|
6
|
+
# @return [JmeterPerf::JSR223Listener], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223listener
|
8
|
+
def jsr223_listener(params = {}, &)
|
9
|
+
node = JSR223Listener.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Listener
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Listener" : (params[:name] || "JSR223Listener")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223Listener guiclass="TestBeanGUI" testclass="JSR223Listener" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223Listener>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Postprocessor
|
4
|
+
# @param params [Hash] Parameters for the JSR223Postprocessor element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Postprocessor element
|
6
|
+
# @return [JmeterPerf::JSR223Postprocessor], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223postprocessor
|
8
|
+
def jsr223_postprocessor(params = {}, &)
|
9
|
+
node = JSR223Postprocessor.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Postprocessor
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Postprocessor" : (params[:name] || "JSR223Postprocessor")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223PostProcessor>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Preprocessor
|
4
|
+
# @param params [Hash] Parameters for the JSR223Preprocessor element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Preprocessor element
|
6
|
+
# @return [JmeterPerf::JSR223Preprocessor], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223preprocessor
|
8
|
+
def jsr223_preprocessor(params = {}, &)
|
9
|
+
node = JSR223Preprocessor.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Preprocessor
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Preprocessor" : (params[:name] || "JSR223Preprocessor")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223PreProcessor>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Sampler
|
4
|
+
# @param params [Hash] Parameters for the JSR223Sampler element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Sampler element
|
6
|
+
# @return [JmeterPerf::JSR223Sampler], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223sampler
|
8
|
+
def jsr223_sampler(params = {}, &)
|
9
|
+
node = JSR223Sampler.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Sampler
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Sampler" : (params[:name] || "JSR223Sampler")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223Sampler>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element JSR223Timer
|
4
|
+
# @param params [Hash] Parameters for the JSR223Timer element (default: `{}`).
|
5
|
+
# @yield block to attach to the JSR223Timer element
|
6
|
+
# @return [JmeterPerf::JSR223Timer], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#jsr223timer
|
8
|
+
def jsr223_timer(params = {}, &)
|
9
|
+
node = JSR223Timer.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class JSR223Timer
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "JSR223Timer" : (params[:name] || "JSR223Timer")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<JSR223Timer guiclass="TestBeanGUI" testclass="JSR223Timer" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="cacheKey"/>
|
23
|
+
<stringProp name="filename"/>
|
24
|
+
<stringProp name="parameters"/>
|
25
|
+
<stringProp name="script"/>
|
26
|
+
<stringProp name="scriptLanguage"/>
|
27
|
+
</JSR223Timer>
|
28
|
+
EOS
|
29
|
+
))
|
30
|
+
update params
|
31
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element KeystoreConfiguration
|
4
|
+
# @param params [Hash] Parameters for the KeystoreConfiguration element (default: `{}`).
|
5
|
+
# @yield block to attach to the KeystoreConfiguration element
|
6
|
+
# @return [JmeterPerf::KeystoreConfiguration], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#keystoreconfiguration
|
8
|
+
def keystore_configuration(params = {}, &)
|
9
|
+
node = KeystoreConfiguration.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class KeystoreConfiguration
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "KeystoreConfiguration" : (params[:name] || "KeystoreConfiguration")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<KeystoreConfig guiclass="TestBeanGUI" testclass="KeystoreConfig" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="endIndex"/>
|
23
|
+
<stringProp name="preload">True</stringProp>
|
24
|
+
<stringProp name="startIndex"/>
|
25
|
+
<stringProp name="clientCertAliasVarName"/>
|
26
|
+
</KeystoreConfig>
|
27
|
+
EOS
|
28
|
+
))
|
29
|
+
update params
|
30
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LDAPExtendedRequest
|
4
|
+
# @param params [Hash] Parameters for the LDAPExtendedRequest element (default: `{}`).
|
5
|
+
# @yield block to attach to the LDAPExtendedRequest element
|
6
|
+
# @return [JmeterPerf::LDAPExtendedRequest], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#ldapextendedrequest
|
8
|
+
def ldap_extended_request(params = {}, &)
|
9
|
+
node = LDAPExtendedRequest.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LDAPExtendedRequest
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LDAPExtendedRequest" : (params[:name] || "LDAPExtendedRequest")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<LDAPExtSampler guiclass="LdapExtTestSamplerGui" testclass="LDAPExtSampler" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="servername"/>
|
23
|
+
<stringProp name="port"/>
|
24
|
+
<stringProp name="rootdn"/>
|
25
|
+
<stringProp name="scope">2</stringProp>
|
26
|
+
<stringProp name="countlimit"/>
|
27
|
+
<stringProp name="timelimit"/>
|
28
|
+
<stringProp name="attributes"/>
|
29
|
+
<stringProp name="return_object">false</stringProp>
|
30
|
+
<stringProp name="deref_aliases">false</stringProp>
|
31
|
+
<stringProp name="connection_timeout"/>
|
32
|
+
<stringProp name="parseflag">false</stringProp>
|
33
|
+
<stringProp name="secure">false</stringProp>
|
34
|
+
<stringProp name="user_dn"/>
|
35
|
+
<stringProp name="user_pw"/>
|
36
|
+
<stringProp name="comparedn"/>
|
37
|
+
<stringProp name="comparefilt"/>
|
38
|
+
<stringProp name="modddn"/>
|
39
|
+
<stringProp name="newdn"/>
|
40
|
+
</LDAPExtSampler>
|
41
|
+
EOS
|
42
|
+
))
|
43
|
+
update params
|
44
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LDAPExtendedRequestDefaults
|
4
|
+
# @param params [Hash] Parameters for the LDAPExtendedRequestDefaults element (default: `{}`).
|
5
|
+
# @yield block to attach to the LDAPExtendedRequestDefaults element
|
6
|
+
# @return [JmeterPerf::LDAPExtendedRequestDefaults], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#ldapextendedrequestdefaults
|
8
|
+
def ldap_extended_request_defaults(params = {}, &)
|
9
|
+
node = LDAPExtendedRequestDefaults.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LDAPExtendedRequestDefaults
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LDAPExtendedRequestDefaults" : (params[:name] || "LDAPExtendedRequestDefaults")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<ConfigTestElement guiclass="LdapExtConfigGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="servername"/>
|
23
|
+
<stringProp name="port"/>
|
24
|
+
<stringProp name="rootdn"/>
|
25
|
+
<stringProp name="scope">2</stringProp>
|
26
|
+
<stringProp name="countlimit"/>
|
27
|
+
<stringProp name="timelimit"/>
|
28
|
+
<stringProp name="attributes"/>
|
29
|
+
<stringProp name="return_object">false</stringProp>
|
30
|
+
<stringProp name="deref_aliases">false</stringProp>
|
31
|
+
<stringProp name="connection_timeout"/>
|
32
|
+
<stringProp name="parseflag">false</stringProp>
|
33
|
+
<stringProp name="secure">false</stringProp>
|
34
|
+
<stringProp name="user_dn"/>
|
35
|
+
<stringProp name="user_pw"/>
|
36
|
+
<stringProp name="comparedn"/>
|
37
|
+
<stringProp name="comparefilt"/>
|
38
|
+
<stringProp name="modddn"/>
|
39
|
+
<stringProp name="newdn"/>
|
40
|
+
</ConfigTestElement>
|
41
|
+
EOS
|
42
|
+
))
|
43
|
+
update params
|
44
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LDAPRequest
|
4
|
+
# @param params [Hash] Parameters for the LDAPRequest element (default: `{}`).
|
5
|
+
# @yield block to attach to the LDAPRequest element
|
6
|
+
# @return [JmeterPerf::LDAPRequest], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#ldaprequest
|
8
|
+
def ldap_request(params = {}, &)
|
9
|
+
node = LDAPRequest.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LDAPRequest
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LDAPRequest" : (params[:name] || "LDAPRequest")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<LDAPSampler guiclass="LdapTestSamplerGui" testclass="LDAPSampler" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="servername"/>
|
23
|
+
<stringProp name="port"/>
|
24
|
+
<stringProp name="rootdn"/>
|
25
|
+
<boolProp name="user_defined">false</boolProp>
|
26
|
+
<stringProp name="test">add</stringProp>
|
27
|
+
<stringProp name="base_entry_dn"/>
|
28
|
+
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
29
|
+
<collectionProp name="Arguments.arguments"/>
|
30
|
+
</elementProp>
|
31
|
+
<stringProp name="ConfigTestElement.username"/>
|
32
|
+
<stringProp name="ConfigTestElement.password"/>
|
33
|
+
</LDAPSampler>
|
34
|
+
EOS
|
35
|
+
))
|
36
|
+
update params
|
37
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LDAPRequestDefaults
|
4
|
+
# @param params [Hash] Parameters for the LDAPRequestDefaults element (default: `{}`).
|
5
|
+
# @yield block to attach to the LDAPRequestDefaults element
|
6
|
+
# @return [JmeterPerf::LDAPRequestDefaults], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#ldaprequestdefaults
|
8
|
+
def ldap_request_defaults(params = {}, &)
|
9
|
+
node = LDAPRequestDefaults.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LDAPRequestDefaults
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LDAPRequestDefaults" : (params[:name] || "LDAPRequestDefaults")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<ConfigTestElement guiclass="LdapConfigGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="servername"/>
|
23
|
+
<stringProp name="port"/>
|
24
|
+
<stringProp name="rootdn"/>
|
25
|
+
<boolProp name="user_defined">true</boolProp>
|
26
|
+
<stringProp name="test">add</stringProp>
|
27
|
+
<stringProp name="base_entry_dn"/>
|
28
|
+
<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
|
29
|
+
<collectionProp name="Arguments.arguments">
|
30
|
+
<elementProp name=" " elementType="Argument">
|
31
|
+
<stringProp name="Argument.name"> </stringProp>
|
32
|
+
<stringProp name="Argument.value"> </stringProp>
|
33
|
+
<stringProp name="Argument.metadata">=</stringProp>
|
34
|
+
</elementProp>
|
35
|
+
</collectionProp>
|
36
|
+
</elementProp>
|
37
|
+
</ConfigTestElement>
|
38
|
+
EOS
|
39
|
+
))
|
40
|
+
update params
|
41
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LoginConfigElement
|
4
|
+
# @param params [Hash] Parameters for the LoginConfigElement element (default: `{}`).
|
5
|
+
# @yield block to attach to the LoginConfigElement element
|
6
|
+
# @return [JmeterPerf::LoginConfigElement], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#loginconfigelement
|
8
|
+
def login_config_element(params = {}, &)
|
9
|
+
node = LoginConfigElement.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LoginConfigElement
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LoginConfigElement" : (params[:name] || "LoginConfigElement")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<ConfigTestElement guiclass="LoginConfigGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="ConfigTestElement.username"/>
|
23
|
+
<stringProp name="ConfigTestElement.password"/>
|
24
|
+
</ConfigTestElement>
|
25
|
+
EOS
|
26
|
+
))
|
27
|
+
update params
|
28
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element LoopController
|
4
|
+
# @param params [Hash] Parameters for the LoopController element (default: `{}`).
|
5
|
+
# @yield block to attach to the LoopController element
|
6
|
+
# @return [JmeterPerf::LoopController], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#loopcontroller
|
8
|
+
def loop_controller(params = {}, &)
|
9
|
+
node = LoopController.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class LoopController
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "LoopController" : (params[:name] || "LoopController")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="#{testname}" enabled="true">
|
22
|
+
<boolProp name="LoopController.continue_forever">true</boolProp>
|
23
|
+
<stringProp name="LoopController.loops">1</stringProp>
|
24
|
+
</LoopController>
|
25
|
+
EOS
|
26
|
+
))
|
27
|
+
update params
|
28
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element MailReaderSampler
|
4
|
+
# @param params [Hash] Parameters for the MailReaderSampler element (default: `{}`).
|
5
|
+
# @yield block to attach to the MailReaderSampler element
|
6
|
+
# @return [JmeterPerf::MailReaderSampler], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#mailreadersampler
|
8
|
+
def mail_reader_sampler(params = {}, &)
|
9
|
+
node = MailReaderSampler.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class MailReaderSampler
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "MailReaderSampler" : (params[:name] || "MailReaderSampler")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<MailReaderSampler guiclass="MailReaderSamplerGui" testclass="MailReaderSampler" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="host_type">pop3</stringProp>
|
23
|
+
<stringProp name="folder">INBOX</stringProp>
|
24
|
+
<stringProp name="host"/>
|
25
|
+
<stringProp name="username"/>
|
26
|
+
<stringProp name="password"/>
|
27
|
+
<intProp name="num_messages">-1</intProp>
|
28
|
+
<boolProp name="delete">false</boolProp>
|
29
|
+
<stringProp name="SMTPSampler.useSSL">false</stringProp>
|
30
|
+
<stringProp name="SMTPSampler.useStartTLS">false</stringProp>
|
31
|
+
<stringProp name="SMTPSampler.trustAllCerts">false</stringProp>
|
32
|
+
<stringProp name="SMTPSampler.enforceStartTLS">false</stringProp>
|
33
|
+
<stringProp name="SMTPSampler.useLocalTrustStore">false</stringProp>
|
34
|
+
<stringProp name="SMTPSampler.trustStoreToUse"/>
|
35
|
+
</MailReaderSampler>
|
36
|
+
EOS
|
37
|
+
))
|
38
|
+
update params
|
39
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element MailerVisualizer
|
4
|
+
# @param params [Hash] Parameters for the MailerVisualizer element (default: `{}`).
|
5
|
+
# @yield block to attach to the MailerVisualizer element
|
6
|
+
# @return [JmeterPerf::MailerVisualizer], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#mailervisualizer
|
8
|
+
def mailer_visualizer(params = {}, &)
|
9
|
+
node = MailerVisualizer.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class MailerVisualizer
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "MailerVisualizer" : (params[:name] || "MailerVisualizer")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<MailerResultCollector guiclass="MailerVisualizer" testclass="MailerResultCollector" testname="#{testname}" enabled="true">
|
22
|
+
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
23
|
+
<objProp>
|
24
|
+
<name>saveConfig</name>
|
25
|
+
<value class="SampleSaveConfiguration">
|
26
|
+
<time>true</time>
|
27
|
+
<latency>true</latency>
|
28
|
+
<timestamp>true</timestamp>
|
29
|
+
<success>true</success>
|
30
|
+
<label>true</label>
|
31
|
+
<code>true</code>
|
32
|
+
<message>false</message>
|
33
|
+
<threadName>true</threadName>
|
34
|
+
<dataType>false</dataType>
|
35
|
+
<encoding>false</encoding>
|
36
|
+
<assertions>false</assertions>
|
37
|
+
<subresults>false</subresults>
|
38
|
+
<responseData>false</responseData>
|
39
|
+
<samplerData>false</samplerData>
|
40
|
+
<xml>false</xml>
|
41
|
+
<fieldNames>false</fieldNames>
|
42
|
+
<responseHeaders>false</responseHeaders>
|
43
|
+
<requestHeaders>false</requestHeaders>
|
44
|
+
<responseDataOnError>false</responseDataOnError>
|
45
|
+
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
46
|
+
<assertionsResultsToSave>0</assertionsResultsToSave>
|
47
|
+
<bytes>true</bytes>
|
48
|
+
<threadCounts>true</threadCounts>
|
49
|
+
<sampleCount>true</sampleCount>
|
50
|
+
</value>
|
51
|
+
</objProp>
|
52
|
+
<elementProp name="MailerResultCollector.mailer_model" elementType="MailerModel">
|
53
|
+
<stringProp name="MailerModel.successLimit">2</stringProp>
|
54
|
+
<stringProp name="MailerModel.failureLimit">2</stringProp>
|
55
|
+
<stringProp name="MailerModel.failureSubject"/>
|
56
|
+
<stringProp name="MailerModel.fromAddress"/>
|
57
|
+
<stringProp name="MailerModel.smtpHost"/>
|
58
|
+
<stringProp name="MailerModel.successSubject"/>
|
59
|
+
<stringProp name="MailerModel.addressie"/>
|
60
|
+
</elementProp>
|
61
|
+
<stringProp name="filename"/>
|
62
|
+
</MailerResultCollector>
|
63
|
+
EOS
|
64
|
+
))
|
65
|
+
update params
|
66
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module JmeterPerf
|
2
|
+
class DSL
|
3
|
+
# DSL method synonymous with the JMeter Element MD5HexAssertion
|
4
|
+
# @param params [Hash] Parameters for the MD5HexAssertion element (default: `{}`).
|
5
|
+
# @yield block to attach to the MD5HexAssertion element
|
6
|
+
# @return [JmeterPerf::MD5HexAssertion], a subclass of JmeterPerf::DSL that can be chained with other DSL methods.
|
7
|
+
# @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#md5hexassertion
|
8
|
+
def md5_hex_assertion(params = {}, &)
|
9
|
+
node = MD5HexAssertion.new(params)
|
10
|
+
attach_node(node, &)
|
11
|
+
end
|
12
|
+
|
13
|
+
class MD5HexAssertion
|
14
|
+
attr_accessor :doc
|
15
|
+
include JmeterPerf::Helpers::XmlDocumentUpdater
|
16
|
+
|
17
|
+
def initialize(params = {})
|
18
|
+
testname = params.is_a?(Array) ? "MD5HexAssertion" : (params[:name] || "MD5HexAssertion")
|
19
|
+
@doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
|
20
|
+
<<~EOS
|
21
|
+
<MD5HexAssertion guiclass="MD5HexAssertionGUI" testclass="MD5HexAssertion" testname="#{testname}" enabled="true">
|
22
|
+
<stringProp name="MD5HexAssertion.size"/>
|
23
|
+
</MD5HexAssertion>
|
24
|
+
EOS
|
25
|
+
))
|
26
|
+
update params
|
27
|
+
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|