Sha256: 4bb6c031edf4c0a432c073c8c95cd6015c9b4c1f616a497b64ec25e4f4c32bc6

Contents?: true

Size: 1.38 KB

Versions: 22

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'

describe 'xhr' do
  let(:doc) do
    test do
      threads do
        transaction name: "TC_02", parent: true, include_timers: true do
          visit url: "/" do
            with_xhr
          end
        end
      end
    end.to_doc
  end

  let(:fragment) { doc.search('//HeaderManager').first }

  it 'should match on XHR' do
    expect(fragment.search(".//stringProp[@name='Header.value']").text).to eq 'XMLHttpRequest'
  end
end

describe 'gzip' do
  let(:doc) do
    test do
      threads do
        transaction name: 'TC_02', parent: true, include_timers: true do
          visit url: '/' do
            with_gzip
          end
        end
      end
    end.to_doc
  end

  let(:fragment) { doc.search('//HeaderManager').first }

  it 'should match on Acept Encoding' do
    expect(fragment.search(".//stringProp[@name='Header.value']").text).to eq 'gzip, deflate'
  end
end

describe 'user agent' do
  let(:doc) do
    test do
      with_user_agent :chrome
      threads
    end.to_doc
  end

  let(:fragment) { doc.search('//HeaderManager').first }

  it 'should match on user_agent' do
    expect(fragment.search(".//stringProp[@name='Header.name']").text).to eq 'User-Agent'
    expect(fragment.search(".//stringProp[@name='Header.value']").text).to eq 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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