Sha256: b787f0616e7cded41c8778797514d8368f2538ae016bc528bced41a8693219a3

Contents?: true

Size: 1.38 KB

Versions: 22

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'

describe 'user_parameters' do
  let(:doc) do
    test do
      threads do
        transaction name: 'user_parameters', parent: true, include_timers: true do
          visit url: "/" do
            user_parameters names: ['name1', 'name2'],
              thread_values: {
                user_1: [
                  'value1',
                  'value2'
                ],

                user_2: [
                  'value1',
                  'value2'
                ]
              },
              per_iteration: true
          end
        end
      end
    end.to_doc
  end

  let(:fragment) { doc.search('//UserParameters').first }
  let(:names) { doc.search("//collectionProp[@name='UserParameters.names']").first }
  let(:thread_values) { doc.search("//collectionProp[@name='UserParameters.thread_values']").first }

  it 'should match on names' do
    expect(names.search(".//stringProp[@name='name1']").text).to eq 'name1'
    expect(names.search(".//stringProp[@name='name2']").text).to eq 'name2'
  end

  it 'should match on thread values' do
    expect(thread_values.search(".//stringProp[@name='0']").first.text).to eq 'value1'
    expect(thread_values.search(".//stringProp[@name='1']").first.text).to eq 'value2'
  end

  it 'should match on per iteration' do
    expect(fragment.search(".//boolProp[@name='UserParameters.per_iteration']").text).to eq 'true'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ruby-jmeter-3.1.08 spec/user_parameters_spec.rb
ruby-jmeter-3.1.07 spec/user_parameters_spec.rb
ruby-jmeter-3.1.06 spec/user_parameters_spec.rb
ruby-jmeter-3.1.05 spec/user_parameters_spec.rb
ruby-jmeter-3.1.04 spec/user_parameters_spec.rb
ruby-jmeter-3.1.03 spec/user_parameters_spec.rb
ruby-jmeter-3.1.02 spec/user_parameters_spec.rb
ruby-jmeter-3.1.01 spec/user_parameters_spec.rb
ruby-jmeter-3.0.13 spec/user_parameters_spec.rb
ruby-jmeter-3.0.12 spec/user_parameters_spec.rb
ruby-jmeter-3.0.11 spec/user_parameters_spec.rb
ruby-jmeter-3.0.10 spec/user_parameters_spec.rb
ruby-jmeter-3.0.9 spec/user_parameters_spec.rb
ruby-jmeter-3.0.8 spec/user_parameters_spec.rb
ruby-jmeter-3.0.7 spec/user_parameters_spec.rb
ruby-jmeter-3.0.6 spec/user_parameters_spec.rb
ruby-jmeter-3.0.5 spec/user_parameters_spec.rb
ruby-jmeter-3.0.4 spec/user_parameters_spec.rb
ruby-jmeter-3.0.3 spec/user_parameters_spec.rb
ruby-jmeter-3.0.2 spec/user_parameters_spec.rb