Can we run Jmeter test from different geo location simultaneously? - websocket

Can we run Jmeter test from different geo location simultaneously? I want to run laod test for a gaming application,so users have to be generated from different client locations(UK,US) to hit the server simultneously.players from different geolocations should hit the server at the same time.How to do that using Jmeter???

I would not recommend using JMeter distributed testing for that as it is more suitable that jmeter client and servers are in same LAN.
So you have 2 options at least:
orchestrate the running of autonomous JMeter instances using ansible or similar tools
Use a Paas like Redline13 that will allow you to easily do that using AWS with benefit of having all the JMeter setup done and have live aggregated report and final aggregated CSV and JMeter HTML dashboard

If you're load testing a server it doesn't make any difference for it where the request is coming from. In case you need to check how does the server behave under the load and what response time for different geo-locations look like you can do it manually using i.e. Amazon Micro instances which are free.
In case you don't want the manual steps you can run JMeter in distributed mode using a helper script like JMeter ec2 which automates deployment of JMeter slaves onto AWS machines but be prepared to higher connect time and latency metrics

Related

Handle correlations in Load runner and use them in JMeter

I am trying to record SAP scripts in Load Runner and correlate the business flows. I want to convert the script to JMX to be used in JMeter.
My query is will this be a good option to go forward with running SAP business flow testing using JMeter? As the company won't spend money on Load runner enterprise version.
Secondly, if I convert the already correlated script in Load runner to JMeter will the script be auto correlated ? Or do I have to do the correlation back again?
Note: For the above point I have gone through one of the posts in Stack Overflow where they have mentioned how to convert the script from Load runner to JMeter.
First of all, SAP is a company which produces a lot of applications and these applications rely on different network protocols so you need to ensure that the protocol(s) in scope is (are) supported by JMeter which might not be the case especially when it comes to SAP GUI
For "normal" HTTP protocol it's not a problem to convert LoadRunner scripts into JMeter using HTTP(S) Test Script Recorder but you will have to perform correlation yourself. Alternative options are:
Use JMeter Correlation Recorder Plugin where you can define correlation rules and they will be applied to downstream HTTP Request samplers
Use external recording solution like BlazeMeter Proxy Recorder which is capable of exporting recorded scripts in "SmartJMX" mode with automated detection and correlation of the dynamic parameters

Automated API blackbox testing

I have a (slightly complex) spring webservice which communicates with multiple frontends via a RESTful API (JSON) and additionally with other devices via SOAP or REST. I'd like setup an automated test environment which is capable of the following things:
create preconditions via fixtures (POSTGRES DB)
send REST or SOAP messages against the API
is able to run certain task (requests against the API) at a specific
time/date
assert and validate the produced results (return of the API call or
check the DB)
run all tests independet from any frontend/UI
integrate the testing environment in my infrastructure (i.e. create a
docker container which runs all tests deployed by Jenkins)
preferably I'd like to build reusable components (i.e. for creating a user that is needed in multiple different tests and so on...). I know there are a lot of tools and frameworks (SoapUI, JMETER,...). But before trying them all and getting lost, I'd like to get an experience report from someone who has a simular setup.
we are using JMeter for API testing. We tried SOAPui but it had some memory issues. So we are pushing forward with JMeter and so far so good.
For your questions:
We are using MySQL, but this post seems to show how to set up a postgres connection in JMeter: https://hiromia.blogspot.com/2015/03/how-to-perform-load-testing-on.html
JMeter can send REST API requests
I'm not sure if this is possible but you could probably have your Jenkins job scheduled to run when you need the API to run the specific task at the specific time.
There are quite a few assertions in JMeter. I use the Response and the BeanShell Assertions a lot.
JMeter is independent from any front end UI which helps pinpoint bugs.
I have not run docker but I am running via Jenkins. This jenkins plugin has been helpful: https://wiki.jenkins.io/display/JENKINS/Log+Parser+Plugin
A few more Tips:
Use the HTTP Request Defaults element. It will save you from having to update all your HTTP requests.
Use the User Defined Variables to define variables you need.
You can combine user defined variables like: ${namePrefix}${myTime} but it will have to be in a 2nd User Defined Variable element(you cant combine them in the same element)
If you have multiple test environments, set up a user defined variable with a value like this: ${__P(testenv,staging)} This way, you can change it from a CLI like this: -Jtestenv=HOTFIX
We are using ExtentReports for pretty html results reports with a custom JSR223 Listener(find my old post on this site).
If your site uses cookies, use the HTTP Cookie Manager.
If you need things to happen in order, on the Test Plan element, check this option: Run Threat Groups consecutively. If you dont, JMeter runs them in a random order.
Hope this is helpful. Happy Testing!

How can I run multiple instances of a SOAP web service in SOA enterprise manager?

I have created a synchronous SOAP web service in S.O.A. I'm using S.O.A enterprise manager to test it. What I want to do is to run multiple instances of it at a time. In S.O.A EM only one instance can be tested at a time.
Is there a way to run like 1000 instances of it so I can check the workload?
Is there a way to do it in S.O.A EM or do i have to use another software?
What I have tried is to open multiple windows of EM at a time, but it is not applicable when there are 1000 instances.
Enterprise manager is not suitable for advanced testing. You can just check that the service is alive and responds properly.
For functional testing I recommend using SoapUI. SoapUI is also capable for performance testing, but for higher workload I recommend JMeter.

Service Virtualization with JMeter

I am using JMeter for API Testing. Using HTTP Request and Beanshell I am able to achieve this.
There are times where the Services are down for a weeks time.
Since I the have the Request and Response with me, I would like to implement Service Virtualization using JMeter.
Even when the Services are down, I should be able to continue my testing.
Can I achieve Service Virtualization in JMeter? If yes, can I request you to let me know the steps please.
No you can't.
I suggest you check out API simulation tools which will allow you to do service virtualization. You can then use JMeter to run your tests and an API simulation tool to mock the dependencies.
JMeter doesn't do Service Virtualization, but you can use JMeter in recording, see article:
You can import the incoming traffic to JMeter using tcpreplay and
JMeter Proxy. Run a test suite in your performance environment using
JMeter and use the virtual services to decouple yourself from other
dependencies. Just to be safe, repeat the recording process every
week. This could prove to be very easy or very difficult to implement
depending on the specifics of the system you are working with.

100k HTTP Requests simultaneously

I have to test my rest API such that 100k API calls are made simultaneously(within 500ms).Any Idea how to simulate it?Utility to use?
I would suggest to use JMeter too, it enable your test to create multiple concurrent jmeter server. Just to be clear you can control multiple remote JMeter engines from a single JMeter client and replicate a test across many computers and thus simulate a larger load on the target server.
To be honest, your target is quite high (100k API calls simultaneously within 500ms), i.e. you'll need a lot of jmeter servers. When you create stress tests, there are not magical recipes, guides or manuals. Trial and error is a fundamental method of solving this kind of problems.
In my experience, I first try with few concurrent users and see how the server react. Then increase the number of concurrent users till to reach an intolerable performance decrease or, worst, a bottleneck .
http://jmeter.apache.org/usermanual/remote-test.html
You will obviously need a load testing tool which can be run in a distributed mode, i.e. 1 controller and X load generators executing the same test.
Grinder - scripts are written in some Python dialect
Apache JMeter - this guy doesn't require any specific knowledge, you can create tests using simple GUI
Tsung - is written in Erlang, known for capability to produce high loads even on low-end hardware.
See Open Source Load Testing Tools: Which One Should You Use? article for more information on above tools.
JMeter
The Apache JMeter™ application is open source software, a 100% pure
Java application designed to load test functional behavior and measure
performance. It was originally designed for testing Web Applications
but has since expanded to other test functions.

Resources