gridinit-jmeter 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gemspec
5
5
 
6
6
  gem 'nokogiri'
7
7
  gem 'rest-client'
8
+ gem 'json'
8
9
 
9
10
  platforms :jruby do
10
11
  gem 'json-jruby'
@@ -6,7 +6,7 @@ test do
6
6
  transaction 'Assertions' do
7
7
  visit 'Altentee', 'http://altentee.com/' do
8
8
  assert "contains", "We test, tune and secure your site"
9
- assert "not-contains", "Something in frames", {scope: 'all'}
9
+ assert "not-contains", "Something in frames", {:scope => 'all'}
10
10
  end
11
11
  end
12
12
  end
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
- auth url: '/', username: 'tim', password: 'secret', domain: 'altentee.com'
5
+ auth :url => '/', :username => 'tim', :password => 'secret', :domain => 'altentee.com'
6
6
  threads 1 do
7
7
  transaction 'Google Search' do
8
8
  visit 'Home Page', 'http://google.com/'
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
- cache clear_each_iteration: true
5
+ cache :clear_each_iteration => true
6
6
  threads 1 do
7
7
  transaction 'Google Search' do
8
8
  visit 'Home Page', 'http://google.com/'
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
- cookies clear_each_iteration: false
5
+ cookies :clear_each_iteration => false
6
6
  threads 1 do
7
7
  transaction 'Google Search' do
8
8
  visit 'Home Page', 'http://google.com/'
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
- threads 1, { loops: 10 } do
5
+ threads 1, { :loops => 10 } do
6
6
  visit 'Google Search', 'http://google.com'
7
7
  end
8
8
 
@@ -3,9 +3,9 @@ require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
5
  think_time 100
6
- threads 100, {ramp_time: 10, loops: 10} do
6
+ threads 100, {:ramp_time => 10, :loops => 10} do
7
7
  transaction 'Home Page' do
8
8
  visit 'Altentee', 'http://127.0.0.1:9200/'
9
9
  end
10
10
  end
11
- end.grid('4dy-zJLEIgpYkKe6p6JhSQ', {endpoint: '127.0.0.1:3000', region: 'ap_southeast_1'})
11
+ end.grid('4dy-zJLEIgpYkKe6p6JhSQ', {:endpoint => '127.0.0.1:3000', :region => 'ap_southeast_1'})
@@ -5,9 +5,9 @@ test do
5
5
 
6
6
  threads 1 do
7
7
 
8
- transaction 'Post with a Raw Body', {parent: true} do
8
+ transaction 'Post with a Raw Body', {:parent => true} do
9
9
  post 'Home Page', 'http://google.com', {
10
- raw_body: '{"name":"Big Poncho","price":10,"vendor_attendance_id":24,"product_id":1}'
10
+ :raw_body => '{"name":"Big Poncho","price":10,"vendor_attendance_id":24,"product_id":1}'
11
11
  }
12
12
  end
13
13
 
@@ -5,4 +5,4 @@ test do
5
5
  threads 10 do
6
6
  visit 'Google Search', 'http://google.com'
7
7
  end
8
- end.grid('4dy-zJLEIgpYkKe6p6JhSQ', {proxy: 'http://corporateproxy:8080'})
8
+ end.grid('4dy-zJLEIgpYkKe6p6JhSQ', {:proxy => 'http://corporateproxy:8080'})
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
- threads 1, { loops: 10 } do
5
+ threads 1, { :loops => 10 } do
6
6
  visit 'Google Search', 'http://google.com'
7
7
  end
8
8
 
@@ -6,7 +6,7 @@ test do
6
6
  visit 'Google Search', 'http://google.com'
7
7
  end
8
8
  end.run(
9
- path: '/usr/share/jmeter/bin/',
10
- file: 'jmeter.jmx',
11
- log: 'jmeter.log',
12
- jtl: 'results.jtl')
9
+ :path => '',
10
+ :file => 'jmeter.jmx',
11
+ :log => 'jmeter.log',
12
+ :jtl => 'results.jtl')
@@ -6,14 +6,14 @@ endpoint = 'localhost:3000'
6
6
 
7
7
  test do
8
8
 
9
- cache clear_each_iteration: true
9
+ cache :clear_each_iteration => true
10
10
  cookies
11
11
 
12
12
  threads 100 do
13
13
 
14
14
  random_timer 3000, 3000
15
15
 
16
- transaction 'First Visit', {parent: true} do
16
+ transaction 'First Visit', {:parent => true} do
17
17
  visit 'Home Page', "#{base_url}/" do
18
18
  extract 'csrf-token', "content='(.+?)' name='csrf-token'"
19
19
  end
@@ -21,9 +21,9 @@ test do
21
21
 
22
22
  transaction 'Login' do
23
23
  submit 'Submit Form', "#{base_url}/login", {
24
- fill_in: {
25
- username: 'tim',
26
- password: 'password',
24
+ :fill_in => {
25
+ :username => 'tim',
26
+ :password => 'password',
27
27
  'csrf-token' => '${csrf-token}'
28
28
  }
29
29
  }
@@ -3,13 +3,13 @@ require 'gridinit-jmeter'
3
3
 
4
4
  test do
5
5
 
6
- defaults domain: 'www.etsy.com'
6
+ defaults :domain => 'www.etsy.com'
7
7
 
8
- cache clear_each_iteration: true
8
+ cache :clear_each_iteration => true
9
9
 
10
10
  cookies
11
11
 
12
- threads 1, {loops: 10} do
12
+ threads 1, {:loops => 10} do
13
13
 
14
14
  random_timer 1000, 3000
15
15
 
@@ -22,13 +22,13 @@ test do
22
22
  once do
23
23
  transaction '02_etsy_signin' do
24
24
  submit 'signin', 'https://www.etsy.com/signin', {
25
- fill_in: {
26
- username: 'tim.koops@gmail.com',
27
- password: ARGV[0],
28
- persistent: 1,
29
- from_page: 'http://www.etsy.com/',
30
- from_action: '',
31
- from_overlay: 1
25
+ :fill_in => {
26
+ :username => 'tim.koops@gmail.com',
27
+ :password => ARGV[0],
28
+ :persistent => 1,
29
+ :from_page => 'http://www.etsy.com/',
30
+ :from_action => '',
31
+ :from_overlay => 1
32
32
  }
33
33
  } do
34
34
  assert 'contains', 'Tim'
@@ -5,12 +5,12 @@ require 'open-uri'
5
5
  test do
6
6
 
7
7
  defaults(
8
- domain: 'now.jbhifi.com.au',
9
- protocol: 'https',
10
- image_parser: true,
11
- concurrentDwn: true,
12
- embedded_url_re: '.+?now.((?!\$\{).)*$',
13
- concurrentPool: 4
8
+ :domain => 'now.jbhifi.com.au',
9
+ :protocol => 'https',
10
+ :image_parser => true,
11
+ :concurrentDwn => true,
12
+ :embedded_url_re => '.+?now.((?!\$\{).)*$',
13
+ :concurrentPool => 4
14
14
  )
15
15
 
16
16
  header(
@@ -18,20 +18,20 @@ test do
18
18
  'Accept' => '*/*'
19
19
  )
20
20
 
21
- cache clear_each_iteration: true
21
+ cache :clear_each_iteration => true
22
22
 
23
23
  cookies
24
24
 
25
- threads 3, {loops: 3} do
25
+ threads 3, {:loops => 3} do
26
26
 
27
27
  random_timer 1000, 1500
28
28
 
29
29
  transaction 'jbhifi_home' do
30
30
  visit 'home', '/'
31
31
  visit 'choose', '/music/Home/Choose/?_=${__time(,)}', {
32
- follow_redirects: false,
33
- image_parser: true,
34
- embedded_url_re: 'none',
32
+ :follow_redirects => false,
33
+ :image_parser => true,
34
+ :embedded_url_re => 'none',
35
35
  } do
36
36
  header('X-Requested-With' => 'XMLHttpRequest')
37
37
  assert 'contains', 'WELCOME TO JB HI-FI NOW'
@@ -55,7 +55,7 @@ test do
55
55
 
56
56
  transaction'jbhifi_search' do
57
57
  post 'search', '/music/Search/Search', {
58
- fill_in: {
58
+ :fill_in => {
59
59
  'searchType' => 'KW',
60
60
  'keyword' => 'deadmau5',
61
61
  'numRecords' => 25
@@ -63,22 +63,22 @@ test do
63
63
  } do
64
64
  header('X-Requested-With' => 'XMLHttpRequest')
65
65
  extract 'id', '"c":"(.+?)"', {
66
- match_number: 0,
67
- template: '$1$'
66
+ :match_number => 0,
67
+ :template => '$1$'
68
68
  }
69
69
  end
70
70
  end
71
71
 
72
72
  transaction'jbhifi_add_to_playlist' do
73
73
  post 'playlist', '/music/Playlist/AddPreview/', {
74
- fill_in: {
74
+ :fill_in => {
75
75
  'id' => '${id}'
76
76
  }
77
77
  } do
78
78
  header('X-Requested-With' => 'XMLHttpRequest')
79
79
  extract 'mp3', '"mp3":"(.+?)"', {
80
- match_number: 0,
81
- template: '$1$'
80
+ :match_number => 0,
81
+ :template => '$1$'
82
82
  }
83
83
  end
84
84
  end
@@ -31,9 +31,9 @@ module Gridinit
31
31
  @root.at_xpath("//jmeterTestPlan/hashTree") << node.doc.children << hash_tree
32
32
 
33
33
  variables(
34
- name: 'testguid',
35
- value: '${__P(testguid,${__time(,)})}',
36
- comments: 'The testguid variable is mandatory when running on the Grid.') {}
34
+ :name => 'testguid',
35
+ :value => '${__P(testguid,${__time(,)})}',
36
+ :comments => 'The testguid variable is mandatory when running on the Grid.') {}
37
37
  end
38
38
 
39
39
  def variables(params={}, &block)
@@ -34,7 +34,7 @@ module Gridinit
34
34
  raw_body(params) if params[:raw_body]
35
35
  params[:params] && params[:params].split('&').each do |param|
36
36
  name,value = param.split('=')
37
- fill_in({ fill_in: { "#{name}" => value }, always_encode: params[:always_encode] })
37
+ fill_in({ :fill_in => { "#{name}" => value }, :always_encode => params[:always_encode] })
38
38
  end
39
39
  update params
40
40
  end
@@ -1,5 +1,5 @@
1
1
  module Gridinit
2
2
  module Jmeter
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridinit-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-27 00:00:00.000000000 Z
12
+ date: 2013-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client