Class: RubyJmeter::Plugins::LoadosophiaUploader

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/ruby-jmeter/plugins/loadosophia_uploader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection

Constructor Details

#initialize(name = "Loadosophia.org Uploader", params = {}) ⇒ LoadosophiaUploader

Returns a new instance of LoadosophiaUploader.


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/ruby-jmeter/plugins/loadosophia_uploader.rb', line 6

def initialize(name="Loadosophia.org Uploader", params={})
	  params[:error_logging] ||= false;
	  params[:filename] ||= "";
	  params[:project] ||= "DEFAULT";
	  params[:uploadToken] ||= "Invalid Token";
	  params[:storeDir] ||= "/tmp";
	  params[:color] ||= "none";
	  params[:title] ||= "";
	  params[:useOnline] ||= false;

    @doc = Nokogiri::XML(<<-XML.strip_heredoc)
<kg.apc.jmeter.reporters.LoadosophiaUploader guiclass="kg.apc.jmeter.reporters.LoadosophiaUploaderGui" testclass="kg.apc.jmeter.reporters.LoadosophiaUploader" testname="#{name}" enabled="#{enabled(params)}">
  <boolProp name="ResultCollector.error_logging">#{params[:error_logging].to_s}</boolProp>
  <objProp>
    <name>saveConfig</name>
    <value class="SampleSaveConfiguration">
      <time>true</time>
      <latency>true</latency>
      <timestamp>true</timestamp>
      <success>true</success>
      <label>true</label>
      <code>true</code>
      <message>false</message>
      <threadName>true</threadName>
      <dataType>false</dataType>
      <encoding>false</encoding>
      <assertions>false</assertions>
      <subresults>false</subresults>
      <responseData>false</responseData>
      <samplerData>false</samplerData>
      <xml>false</xml>
      <fieldNames>false</fieldNames>
      <responseHeaders>false</responseHeaders>
      <requestHeaders>false</requestHeaders>
      <responseDataOnError>false</responseDataOnError>
      <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
      <assertionsResultsToSave>0</assertionsResultsToSave>
      <bytes>true</bytes>
      <threadCounts>true</threadCounts>
      <sampleCount>true</sampleCount>
    </value>
  </objProp>
  <stringProp name="filename">#{params[:filename]}</stringProp>
  <stringProp name="project">#{params[:project]}</stringProp>
  <stringProp name="uploadToken">#{params[:uploadToken]}</stringProp>
  <stringProp name="storeDir">#{params[:storeDir]}</stringProp>
  <stringProp name="color">#{params[:color]}</stringProp>
  <stringProp name="title">#{params[:title]}</stringProp>
  <boolProp name="useOnline">#{params[:useOnline].to_s}</boolProp>
</kg.apc.jmeter.reporters.LoadosophiaUploader>
XML

  #update params
end

Instance Attribute Details

#docObject

Returns the value of attribute doc


4
5
6
# File 'lib/ruby-jmeter/plugins/loadosophia_uploader.rb', line 4

def doc
  @doc
end