The template repository for the Apache-JMeter course on Learning Lab. 的双方各
xiezhifeng / apache-jmeter2 Goto Github PK
View Code? Open in Web Editor NEWLearn Apache JMeter by doing
Home Page: https://lab.github.com/QAInsights/fun-with-jmeter
Learn Apache JMeter by doing
Home Page: https://lab.github.com/QAInsights/fun-with-jmeter
The prerequisite to launch JMeter is to have Java installed in your computer. You can interact with JMeter using the CLI and Non-CLI mode. Command Line Mode is the recommended mode for performance testing purposes. But to create or edit, you can launch JMeter in Non-CLI mode.
Go to the location where you extracted the content of JMeter file e.g. C:\Tools\apache-jmeter-5.3
Navigate to bin
folder and launch jmeter.bat
for Windows OS or jmeter.sh
for Linux/macOS systems.
If Java is installed properly, JMeter will launch as shown below.
Congratuations on launching JMeter 🎉
In JMeter world, you create test plans which has the file extension of .jmx. If you open .jmx file in your favorite editor, you can see the XML tags.
A typical JMeter test plan consists of at least one Test Plan
element and one or more Thread Groups
and/or Samplers
/Other elements
.
📌 You cannot delete Test Plan
element
Thread Group
is the inception for any JMeter tests. In Thread Group
you can configure the number of threads/users, duration, ramp up period etc.
In this exercise, we are going with the default values of Thread Group
.
Let's get started 🚀
Thread Group
by right clicking on Test Plan > Threads (Users) > Thread Group
File > Save
, enter S01_PetStore.jmx
and hit Save
buttonAfter successful push, I will let you know the next steps.
Tips
📌 Whenever you want to add any type of elements, just right click on the appropriate parent element.
📌 If you want to delete any element, press Delete
key in your keyboard.
⚠ CAUTION: Undo is not possible in JMeter.
📌 Instead of deleting, you can disable the element by clicking on right clicking on it > Disable
.
As you aware, we are going with the default number of threads in Thread Group
. In this exercise, you will learn about HTTP Request
element.
HTTP Sampler lets you send an HTTP/HTTPS request to a web server. It also lets you control whether or not JMeter parses HTML files for images and other embedded resources and sends HTTP requests to retrieve them.
Before adding HTTP Sampler
, let's add the default settings to your HTTP Requests. To define the default settings for HTTP Requests
we are going to add HTTP Request Defaults
.
HTTP Request Defaults element lets you set default values that your HTTP Request controllers use.
In this exercise, we are going to add two HTTP requests to the test plan.
Let's dive into the activities.
HTTP Request Defaults
by right clicking on Thread Group > Config Element > HTTP Request Defaults
.HTTP Request Defaults
as shown below.HTTP Sampler
by right clicking on Thread Group > Sampler > HTTP Request
./
to the Path
HTTP Sampler
/actions/Catalog.action
to the Path
Ctrl + S
Welcome to this course!
Before we can start learning JMeter, let us make sure you have the right setup. You need to install the following things to learn effectively.
Let's get started.
Points to note:
📌 Always install the latest stable versions of the software unless the version specified.
📌 Below exercises have been tested using JMeter 5.3 in OpenJDK 15.
There are additional components you can install if you are planning to develop JMeter, but those are completely optional and beyond the scope of this training.
This is your workspace to learn JMeter. Clone this repository by issuing the below command.
git clone <repository-url>
Once you have everything installed, let's get started.
Close this issue, and I will comment with your next steps.
Points to note:
📌 Sometime I respond too fast ⚡, please bear with me.
📌 Sometime I respond slow, just refresh your browser 😊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.