ruby-jmeter 2.11.13 → 2.11.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe5937907349b4ede5934ae13e9e5302bc0343eb
4
- data.tar.gz: 39ce5f34554cab1480d37aad306a761ac2111ce8
3
+ metadata.gz: 67a60573f66af6ab159d28c8b8b876c7c9d0b7ef
4
+ data.tar.gz: 90d5846d4587cc7cf57304d232ad7420e4acc548
5
5
  SHA512:
6
- metadata.gz: cb677c96181b33dfe5d0aa75a4553255fbf3add341b59bcb24ef2a06fde5fc83f7cc5869961d238dd73fe49181fa311071c0fc95749e695ed4e32b778878c93e
7
- data.tar.gz: a1ee997c5b54e2f946ab5c09afa745f5cc46b36441e3228c9d926f55c58c3e2608d8de7c65f4b9168f1f72abf6ce188ac50423372d4033f7c6ff1c822a78e61c
6
+ metadata.gz: 60d5c3d72ef8df7a94d7d46f4a2b7c5838e0972168d0adcb38b7ac9b54ec702fa99fe806b389377a0cd9ee684948b8f3d111e20b74acc86c783bbc13cc3ab7ac
7
+ data.tar.gz: 0f018a65cef4afa254a08e9081f7d9311d7e4527cf88ddbe06a95046fbfe2130eeb71b7c9cd56a3d23d132405981c156eb954f917f043e9bba9795b44e3b335d
@@ -6,7 +6,8 @@ test do
6
6
  transaction name: "TC_03", parent: true, include_timers: true do
7
7
  submit url: "/", fill_in: { username: 'tim', password: 'password' },
8
8
  files: [{path: '/tmp/foo', paramname: 'fileup', mimetype: 'text/plain'},
9
- {path: '/tmp/bar', paramname: 'otherfileup'}]
9
+ {path: '/tmp/bar', paramname: 'otherfileup'}],
10
+ 'DO_MULTIPART_POST' => true
10
11
  end
11
12
  end
12
- end
13
+ end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
@@ -1,14 +1,28 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'ruby-jmeter'
3
3
 
4
+ module RubyJmeter
5
+ class ExtendedDSL < DSL
6
+ def test_method_here
7
+ puts "here be dragons"
8
+ end
9
+ end
10
+ end
11
+
4
12
  # Define your page objects
5
13
  class HomePage
6
14
  def initialize(dsl)
7
15
  @dsl = dsl
8
16
  end
9
17
 
18
+ def test_method_unreachable
19
+ puts "I can never be reached from ExtendedDSL"
20
+ end
21
+
10
22
  def visit
11
- get name: 'home', url: '/'
23
+ get name: 'home', url: '/' do
24
+ test_method_here
25
+ end
12
26
  end
13
27
 
14
28
  private
@@ -20,7 +20,7 @@ module RubyJmeter
20
20
  <stringProp name="RegexExtractor.template"/>
21
21
  <stringProp name="RegexExtractor.default"/>
22
22
  <stringProp name="RegexExtractor.match_number"/>
23
- <stringProp name="Sample.scope">all</stringProp>
23
+ #{"<stringProp name=\"Sample.scope\">params[:scope]</stringProp>" if params[:scope]}
24
24
  </RegexExtractor>)
25
25
  EOS
26
26
  update params
@@ -132,6 +132,16 @@ module RubyJmeter
132
132
  attach_node(node, &block)
133
133
  end
134
134
 
135
+ def patch(*args, &block)
136
+ params = args.shift || {}
137
+ params = { url: params }.merge(args.shift || {}) if params.class == String
138
+ params[:method] ||= 'PATCH'
139
+ params[:name] ||= params[:url]
140
+ parse_http_request(params)
141
+ node = RubyJmeter::HttpRequest.new(params)
142
+ attach_node(node, &block)
143
+ end
144
+
135
145
  def with_xhr
136
146
  http_header_manager name: 'X-Requested-With',
137
147
  value: 'XMLHttpRequest'
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.13"
2
+ VERSION = "2.11.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.13
4
+ version: 2.11.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-24 00:00:00.000000000 Z
11
+ date: 2014-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client