Jrpc calls through jmeter - jmeter

I wanted to make a grpc calls through jmeter .Have done some searches but not getting the proper doc or site.
Would like to know if it is possible to make grpc calls through jmeter.
Also do we have some example doc/site for the same.

GRPC has Java API so you can generate client code (or reuse your application code if it's in Java) and implement the business use cases using JSR223 Samplers and Groovy language
Unfortunately the absolute maximum of information I can provide as the client code will be specific to your application so no one will be able to help unless you want to share the source code of your app which is highly unlikely to happen.
You may also take a look at jmeter-grpc-plugin (you will still have to write the code) and Client-side streaming RPC example

Related

Trying to Performance test an application developed in OJET technology. Which tool/protocol should I use for scripting?

Trying to Performance test an application developed in OJET technology. Which tool/protocol should I use for scripting? I tried HTTP/Web protocol with Jmeter and Load Runner. But that doesn't capture all the requests and responses at the javascript/browser level. Hence I am facing issues in correlating the dynamic values during test design. Hence, scripts fail during the replay. Currently trying to do it with Truclient Web protocol as an alternative. But I need to know which tool/protocol should I use for scripting?
According to OJET looks like this is a web app generator.
If you choose to start with JMeter use post-processor such as regex to catch and save every value that is needed for as arg in the next request.
Don't be afraid of these dynamic values. Try to follow next articles to get the idea.
None of tools will provide you automatic correlation without issue. Nor LoadRunner, nor Jmeter. It is always tricky.
Ask more specific questions when you start facing issue.
Jmeter catch correlations
You need to implement real user using your application with 100% accuracy in terms of network footprint
Both JMeter and/or LoadRunner are not capable of executing client-side JavaScript, the options are in:
Implement these JavaScript-driven network calls using scripting (in JMeter it will be JSR223 Test Elements)
Use a real browser, LoadRunner's Truclient protocol is basically a headless web browser, in JMeter can be integrated with Selenium browser automation framework via WebDriver Sampler
With regards to "which protocol/tool" to use:
Implementing JavaScript calls manually will take extra effort, however your test will consume less resources (CPU, RAM, etc.)
Using real browsers will take less efforts, but the test will consume much more resources (something like 1 CPU core and 2 GB of RAM per user/ browser instance) and you won't have metrics like Connect Time, Latency, etc.
LoadRunner TruClient. This will handle all of the Javascript executions and dynamic elements related to session, state, date/time, object identifiers, ... You will still need to appropriately handle user input items.

Can we do Load testing for Video or Audio call in jmeter

Is there any way we can do performance testing for voice or video call ? Jmeter or any other open source tools provide anything ? Please reommend any tool if we can achieve this.
It depends on a network protocol which is being used under the hood of the video and/or audio call.
First of all you need to determine which protocol(s) is (are) used by your application. It can be done using a sniffer tool like Wireshark. Once you know the protocol(s) you should be able to check whether JMeter (or other open source tool) supports this protocol or not.
The options could be in:
JMeter supports the protocol out of the box via one of its Samplers. For example if the protocol is simple enough and can be recorded and replayed you can capture the requests using the aforementioned Wireshark and simulate them with the TCP Sampler, however the chance it will work is minimal
JMeter supports the protocol via one of its Plugins
There is a Java (or other language) client library implementing the protocol, in this case you will be able to use JSR223 Sampler and implement the use cases in Groovy (or other language, but it has to be JVM/JSR223 compabitle) or JUnit Request sampler and implement the use cases in Java
The protocol is proprietary and there are no client libraries for it. In this case you won't be able to conduct the load test without reaching out to the call system vendor and asking them for the implementation details and instructions on how it can be tested.
You can use UBIK Load Pack which is a paid version for load test videos using JMeter with free trail
Realistic and Scalable Load Testing for MPEG Dash, Apple's HTTP Live, Microsoft Smooth and Adobe HDS Streaming formats

How to create Performance testing framework in jmeter?

For functional automation we use to create a framework which is reusable for automating application. Is there any way to create Performance testing framework in jmeter. So that we can use same framework for Performance testing of different applications.
Please help if any one knows and provide more information regarding it.
You can consider JMeter as a "framework" which already comes with test elements to build requests via different protocols/transports, applying assertions, generating reports, etc.
It is highly unlikely you will be able to re-use existing script for another application as JMeter acts on protocol level therefore there will be different requests for different applications.
There is a mechanism in JMeter allowing to re-use pieces of test plan as modules so you won't have to duplicate your code, check out Test Fragments and Module Controller, however it is more applicable for a single application.
The only "framework-like" approach I can think of is adding your JMeter tests into continuous integration process so you will have a build step which will execute performance tests and publish reports, basically you will be able to re-use the same test setup and reporting routine and the only thing which will change from application to application will be .jmx test script(s). See JMeter Maven Plugin and/or JMeter Ant Task for more details.
You must first ask yourself, how dynamic is my conversation that I am attempting to replicate. If you have a very stable services API where the exposed external interface is static, but the code to handle it on the back end is changing, then you have a good shot at building something which has a long life.
But, if you are like the majority of web sites in the universe then you are dealing with developers who are always changing something, adding a resource, adding of deleting form values (hidden or not), headers, etc.... In this case you should consider that your scripts are perishable, with a limited life, and you will need to rebuild them at some point.
Having noted the limited lifetime of a piece of code to test a piece of code with a limited lifetime, are there some techniques you can use to insulate yourself? Yes. Rule of thumb is the higher up the stack you go to build your test scripts the more insulated you are from changes under the covers ( assuming the layer you build to is stable ). The trade off is with more of the intelligence under the covers of your test interface, the higher the resource cost for any individual virtual user which then dictates more hosts for test execution and more skew from client side code which can distort the view of what is coming from the server. An example, run a selenium script instead of a base jmeter script. A browser is invoked, you have the benefit of all of the local javascript processing to handle the dynamic changes and your script has a longer life.

Is it possible to prevent a Ruby instance from opening network connection?

I maintain a web API written in Ruby. It connects to many third party web services. When writing tests, I stub any function that would need to connect to the network and return bottled data instead.
It has happened to me before that I forget this stubbing step, and my integration tests end up actually connecting to a third party service.
With that in mind, I would like to prevent Ruby from being able to open network connections. When attempted, I would like it to raise an exception instead, pointing out what function I forgot to stub.
Is this possible? What central Ruby function would I need to override to achieve this with minimal other side effects?
What about WebMock? Did you try it? https://github.com/bblimke/webmock
This line should help:
WebMock.disable_net_connect!(allow_localhost: true)
Manual stubbing is, as you've just said, unreliable.
A better solution might be to wrap your code that calls external services behind a facade, and use dependency injection to pass the web handling service into the facade on creation. Your Test Suite then just needs to do the same with a stub service. You'd only need to do this once, and any test which was then testing external code would use the stubbed service.
Check out VCR.
First, take a look at its documentation and see if it's what you need, which I suppose it is. We've been using it at my company for a few years to record one HTTP test for a spec and replay the results for subsequent tests.
We've found it to be invaluable when dealing with external APIs.

Request simulation plugin for grails

I have been searching for a grails plugin that ca be used to simulate requests. I have a jersey service that calls some helper methods and I'm trying to check if any of these methods are bottleneck method, I found this JavaMelody Grails Plugin, . But, this tool does not create request simulation, it rather measure the actual traffic.
Anybody knows a free profiler that can drill down to the helper methods level?
A combination of load simulator, like Jmeter, as well as a profiling tool are your best bet to get the sorts of information I think you are after. Though I try not to promote proprietary solutions, New Relic will, I think, give you the sorts of real-time profiling you are after.
I think Jmeter can generate request load, you can also use badboy this allows you to record and then play in threads or optionally you can export for Jmeter file so can be used for more complex request generation.

Resources