Performance Testing With JMeter 1704940753

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

JMETER FOR MANUAL TESTING

Free course

https://automationstepbystep.com/

Test plan doc link:

https://templatelab.com/test-plan/#google_vignette

For checking IP address here the below command used:

C:\Users\lenovo>ipconfig/all

IPv4 Address. . . . . . . . . . . : 192.168.1.4(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.0


Create test plan document for school management system?
ChatGPT
Here's an example test plan document for a school management system:

Test Plan: School Management System


Introduction
The purpose of this document is to outline the testing approach for the School Management
System, which is designed to help school administrators manage student information, class
schedules, and academic records. This test plan describes the testing process for verifying
that the system meets its functional and non-functional requirements.

Scope
The testing will cover the following components of the School Management System:

• User management
• Student information management
• Class scheduling
• Gradebook management
• Reporting
• Security
Test Strategy
The testing approach will consist of the following phases:

• Unit testing: Testing individual modules of the system to ensure that they function as
expected.
• Integration testing: Testing the integration between different modules of the system to
ensure that they work together seamlessly.
• System testing: Testing the system as a whole to ensure that it meets all of its
requirements.
• Acceptance testing: Testing the system with end-users to ensure that it meets their
needs and expectations.
Test Cases
The test cases will be created for each component of the School Management System. Each
test case will include the following information:

• Test case ID
• Test case description
• Test case input data
• Expected result
• Actual result
Test Environment
The following environment will be used for testing the School Management System:

• Operating system: Windows 10


• Browser: Google Chrome
• Database: MySQL
• Programming language: Java
• Testing framework: JUnit
Test Deliverables
The following deliverables will be provided as part of the testing process:

• Test plan
• Test cases
• Test results
• Defect reports
Test Schedule
The testing will be conducted according to the following schedule:

• Unit testing: 1 week


• Integration testing: 1 week
• System testing: 2 weeks
• Acceptance testing: 1 week
Risks and Mitigations
The following risks have been identified during the testing process:

• Incomplete or inaccurate data: This risk will be mitigated by using realistic test data
and verifying its accuracy before testing.
• Security vulnerabilities: This risk will be mitigated by conducting thorough security
testing and implementing appropriate security measures.
• Performance issues: This risk will be mitigated by conducting load testing and
optimizing the system for performance.
Conclusion
This test plan provides a comprehensive approach for testing the School Management
System and ensuring that it meets its functional and non-functional requirements. The
testing process will be conducted in a systematic and thorough manner to identify and
mitigate any issues before the system is deployed in a production environment.

Java Installation
https://www.youtube.com/watch?v=A55CV8EwKw4

https://www.oracle.com/java/technologies/downloads/#jdk19-windows

Jmeter Installation

https://jmeter.apache.org/download_jmeter.cgi

Always save file in another disk loaction or


Try the following:

Open JMeter -> Options -> Look and Feel -> Select any other theme other than Darcula.

Restart JMeter,

Create test plan and

try to save.

Save should work.

Testing website:

https://phptravels.net/

Blazemeter google chroom extensition link:

https://chrome.google.com/webstore/detail/blazemeter-the-
continuous/mbopgmdnpcbohhpnfglgohlbhfongabi/related?hl=en

Blazemeter login Password:

Gmcgmcgmc93@

For checking responsiness:

https://www.browserstack.com/responsive

internet speed test

https://fast.com/

CSS validator

https://jigsaw.w3.org/css-validator/

shut down: 1 he s7 sab bund kr du

stop: slo slo kr ky bnd kro


Thread group: Represent the no of users.

Samplers: Represent the type of request the user should send.

Listeners: Represent the reports basically it generates the report in graph, table and log
format.

Configuration: Represent the common variables that are used in the samplers.
Ramp up is how long it takes from the start of your test (0 virtual users) to the maximum
number of users you've selected. For the duration of the ramp up period, the number of
users will increase at regular intervals until all intended users are running your script.

The ramp-up time is the amount of time to get to the full number of virtual users for the load
test. If the number of virtual users is 20, and the ramp-up time is 120 seconds, then it will
take 120 seconds to get to all 20 virtual users.

Jmeter udemy free course:

JMeter HYPERLINK "https://www.udemy.com/course/jmeter-2021-short-course-step-by-


step-for-beginners/learn/lecture/28829470" 2021 | Short Course | Step by Step for Beginners
| HYPERLINK "https://www.udemy.com/course/jmeter-2021-short-course-step-by-step-for-
beginners/learn/lecture/28829470"Udemy

CSV means comma seprated values

Jmeter documentation:
https://jmeter.apache.org/usermanual/index.html

demo app:

OrangeHRM HYPERLINK "https://opensource-


demo.orangehrmlive.com/web/index.php/auth/login" (orangehrmlive.com)

chrome://version/
How To Create HTML Report in JMeter
https://www.youtube.com/watch?v=vKX17-rTOEE

https://www.youtube.com/watch?v=jKdG115KeEI

https://automationstepbystep.com/

what is thread group in Jmeter explains with real life example?


ChatGPT
In JMeter, a Thread Group is a fundamental element used for defining the behavior of virtual
users or threads during performance testing. It simulates a group of users that perform a set
of actions on the target system.

To understand the concept of a Thread Group, let's consider a real-life example of an e-


commerce website. Suppose you want to perform a performance test on the website to
measure its response time and throughput under different user loads.
In this scenario, you would create a Thread Group in JMeter to represent the group of virtual
users who will be accessing the website. Each thread within the Thread Group represents a
virtual user and will execute the defined actions.

Let's say you configure your Thread Group with the following parameters:

• Number of Threads (Users): 100


• Ramp-Up Period: 10 seconds
• Loop Count: 5

This means that you want to simulate 100 virtual users accessing the e-commerce website.
The ramp-up period of 10 seconds indicates that JMeter will gradually increase the number
of active threads over that time. In this case, it will start with one user and increment by one
user every 0.1 seconds until it reaches the maximum of 100 users.

The loop count of 5 means that each virtual user will repeat the defined actions five times.
For example, a user might visit the website, search for a product, add it to the cart, proceed
to checkout, and complete the purchase. This sequence of actions will be repeated five
times for each user.

During the test execution, JMeter will distribute the virtual users evenly across the specified
ramp-up period. As the test progresses, the Thread Group will generate concurrent requests
from the virtual users to the e-commerce website, simulating real-world user behavior.

The Thread Group can be configured with various settings such as think time (time between
actions), startup delay (delay before the first thread starts), and duration (how long the test
should run). These settings allow you to control the test conditions and mimic real-life usage
patterns.

In summary, the Thread Group in JMeter represents a group of virtual users that simulate
user behavior during performance testing. It allows you to define the number of users, the
ramp-up period, and the actions they perform on the target system. It helps in emulating
realistic load scenarios and evaluating the system's performance under different user loads.

Samplers in JMeter are the actual requests which are sent to the server. Samplers are
added to the Thread Groups. Samplers in JMeter have different types of requests, users can
choose from them as per their requirement and send the request to the server.

Cmd comand for html report genrate:


jmeter -n -t "C:\Users\khadi\OneDrive\Desktop\apache-jmeter\apache-jmeter-
5.6.2\bin\t1.jmx" -l "C:\Users\khadi\OneDrive\Desktop\result\aggregate.csv" -e -o
"C:\Users\khadi\OneDrive\Desktop\report"

Approach 1: to create report at the end of the test


————————————— — — — — — — — —
jmeter -n -t(path of .jmx file) -l(path of examples folder along with name of csv file where you
want to keep the results) -e -o(path of output folder where you want to save the results)

Approach 2: create report from a standalone csv file


———————————————— — — — — — —
jmeter -g (path of resultant csv file) -o (path of output folder where you want to save the
results)

https://haquemousume.medium.com/learn-to-generate-and-analyse-html-intuitive-reports-in-
jmeter-
574dbe1fca72#:~:text=%23%20Jmeter%20%2De%20%3A%20This%20command,results%2
0into%20given%20output%20folder.

USE tool
result.csv

C:\Users\khadi\OneDrive\Desktop\apache-jmeter\apache-jmeter-
5.6.2\bin\user.properties

C:\Users\khadi\OneDrive\Desktop\report

How to generate Graphical results

Step 1 : Download JMeter Graphs Generator Listener Plugin https://jmeter-


plugins.org/?search=jp... : Download JMeter Command Line graphs plugin https://jmeter-
plugins.org/?search=jp...

https://www.youtube.com/watch?v=7BuPnFUl2iY

https://jmeter-plugins.org/?search=jpgc-ggl

JMeter Custom Thread Groups

https://www.redline13.com/blog/2022/10/jmeter-custom-thread-
groups/#:~:text=Setting%20up%20Custom%20Thread%20Groups%20in%20JMeter&text=A
ccessing%20the%20%E2%80%9CPlugins%20Manager%E2%80%9D%20from,Apply%20C
hanges%20and%20Restart%20JMeter%E2%80%9D.
Login page:

https://studysection.com/blog/testing-the-login-page-using-jmeter/

https://www.javatpoint.com/jmeter-recording-login-test

JMeter Web service API Test Plan

https://www.simplilearn.com/tutorials/jmeter-tutorial/jmeter-api-testing
Stress testing:

https://www.youtube.com/watch?v=O61k_Wz0gW0

jmeter – distributed testing

https://www.youtube.com/watch?v=NqYbPMdBqj4&t=729s

beanshell script in jmeter

https://www.youtube.com/watch?v=RBsWEENzSQ8
var link;
vars.put("link", "www.google.com");//to set the value for a veriable
var x=vars.get("link");//to get the value for a veriable

log.info("value of x is" + x);//to print inside the log

Ctx is the most powerful variable used in beanshell


It provides the read write access
It represent the jmeter context class

var y=ctx.getThread().getThreadName();//to get thread name

log.info("Thread name is" + y);


var rc=prev.getResponseCode();
var rm=prev.getResponseMessage();
log.info("++++++++++rc" + "" + rc);

log.info("++++++++++RM" + "" + rm);

Does JMeter simulate actual browser behavior?

No, JMeter does not support the actual browser behavior. It does not render the
HTML webpages as the normal browser does. The response can be viewed in
HTML format but the actual timings are not present in the generated samples.
As you know that JMeter is not a browser, but JMeter has HTTP Cache
Manager to mimic the browser behaviour and make your tests more
realistic in terms of caching. “HTTP Cache Manager” is used to
simulate the browser caching behaviour in JMeter by adding caching
functionality to HTTP requests within its scope.

JMeter Regular Expression Extractor

https://regexr.com/
https://www.youtube.com/watch?v=7-NcyZuUQnw&t=449s

Jmeter How to record login test


https://www.youtube.com/watch?v=zn1DSUZ6t64
Link for file converter
https://converter.blazemeter.com/

How to create a Database Test Plan


https://www.youtube.com/watch?v=oy53KAKHpts

Rest API Testing using JMeter


https://www.youtube.com/watch?v=RrQx_tmUosY

https://openweathermap.org/
https://openweathermap.org/api/geocoding-api
API request call:
https://api.openweathermap.org/geo/1.0/direct?q=Pakistan&limit=5&app
id=cf1d51a3457591c3ec8fb7245405ab20

How to test SOAP/REST APIs in


JMeter
https://www.youtube.com/watch?v=fUxLWHZKvmg
https://reqres.in/api/users?page=2

Server=https://reqres.in
Path=/api/users
Parameters= page=2
Methods:
Get: Retrived data from the server
Post: to create new data to server
Put: update data in server

Write data to CSV file | BeanShell


PostProcessor
https://www.youtube.com/watch?v=Nubg1eP3oh4&t=2s

You might also like