Module: Gridinit::Jmeter::Helper
- Included in:
- AccessLogSampler, AggregateGraph, AggregateReport, Ajp13Sampler, AssertionResults, BeanshellAssertion, BeanshellListener, BeanshellPostprocessor, BeanshellPreprocessor, BeanshellSampler, BeanshellTimer, BsfAssertion, BsfListener, BsfPostprocessor, BsfPreprocessor, BsfSampler, BsfTimer, CompareAssertion, ComparisonAssertionVisualizer, ConstantThroughputTimer, ConstantTimer, Counter, CssjqueryExtractor, CsvDataSetConfig, DebugPostprocessor, DebugSampler, DistributionGraphalpha, DurationAssertion, ForeachController, FtpRequest, FtpRequestDefaults, GCConsoleStatusLogger, GCDummySampler, GCLatenciesOverTime, GCResponseCodesPerSecond, GCResponseTimesDistribution, GCResponseTimesOverTime, GCResponseTimesPercentiles, GCThroughputShapingTimer, GCTransactionsPerSecond, GaussianRandomTimer, GenerateSummaryResults, GraphResults, HtmlAssertion, HtmlLinkParser, HtmlParameterMask, HttpAuthorizationManager, HttpCacheManager, HttpCookieManager, HttpHeaderManager, HttpRequest, HttpRequestDefaults, HttpUrlRewritingModifier, IfController, IncludeController, JavaRequest, JavaRequestDefaults, JdbcConnectionConfiguration, JdbcPostprocessor, JdbcPreprocessor, JdbcRequest, JmsPointtopoint, JmsPublisher, JmsSubscriber, Jsr223Assertion, Jsr223Listener, Jsr223Postprocessor, Jsr223Preprocessor, Jsr223Sampler, Jsr223Timer, JunitRequest, KeystoreConfiguration, LdapExtendedRequest, LdapExtendedRequestDefaults, LdapRequest, LdapRequestDefaults, LoginConfigElement, LoopController, MailReaderSampler, MailerVisualizer, Md5hexAssertion, ModuleController, MonitorResults, OnceOnlyController, OsProcessSampler, PoissonRandomTimer, RandomController, RandomOrderController, RandomVariable, RecordingController, RegexUserParameters, RegularExpressionExtractor, ResponseAssertion, ResponseTimeGraph, ResultStatusActionHandler, RuntimeController, SaveResponsesToAFile, SimpleConfigElement, SimpleController, SimpleDataWriter, SmimeAssertion, SmtpSampler, SoapxmlrpcRequest, SplineVisualizer, SummaryReport, SwitchController, SynchronizingTimer, TcpSampler, TcpSamplerConfig, TestAction, TestPlan, ThreadGroup, ThroughputController, TransactionController, UniformRandomTimer, UserDefinedVariables, UserParameters, ViewResultsInTable, ViewResultsTree, WhileController, XmlAssertion, XmlSchemaAssertion, XpathAssertion, XpathExtractor
- Defined in:
- lib/gridinit-jmeter/helpers/helper.rb
Instance Method Summary collapse
Instance Method Details
#enabled(params) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/gridinit-jmeter/helpers/helper.rb', line 33 def enabled(params) #default to true unless explicitly set to false if params.has_key?(:enabled) && params[:enabled] == false 'false' else 'true' end end |
#update(params) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/gridinit-jmeter/helpers/helper.rb', line 19 def update(params) params.delete(:name) params.each do |name, value| node = @doc.children.xpath("//*[contains(@name,\"#{name.to_s}\")]") node.first.content = value unless node.empty? end end |
#update_at_xpath(params) ⇒ Object
27 28 29 30 31 |
# File 'lib/gridinit-jmeter/helpers/helper.rb', line 27 def update_at_xpath(params) params[:update_at_xpath].each do |fragment| @doc.at_xpath(fragment[:xpath]) << fragment[:value] end end |