Sha256: 8f71bb0ae0f39331406201cc6037d523d027812ee7488ffddfd6017a3c801ff9

Contents?: true

Size: 1.63 KB

Versions: 22

Compression:

Stored size: 1.63 KB

Contents

require 'spec_helper'

describe 'thread groups' do
  let(:doc) do
    test do
      threads count: 101, continue_forever: true, duration: 69
    end.to_doc
  end

  let(:fragment) { doc.search("//ThreadGroup").first }

  it 'should match on num_threads' do
    expect(fragment.search(".//stringProp[@name='ThreadGroup.num_threads']").text).to eq '101'
  end

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

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

  it 'should match on loops' do
    expect(fragment.search(".//intProp[@name='LoopController.loops']").text).to eq '-1'
  end

  it 'should match on duration' do
    expect(fragment.search(".//stringProp[@name='ThreadGroup.duration']").text).to eq '69'
  end
end

describe 'thread groups old syntax' do
  let(:doc) do
    test do
      threads 101, continue_forever: true, duration: 69
    end.to_doc
  end

  let(:fragment) { doc.search("//ThreadGroup").first }

  it 'should match on num_threads' do
    expect(fragment.search(".//stringProp[@name='ThreadGroup.num_threads']").text).to eq '101'
  end

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

  it 'should match on loops' do
    expect(fragment.search(".//intProp[@name='LoopController.loops']").text).to eq '-1'
  end

  it 'should match on duration' do
    expect(fragment.search(".//stringProp[@name='ThreadGroup.duration']").text).to eq '69'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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