Sha256: 7867934f7ed2a878666688c2f77f43b3a01ebeb883210bbd7deb343876caeff8

Contents?: true

Size: 1009 Bytes

Versions: 14

Compression:

Stored size: 1009 Bytes

Contents

module RubyJmeter
  class DSL
    def user_defined_variables(params={}, &block)
      node = RubyJmeter::UserDefinedVariables.new(params)
      attach_node(node, &block)
    end
  end

  class UserDefinedVariables
    attr_accessor :doc
    include Helper

    def initialize(params={})
      testname = params.kind_of?(Array) ? 'UserDefinedVariables' : (params[:name] || 'UserDefinedVariables')
      @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
  <collectionProp name="Arguments.arguments">
    <elementProp name="testguid" elementType="Argument">
      <stringProp name="Argument.name"/>
      <stringProp name="Argument.value"/>
      <stringProp name="Argument.metadata">=</stringProp>
    </elementProp>
  </collectionProp>
  <stringProp name="TestPlan.comments"/>
</Arguments>)
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby-jmeter-2.1.7 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.6 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.5 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.4 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.3 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.2 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.1 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.1.0 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.9 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.8 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.7 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.6 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.5 lib/ruby-jmeter/dsl/user_defined_variables.rb
ruby-jmeter-2.0.4 lib/ruby-jmeter/dsl/user_defined_variables.rb