Can Karate handle stream of output payload message sent using http2 [duplicate] - http2

This question already has an answer here:
Do Karate support .avro file as an input request?
(1 answer)
Closed 1 year ago.
My dev team is going to send output as stream of data for a REST microservice. Is karate capable of handling such data ? If not can we integrate with something so that tests can be run in Karate ?

Yes if you have a very specific need, write a small Java adapter.
You can use this gRPC project as an example: https://thinkerou.com/karate-grpc/
And note that you can include these calls into performance tests: https://github.com/intuit/karate/tree/master/karate-gatling#custom
If you are interested in contributing, please refer this thread, someone has created an HTTP2 client: https://github.com/intuit/karate/issues/474

Related

a way to keep a webapp listening to server [duplicate]

This question already has an answer here:
Notify only specific user(s) through WebSockets, when something is modified in the database
(1 answer)
Closed 1 year ago.
so I am looking for making a web app that gets data from the server periodically.
my initial thought was issuing an ajax call inside a loop that asks the server if there is news every 2sec so when there are new things to show the server will send data otherwise will just reply with an empty payload
I am wondering if there is a better approach so the server won't waste sources replying to all those unnecessary ajax calls but instead it will only send data to the targeted client
you can use
<p:poll>
tag if you are working with Primefaces or use WebSockets

spring integration reading many files

We have a requirement to parse lots of incoming files (into a directory) and processing them and putting the outcome onto AWS kinesis for each file.
The frequency of files can be 60,000 per day and files can arrive every 15 seconds. Each file may contain about 1000 entries.
Can spring-integration handle this load?
Would there be any issues processing this kind of volumes?
As the files are coming in on to an inbound-channel-adapter can we execute a service-activator for each file?
I believe we need to use task-executors on channels with poller? Any examples?
Would task-executors call the service-activators in a multi-threaded manner?
Any pointers would be helpful. Links to any code examples would be nice.
This is not the kind of question one asks here on SO - too broad and too much questions in a single thread. I assume even if I answer to all of them, you are going to ask more and SO is not good for Q&A chat. Anyway:
Yes, Spring Integration can handle this. You can use simple FileReadingMessageSource to poll the directory periodically.
Each file (an outbound message payload) can be fed to the FileSplitter to parse it line by line.
After splitter you indeed can use an ExecutorChannel to process those lines in parallel.
The Service Activator can be called in multi-threaded environment as long as it is a thread-safe.
In the end you can use KinesisMessageHandler to send record to the AWS Kinesis. And yes, this one can be used from different threads as well.
All the information you can find in the Spring Integration Reference Manual. Some Samples may help you as well. And also Spring Integration AWS Extension is there for you.

how to send custom metrics from Jmeter to InfluxDB

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:

Trying to write websocket program in Java

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.

IBM Mobile first 7.1 - Please suggest how load test can be performed for push notification

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.

Resources