ruby-jmeter 2.13.1 → 2.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/examples/basic_loadosophia.rb +18 -0
- data/lib/ruby-jmeter/dsl.rb +9 -0
- data/lib/ruby-jmeter/plugins/loadosophia_uploader.rb +63 -0
- data/lib/ruby-jmeter/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a0fc5d3feba8fe5cffe5ab6d7adb26847492ba
|
4
|
+
data.tar.gz: b71b11d79fe62f97a5e663947e9f378f91f7f75c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0df33efe3f01b6eeea2269a25b756f5265d4b3fc70f976b5ada0b8d448798dce3380fcb0cdfd31a6a7d2dc9c34d8b1b478c884aad23d8ac18e4ea66dda2d80c
|
7
|
+
data.tar.gz: a4a6cf46e43aed3a9dc4260fd414182b0bdc4d2743be10373fef6ee3b9ee8f080fc453af18e877b0c4cb07124737a3b3ff037f54014ba05a035905d3884662e1
|
data/CHANGES.md
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'ruby-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
|
6
|
+
# You need to either add the project name and upload token from Loadosophia.org here,
|
7
|
+
# or use a property file (-q flag when running jmeter).
|
8
|
+
loadosophia('Loadosophia Uploader', {
|
9
|
+
project: "${__P(loadosophia.project,DEFAULT)}",
|
10
|
+
uploadToken: "${__P(loadosophia.uploadToken,No Token specified)}",
|
11
|
+
useOnline: "true",
|
12
|
+
title: "HLS Load test ${__time(yyyy-MM-dd HH:mm)}"
|
13
|
+
})
|
14
|
+
|
15
|
+
threads count: 1 do
|
16
|
+
visit name: 'Home Page', url: 'http://google.com/'
|
17
|
+
end
|
18
|
+
end.run(path: '/usr/share/jmeter/bin/', gui: true)
|
data/lib/ruby-jmeter/dsl.rb
CHANGED
@@ -475,6 +475,15 @@ module RubyJmeter
|
|
475
475
|
|
476
476
|
alias_method :perfmon, :perfmon_collector
|
477
477
|
|
478
|
+
def loadosophia_uploader(name = "Loadosophia.org Uploader", params = {}, &block)
|
479
|
+
node = RubyJmeter::Plugins::LoadosophiaUploader.new(name, params)
|
480
|
+
attach_node(node, &block)
|
481
|
+
end
|
482
|
+
|
483
|
+
alias_method :loadosophia, :loadosophia_uploader
|
484
|
+
|
485
|
+
|
486
|
+
|
478
487
|
# API Methods
|
479
488
|
|
480
489
|
def out(params = {})
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module RubyJmeter
|
2
|
+
module Plugins
|
3
|
+
class LoadosophiaUploader
|
4
|
+
attr_accessor :doc
|
5
|
+
include Helper
|
6
|
+
def initialize(name="Loadosophia.org Uploader", params={})
|
7
|
+
params[:error_logging] ||= false;
|
8
|
+
params[:filename] ||= "";
|
9
|
+
params[:project] ||= "DEFAULT";
|
10
|
+
params[:uploadToken] ||= "Invalid Token";
|
11
|
+
params[:storeDir] ||= "/tmp";
|
12
|
+
params[:color] ||= "none";
|
13
|
+
params[:title] ||= "";
|
14
|
+
params[:useOnline] ||= false;
|
15
|
+
|
16
|
+
@doc = Nokogiri::XML(<<-XML.strip_heredoc)
|
17
|
+
<kg.apc.jmeter.reporters.LoadosophiaUploader guiclass="kg.apc.jmeter.reporters.LoadosophiaUploaderGui" testclass="kg.apc.jmeter.reporters.LoadosophiaUploader" testname="#{name}" enabled="#{enabled(params)}">
|
18
|
+
<boolProp name="ResultCollector.error_logging">#{params[:error_logging].to_s}</boolProp>
|
19
|
+
<objProp>
|
20
|
+
<name>saveConfig</name>
|
21
|
+
<value class="SampleSaveConfiguration">
|
22
|
+
<time>true</time>
|
23
|
+
<latency>true</latency>
|
24
|
+
<timestamp>true</timestamp>
|
25
|
+
<success>true</success>
|
26
|
+
<label>true</label>
|
27
|
+
<code>true</code>
|
28
|
+
<message>false</message>
|
29
|
+
<threadName>true</threadName>
|
30
|
+
<dataType>false</dataType>
|
31
|
+
<encoding>false</encoding>
|
32
|
+
<assertions>false</assertions>
|
33
|
+
<subresults>false</subresults>
|
34
|
+
<responseData>false</responseData>
|
35
|
+
<samplerData>false</samplerData>
|
36
|
+
<xml>false</xml>
|
37
|
+
<fieldNames>false</fieldNames>
|
38
|
+
<responseHeaders>false</responseHeaders>
|
39
|
+
<requestHeaders>false</requestHeaders>
|
40
|
+
<responseDataOnError>false</responseDataOnError>
|
41
|
+
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
42
|
+
<assertionsResultsToSave>0</assertionsResultsToSave>
|
43
|
+
<bytes>true</bytes>
|
44
|
+
<threadCounts>true</threadCounts>
|
45
|
+
<sampleCount>true</sampleCount>
|
46
|
+
</value>
|
47
|
+
</objProp>
|
48
|
+
<stringProp name="filename">#{params[:filename]}</stringProp>
|
49
|
+
<stringProp name="project">#{params[:project]}</stringProp>
|
50
|
+
<stringProp name="uploadToken">#{params[:uploadToken]}</stringProp>
|
51
|
+
<stringProp name="storeDir">#{params[:storeDir]}</stringProp>
|
52
|
+
<stringProp name="color">#{params[:color]}</stringProp>
|
53
|
+
<stringProp name="title">#{params[:title]}</stringProp>
|
54
|
+
<boolProp name="useOnline">#{params[:useOnline].to_s}</boolProp>
|
55
|
+
</kg.apc.jmeter.reporters.LoadosophiaUploader>
|
56
|
+
XML
|
57
|
+
|
58
|
+
#update params
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
data/lib/ruby-jmeter/version.rb
CHANGED
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.13.
|
4
|
+
version: 2.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Koopmans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- examples/basic_http_request_with_files.rb
|
82
82
|
- examples/basic_json_path_extractor.rb
|
83
83
|
- examples/basic_ldap_ext.rb
|
84
|
+
- examples/basic_loadosophia.rb
|
84
85
|
- examples/basic_loops.rb
|
85
86
|
- examples/basic_meta_fu.rb
|
86
87
|
- examples/basic_perfmon.rb
|
@@ -238,6 +239,7 @@ files:
|
|
238
239
|
- lib/ruby-jmeter/plugins/dummy_sampler.rb
|
239
240
|
- lib/ruby-jmeter/plugins/json_path_extractor.rb
|
240
241
|
- lib/ruby-jmeter/plugins/latencies_over_time.rb
|
242
|
+
- lib/ruby-jmeter/plugins/loadosophia_uploader.rb
|
241
243
|
- lib/ruby-jmeter/plugins/perfmon_collector.rb
|
242
244
|
- lib/ruby-jmeter/plugins/response_codes_per_second.rb
|
243
245
|
- lib/ruby-jmeter/plugins/response_times_distribution.rb
|