ruby-jmeter 2.11.7 → 2.11.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 292b0362da06efe27eef6c870a97d1d6765f9ee9
4
- data.tar.gz: e5cc75c8bae12aefbbc43472a09d74ab7a7ee09d
3
+ metadata.gz: 99deb58961a1b46d676136d9acd3d37ec93e2787
4
+ data.tar.gz: e961ced2509fc856c894c3df5f73e2e0a0511751
5
5
  SHA512:
6
- metadata.gz: d46aabc1687ceea00fffb3d056027a94e668412f716987c39dc1f4ed59f3d0140b61358dbb82056c91af4b21936792aa6bc86aa3e2c3445892ff3228e41d14e3
7
- data.tar.gz: 181e7695085cc948f84dfdc3d6f2b2ba9775bb2d1dd58ae4d58b53b1c59fab0327f7f27748d3ad8bf24bcf54061251f3b22b7caba136250dc604468543e31471
6
+ metadata.gz: 9a20e071d86ba0491e3d0c38f4c5e451bbebc61a7ce1c8b07e0c79a8380ba13de60ae4a2e1b301aa47e5b8baab49ca9a81a31f8ad0b0bfd2b55839cea96311ed
7
+ data.tar.gz: a215cbc73afe7dcf55de35697b16363f7addb6754c6051792402dc643573717f249195e286f847fa273e1c4e21c1ae5c536d3adc4faf3f297102db8acfa5dde8
@@ -0,0 +1,27 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ # Define your page objects
5
+ class HomePage
6
+ def initialize(dsl)
7
+ @dsl = dsl
8
+ end
9
+
10
+ def visit
11
+ get name: 'home', url: '/'
12
+ end
13
+
14
+ private
15
+
16
+ def method_missing method, *args, &block
17
+ @dsl.__send__ method, *args, &block
18
+ end
19
+ end
20
+
21
+ test do
22
+ threads count: 1 do
23
+ # then re-use your page objects in your test plan
24
+ home = HomePage.new(self)
25
+ home.visit
26
+ end
27
+ end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
@@ -192,7 +192,7 @@ module RubyJmeter
192
192
  def transaction_controller(*args, &block)
193
193
  params = args.shift || {}
194
194
  params = { name: params }.merge(args.shift || {}) if params.class == String
195
- params[:parent] ||= true
195
+ params[:parent] = params[:parent] || false
196
196
  params[:includeTimers] = params[:include_timers] || false
197
197
  node = RubyJmeter::TransactionController.new(params)
198
198
  attach_node(node, &block)
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.7"
2
+ VERSION = "2.11.8"
3
3
  end
data/spec/dsl_spec.rb CHANGED
@@ -211,19 +211,28 @@ describe "DSL" do
211
211
  let(:doc) do
212
212
  test do
213
213
  threads do
214
- transaction name: "TC_01", parent: true, include_timers: true
214
+ transaction name: "TC_01", parent: false, include_timers: true
215
+ transaction name: "TC_02", parent: true, include_timers: false
215
216
  end
216
217
  end.to_doc
217
218
  end
218
219
 
219
- let(:fragment) { doc.search("//TransactionController").first }
220
+ let(:fragment) { doc.search("//TransactionController") }
220
221
 
221
- it 'should match on parent' do
222
- fragment.search(".//boolProp[@name='TransactionController.parent']").text.should == 'true'
222
+ it 'should match on parent when false' do
223
+ fragment.first.search(".//boolProp[@name='TransactionController.parent']").text.should == 'false'
223
224
  end
224
225
 
225
- it 'should match on includeTimers' do
226
- fragment.search(".//boolProp[@name='TransactionController.includeTimers']").text.should == 'true'
226
+ it 'should match on includeTimers when true' do
227
+ fragment.first.search(".//boolProp[@name='TransactionController.includeTimers']").text.should == 'true'
228
+ end
229
+
230
+ it 'should match on parent when true' do
231
+ fragment.last.search(".//boolProp[@name='TransactionController.parent']").text.should == 'true'
232
+ end
233
+
234
+ it 'should match on includeTimers when false' do
235
+ fragment.last.search(".//boolProp[@name='TransactionController.includeTimers']").text.should == 'false'
227
236
  end
228
237
  end
229
238
 
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.7
4
+ version: 2.11.8
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-05-11 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -87,6 +87,7 @@ files:
87
87
  - examples/etsy_login_browse.rb
88
88
  - examples/real_flood_test_data.rb
89
89
  - examples/real_immi.gov.au_visa.rb
90
+ - examples/real_page_objects.rb
90
91
  - lib/ruby-jmeter.rb
91
92
  - lib/ruby-jmeter/DSL.md
92
93
  - lib/ruby-jmeter/dsl.rb