I am trying to write a program which suppose to send requests to a server using websocket technology, I am using jmeter in order to do that and I am using WebSocket sampler. I am trying to send audio file using this technology anyone can help how to maintain this kind of test using this sampler?
thanks!
I'm not sure what your question is. Do want (a) to write a program to send these websocket requests, or do you want (b) to perform a load test with JMeter?
If (a) you might want to take a look here: https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/74e30c17bdf4cb90a9a22e3eca7ef581106a01a7/src/main/java/eu/luminis/websocket/?at=master
You could use the WebSocketClient class to setup a websocket connection and use its sendBinaryFrame method to send an audio file.
If (b) install the plugin https://bitbucket.org/pjtr/jmeter-websocket-samplers, see the readme for how to use it.
Related
currently I'm using jPOS to connect to our switch (payment gateway?), simulating both the acquirer and issuer. In other words, jPOS (client) will connect to the acq port on the switch (server), pack and send the iso message, switch routes it to the issuer port, which jPOS is also connected as a client, receives the request, packs and sends a response back to the switch.
I hope the above makes sense. I do have java code in place, but as it gets more complicated I've been considering using Q2 instead, but after reading through all of the Q2 documentation, I'm still unsure on a few things.
Firstly, my program will receive an HTTP POST request with all of the PORT, IP, and Transaction details. It won't know what the port is until it receives that data, so how can I create Q2 Channel-adapters, qservers, etc dynamically? Don't those files need to be predefined in the deploy folder? There will also be N number of these connections.
I would like to be able to have the issuer side open and waiting to respond automatically for any transaction, but also have the ability to modify the response for specific txns. Can that be achieved?
Thanks for any advice.
In a comment, I suggested breaking this question in 2, but meanwhile I'll answer the easy one (the number 2).
For this, you can use the ServerSimulator jPOS-EE module (see section 10.2 of jPOS-EE manual).
You can see an example configuration at https://github.com/jpos/jPOS-EE/tree/master/modules/server-simulator/src/main/resources/META-INF/q2/installs.
I have a requirement to send custom parameters, variables and properties to InfluxDB as a part of my Jmeter tests so that we can analyze test data based on the functionality of the application.
As of now I can use backend listener for influxdb but it only has limited fields which would not be helpful in my case since I want to send more relevant data based on the application functionality.
Can someone point/help with right resources to develop a custom backend listener to send custom data to InfluxDB from jmeter and not depend on the existing listener.
I want a flexible option to send data as per our application and not restrict to only fields in listener.
Currently I am using a View Results in table to save this custom data to CSV files. The sample is shown in below snapshot.
To do this I have modified our user.properties files and specify the sample_variables, like below:
sample_variables=employee_code,user_id,transName,transType,transVer,deptID,deptType,deptName
But instead of using an additional listener, I would like to send these variables for EACH HIT (for every sample) to the influxDB. How do I achieve it? Any further help would be appreciated.
The easiest option is just using normal HTTP Request sampler to send the metrics you want via InfluxDB API.
If you still want to implement a custom listener you can first of all take a look at the existing Backend Listener code
Then get familiarized with the following materials:
How to write a plugin for JMeter
How to write your own JMeter listener. A guide
and maybe see a reference project like jmeter-backend-azure
We are creating custom metrics in JMeter using beanshell scripting and saving them to a file.Our requirement is to send this metrics to InfluxDB. We tried using Backend Listener with Graphite and InfluxDB implementation client but couldn't send the custom values. Only the default Jmeter metrics are being passed.
Has anyone done this before, can you guide us to resolve this issues.
We are using Jmeter 3.3 and influxdb-1.4.2-1
Thanks,
BB
Two words: line protocol.
Another two words: custom listener (Beanshell/JSR223 with Groovy).
Marry them, and you'll have what you want.
I did that work once, and it didn't take long.
There may be other options (like, take this result file and feed it to script that shapes it to the same line protocol, but post-execution, not live) - but the one I suggest is the simplest.
To do it you can use /write endpoint as it described in influxdb.com
Image below shows how it can be done in Jmeter using "HTTP Request" sampler.
How to send custom data to influxDB:
In a DB it will looks like on image below:
Can any one suggest me how load test can be performed for push notification on worklight server. Is there any tool which can be used. We expect to send approximately 10K messages every day and in future approximately 50K. As per our architecture the backend server will be making rest calls and Send Bulk Messages Check this documentation we following for REST API
Before we go live we want to perform a load test simulating this architecture.
Any suggestion will be appreciated.
You can perform tests using standard open source tool such as JMeter by writing a script that will invoke the sendMessage requests.
I'm pretty new to Spring Integration and still trying to get my head around it. Right now I'm just trying to understand if the example I've found here is actually safe across multiple threads:
https://github.com/spring-projects/spring-integration-samples/blob/master/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemoTest.java
My use case is as follows:
Send request to queue with JMS Reply-to as a temporary queue
Wait for response to be received on the temporary queue
Need this to happen synchronously within a method -- I don't want to split it up and make it asynchronous across several methods
Will the above example work for this? If not, am I barking up the wrong tree?
Thanks in advance.
That sample is pretty simple; it just sends the message to stdout so, yes, it's perfectly thread safe.
For the request/reply scenario you are talking about, you need to use a <gateway/> - see the other example in that sample project. In that case, you can see that the message is handled by 'demoBean' which, again, is perfectly thread safe.
For a real application, the thread-safetyness depends on the code in the services invoked by the flow receiving the message.
If you wish, you can use Spring Integration on the client side too (with an outbound gateway).