ruby-jmeter 2.11.16 → 2.11.17

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: b5fb0b5f10334bf10d37a62df16e3a9a217bdcb3
4
- data.tar.gz: 6a4fb17cffef7f8c751fe15975674f559007e07e
3
+ metadata.gz: 02ce67a974c4589ea7193adbb2f3b51ac0d0fdbf
4
+ data.tar.gz: d1962fded2994b67cc63f8695c51ac22942bba78
5
5
  SHA512:
6
- metadata.gz: 5ea752e1b074b91c75c151455b7b773edbec32963fec67091ca8f2c33df5fed59e740bc8ef61a4975e92f18c9f894cc82b00b5242a82ef095cafca53dbaaadc5
7
- data.tar.gz: 493ec7b8294dc3d4d0092136d862ea74f4cf437e73e92c03373bfbc5e05a99cee9519ec832e76e14a29ffa86dfdd2dd1c6dfce93d5c3349ec78be7dfc2035357
6
+ metadata.gz: 0eb1dfdb201290ad691154ee164148c95daf2805d45a185332da9db86c7b31af45f3b03d265db76334effeb12f4a0a3938c6fbcdeff287b731a7ae897310054e
7
+ data.tar.gz: 7dd9b6abd25deb8fda38b9ad392b18b88c4f80578fcfee9090b3e0ffd46ea21377b259d26f16c0a790a6516e4c9a3d6a29f0224f2c81ca0d27bde19b2d18aa01
@@ -5,6 +5,7 @@ test do
5
5
  threads count: 100 do
6
6
  visit name: 'Home', url: 'http://altentee.com' do
7
7
  extract regex: "content='(.+?)' name='csrf-token'", name: 'csrf-token'
8
+ extract regex: 'pattern', name: 'jmeter_variable_regex', variable: 'test'
8
9
  end
9
10
  end
10
- end.run(path: '/usr/share/jmeter/bin/', gui: true)
11
+ end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
@@ -21,6 +21,8 @@ module RubyJmeter
21
21
  <stringProp name="RegexExtractor.default"/>
22
22
  <stringProp name="RegexExtractor.match_number"/>
23
23
  #{"<stringProp name=\"Sample.scope\">params[:scope]</stringProp>" if params[:scope]}
24
+ #{"<stringProp name=\"Sample.scope\">variable</stringProp>" if params[:variable]}
25
+ #{"<stringProp name=\"Scope.variable\">params[:variable]</stringProp>" if params[:variable]}
24
26
  </RegexExtractor>)
25
27
  EOS
26
28
  update params
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.16"
2
+ VERSION = "2.11.17"
3
3
  end
data/spec/dsl_spec.rb CHANGED
@@ -640,6 +640,21 @@ describe "DSL" do
640
640
  end
641
641
 
642
642
 
643
+ describe 'regex extract with variable' do
644
+ let(:doc) do
645
+ test do
646
+ extract regex: 'pattern', name: 'my_regex', variable: 'test'
647
+ end.to_doc
648
+ end
649
+
650
+ let(:fragment) { doc.search("//RegexExtractor").first }
651
+
652
+ it 'should match on refname' do
653
+ fragment.search(".//stringProp[@name='Scope.variable']").text.should == 'test'
654
+ end
655
+ end
656
+
657
+
643
658
  describe 'xpath extract' do
644
659
  let(:doc) do
645
660
  test do
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.16
4
+ version: 2.11.17
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-08-29 00:00:00.000000000 Z
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client