ruby-jmeter
A Ruby based DSL for building JMeter test plans
Query1: I am load testing an application which uses Google maps.
While recording a script on Jmeter, Google map window is displayed as plain and map is not displayed.
How to include google maps while recording script in Jmeter?
Query 2: I have tried to include/exclude the pattern ...(bmp|css|js|gif|ico|jpe?g|png|swf|woff). while script recording, but still google maps are not recorded
and application gives error as "Map might have behaved wrongly."
Source: (StackOverflow)
What will be the hardware configuration required to run concurrent of 10,000 user's load in jmeter through non-gui mode?
Source: (StackOverflow)
Step 1:-User URL: User registers to website and wait for confirmation e-mail.
Step 2:-Admin approves the user request from back end of the application and confirmation e-mail is send to user e-mail id
Step 3:-User login to e-mail account and clicks on registration URL to register.
I want to record a jmeter script where Admin approving the user request from back end (Step 2) should be excluded but at the same time user should be approved and complete registration.
How to record a test script with above condition in Jmeter?
Source: (StackOverflow)
Creating a ruby project
I am trying to create a simple ruby project to use the rubygem and ruby-jmeter, but unsure on how to proceed further. Below is the github
of project.
https://github.com/flood-io/ruby-jmeter
//Below is my test.rb
require 'rubygems'
require 'ruby-jmeter'
test do
threads count: 10 do
visit name: 'Google Search', url: 'http://google.com'
end
end.jmx
How can i creating a ruby project with needed gems, Its not a rails application.... a simple ruby project.
Source: (StackOverflow)
Step 1: Login to application and upload an image for Admin profile.
Application uploads image successfully without been recorded in Jmeter.
Step 2 : Start Jmeter, add a thread group.
Step 3 : Add HTTP(S) test script recorder, go to HTTP sampler settings and
select type as "Java".
Step 3: Select target controller as Thread Group, configure Firefox to port
8080 and start the test script recorder to upload the image.
Result: Application fails to upload image successfully when script is recorded
by Jmeter.
Error displayed is :"java.io.FileNotFoundException: My image.jpg (The system cannot find the file specified)"
How to upload image successfully with Jmeter?
Source: (StackOverflow)
Does somebody aware if there is some DSL that cover main items related to the WEB load testing (Jmeter functionality mainly)? Ideally it would be awesome to have some parser that can convert that human readable part to real test for some existing load tool.
What I've already found is https://github.com/flood-io/ruby-jmeter and this probably best way to describe what I'm looking for. This is pretty much what I need, but I would like to know if there are some similar solutions, especially for Jmeter, because other tools mainly support it's own or some common language, and there is no need in some middle ware language between real requests and their representation in load tool.
Why do I need this for Jmeter - because we already have lots of tests using Jmeter, and neither GUI development or direct JMX (as XML) creation are not very suitable. We do have our own DSL that converts to JMX, but it doesn't cover all we need, and its' extension is bit of complicated :)). So I need to understand whether we can use some existing approach or the only option for us is to refactor our existing solution and fit it to our needs.
Source: (StackOverflow)
I am using Jmeter 2.13 in proxy mode to record the c4c CRM cloud application.
it records login page perfectly. once i land into home page,following things are observed and unable to record.
- I try click on the link- but could not open the link during recording, but without recording it is woring fine.
- There is a NEW button during normal browsing, but during recording mode NEW button is not displayed.
please suggest me on this. and this is completely new to me
Thanks
Source: (StackOverflow)
While Using Jmeter for Performane testing of a Ruby Application with 100 user, we ran it for user regsitration.To login, tt requires user confirmation via email but while testing on local environment we have a method 'Skip_confirmation' (run in console) in application to skip the user confirmation via url which contains the token.
How i can add the ruby method in Jmeter to skip user confirmation after registration.
Source: (StackOverflow)
Iam using the ruby-jmeter gem to write DSL scripts for doing performance tests automation..
I find this pretty useful to navigate to my API URLs, post data, assert for expected result and generate performance trends reports..
Iam getting stuck while using the extract regex: '', name: '' syntax in ruby-jmeter.
I want something like: I Visit http :// domain/api/user?q=create,
I post a raw JSON data as input and I get required JSON response. I want to extract a pattern from this response and use this value dynamically so that I can provide it as input to my raw JSON input to Visit http: //domain/api/user?q=read
Basically i was trying:
visit name: 'CreateUser', url: "<url link>",<br>
method: "post",<br>
domain: "<domain>",<br>
path: 'api/user?q=create', <br>
raw_body: <input json> do<br>
#extract a pattern from response<br>
extract regex: '"Username":"(.+?)"', name: 'userName'<br>
puts '${userName}'<br>
# rest of code here.. <br>
# I want to use ${username} as input to my next Visit call<br>
end
Can somebody who have looked into ruby-jmeter help me here plssss?
thanks,
Vishi.
Source: (StackOverflow)
I am using ruby-jmeter to create jmeter plan. So far I have gone thorught various DSL given at https://github.com/flood-io/ruby-jmeter/blob/master/lib/ruby-jmeter/DSL.md
But I am not understanding how to use reponse assertion DSL.
https://github.com/flood-io/ruby-jmeter/blob/master/lib/ruby-jmeter/dsl/response_assertion.rb
def initialize(params={})
testname = params.kind_of?(Array) ? 'ResponseAssertion' : (params[:name] || 'ResponseAssertion')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="#{testname}" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="0"/>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">false</boolProp>
<intProp name="Assertion.test_type">16</intProp>
<stringProp name="Assertion.scope">all</stringProp>
</ResponseAssertion>)
EOS
update params
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
end
How do I use it?
For csv_data_set_config,
DLS was like
def initialize(params={})
testname = params.kind_of?(Array) ? 'CsvDataSetConfig' : (params[:name] || 'CsvDataSetConfig')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="#{testname}" enabled="true">
<stringProp name="delimiter">,</stringProp>
<stringProp name="fileEncoding"/>
<stringProp name="filename"/>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="variableNames"/>
</CSVDataSet>)
EOS
update params
update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
end
I used it like
csv_data_set_config filename: "/Users/ajinkya41/projects/scout_tools/users.csv", variableNames: "username,password"
It was simple enough to use, but this response assertion is little difficult for me.
Source: (StackOverflow)
I am running the smoke suite on Jmeter with WMQ and IMA set Up. I am facing an issue where after running the suite say for eg 10 mins rest of the samplers( Jms Subscriber,Jms Point to Point) are failing because of below error code:
2015/08/31 13:18:07 ERROR - jmeter.protocol.jms.sampler.JMSSampler: Unable to connect to the target queue manager 172.18.14.115:1419/VJT.CLIENT.SMH javax.naming.ServiceUnavailableException: Unable to connect to the target queue manager 172.18.14.115:1419/VJT.CLIENT.SMH [Root exception is com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009]
at com.ibm.mq.jms.context.MQContext.(MQContext.java:196)
at com.ibm.mq.jms.context.WMQInitialContextFactory.getInitialContext(WMQInitialContextFactory.java:29)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.getInitialContext(JMSSampler.java:424)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:319)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
at com.ibm.mq.MQManagedConnectionJ11.(MQManagedConnectionJ11.java:212)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:318)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:338)
at com.ibm.mq.StoredManagedConnection.(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.(MQQueueManager.java:451)
at com.ibm.mq.pcf.PCFAgent.connect(PCFAgent.java:240)
at com.ibm.mq.pcf.PCFAgent.(PCFAgent.java:174)
at com.ibm.mq.pcf.PCFMessageAgent.(PCFMessageAgent.java:142)
at com.ibm.mq.jms.context.MQContext.(MQContext.java:183)
... 14 more
Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
we are unable to get the root cause, Can anyone please suggest the reason.
Source: (StackOverflow)