Jmeter not running for particular scenario - jmeter

I am not able to run jmeter on this particular url- https://www.yatra.com/
It is working on other website like- https://www.makemytrip.com/

Different sites have different policies of how it can be accessed, that is why you can not do it.
You should practice Jmeter either on the application you are working on or else you can refer the below answer:
https://sqa.stackexchange.com/questions/23828/applications-for-practicing-performance-testing-from-home

Related

Performance testing in production environment using Jmeter

Hi stack Overflow community,
i need your valuable help
I developed a script for our web application using Jmeter and Blazemeter chrome plugin
Scenario as
login >> walkthrough some pages >>logoout
Script working successfully in our local environment. I am using summary report as a Listener and non Gui mode for performing test
Now i need to do load testing for 250 usesr on client production environment.
measurement points are
1.Response time for each request
2.Data traffic Size
3.CPU and memory utilization
i have so many questions:
1.what all points i need to consider when I run my script on production environment
2.Do i need to add ramp up time.
3. real environment have having proxies and load balancers.(our local doesn’t have)
4.Do I need to keep all .png, css ,gif as recorded by tool or I can disable them.is it effect my results?
what changes i need to do to make my script compatible to such environment.
Considering i a m new to Jmeter and automation testing and no help on this tool other than blogs, stack overflow community and google.
Very much tense about its real implementation.
Thanks in advance as u help someone to grow.
Do i need to change structure of my script also. if no Kudos to me ,if yes plz direct me, appreciate if someone provide screenshot for right type of structure .
Below are the points which should answer most of your questions:
You should not run script on Production environment if your product is live, you should run it on production like environment.
You can only simulate APIs so no css, png are required.
Ramp up you will have to decide as per your requirement.
Structure can be divided in transactions, it would be more proper.
You need to check your script once with the Production like environment as it is having proxies and load balancers which your local environment does not have.
Whatever things you need to measure, there are different plugins available for it on Jmeter.
Do make sure most of the things are parameterized as much as possible.
When running your test, monitor both database as well as application server.
For more details or reference you can go through below urls:
https://www.blazemeter.com/blog/getting-started-jmeter-basic-tutorial
http://www.seleniumtests.com/p/performance-testing-videos.html

How to extract/share some common logic/sampler etc from many jmeter jmx files?

If there are many jmeter scripts(jmx files) in a stress project for different cases run, how to maintain the common jmeter code which can be shared by each jmx?
For example, many jmx files have same thread group, http sampler, config elements (header manager, Authorization manager etc) ?
Any way to only edit once and apply for all jmx scripts? I couldn't find the related jmeter doc about this? wonder if jmeter jmx file supports any share code dynamic load/management?
Any suggestions are very appreciated!
My expectation is that you're looking for the Module Controller. In conjunction with Test Fragments you will be able to re-use sequences of the Test Elements either in current Test Plan or even in different .jmx scripts.
See Using JMeter Module Controller article for detailed information if needed
I think you mean the Include Controller. That way you can combine different jmx files to be run from one 'master' file. There are some things to keep in mind, but check the manual for that.

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 to open a webpage using Jmeter

How to resolve the below error in jmeter
1.) Request to open Google.com
2.)
P.S: I have just started learning jmeter.
Which is the best way to learn it, please advice.
The easiest way of creating a JMeter test is just recording it. JMeter comes with HTTP(S) Test Script Recorder which can be used for building a test plan skeleton via capturing browser requests, check out Apache JMeter proxy Step-by-step for more information.
I would recommend attending JMeter Academy, this way you will be able to quickly ramp-up in JMeter in particular and performance testing in general. Performance Testing Guidance for Web Applications book is also very useful
for performance testing greenhorns.
In regards to the possible error, I cannot see the details, just a blind shot: are you behind a corporate proxy/firewall? If yes, you will need to "tell" JMeter the details of this proxy so it could access the Internet (same applies to "recording" approach of tests creation), see Using JMeter behind a proxy chapter for the relevant JMeter configuration.
JMeter is not a browser
See first page of Jmeter
JMeter does not execute the Javascript found in HTML pages. Nor does
it render the HTML pages as a browser does

Issue with CAS login

I am new to jmeter and trying to login in one of our client application which uses CAS system, but not able to succeed. I have also applied regular expression extractor for "lt", but not works.
each time it gives this error:
ticket 'LT-9528-aTBBoBdZU23g6khtS9I0b5Lq3o2VUQ' not recognized
It looks like you're using hard-coded login ticked (recorded one). You need to perform so-called correlation - the process of identifying dynamic parameters, extracting and re-using them.
See How to Load Test CSRF-Protected Web Sites to get an idea regarding approaches.
Also it worth checking Apache JMeter page of Jasig wiki, it seems to contain some JMeter scripts which you can use as a reference.

Resources