Class: JmeterPerf::Helpers::DSLGenerator
- Inherits:
-
Object
- Object
- JmeterPerf::Helpers::DSLGenerator
- Defined in:
- lib/jmeter_perf/helpers/dsl_generator.rb
Overview
The DSLGenerator class generates the DSL methods and files for use in JMeter performance testing scripts. It uses a JMeter TestPlan (idl.xml) to generate the methods and files.
Instance Method Summary collapse
-
#generate ⇒ void
Main method to generate DSL files and methods.
-
#initialize(dsl_dir:, idl_xml_path:, document_dsl: true) ⇒ DSLGenerator
constructor
Initializes the DSLGenerator.
Constructor Details
#initialize(dsl_dir:, idl_xml_path:, document_dsl: true) ⇒ DSLGenerator
Initializes the DSLGenerator.
16 17 18 19 20 |
# File 'lib/jmeter_perf/helpers/dsl_generator.rb', line 16 def initialize(dsl_dir:, idl_xml_path:, document_dsl: true) @document_dsl = document_dsl @dsl_dir = dsl_dir @idl_xml_path = idl_xml_path end |
Instance Method Details
#generate ⇒ void
This method returns an undefined value.
Main method to generate DSL files and methods. It parses the XML, generates methods, documents, updates RBS files, and creates individual DSL files.
26 27 28 29 30 31 32 33 |
# File 'lib/jmeter_perf/helpers/dsl_generator.rb', line 26 def generate results = parse_xml methods = generate_methods(results) write_methods_to_dsl_md(methods) if @document_dsl update_rbs(methods) if @document_dsl create_dsl_files(results) end |