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 +4 -4
- data/examples/basic_extract.rb +2 -1
- data/lib/ruby-jmeter/dsl/regular_expression_extractor.rb +2 -0
- data/lib/ruby-jmeter/version.rb +1 -1
- data/spec/dsl_spec.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02ce67a974c4589ea7193adbb2f3b51ac0d0fdbf
|
4
|
+
data.tar.gz: d1962fded2994b67cc63f8695c51ac22942bba78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eb1dfdb201290ad691154ee164148c95daf2805d45a185332da9db86c7b31af45f3b03d265db76334effeb12f4a0a3938c6fbcdeff287b731a7ae897310054e
|
7
|
+
data.tar.gz: 7dd9b6abd25deb8fda38b9ad392b18b88c4f80578fcfee9090b3e0ffd46ea21377b259d26f16c0a790a6516e4c9a3d6a29f0224f2c81ca0d27bde19b2d18aa01
|
data/examples/basic_extract.rb
CHANGED
@@ -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
|
data/lib/ruby-jmeter/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|