Coder Social home page Coder Social logo

apache-jmeter2's Introduction

apache-jmeter-template

The template repository for the Apache-JMeter course on Learning Lab. 的双方各

apache-jmeter2's People

Contributors

qainsights avatar xiezhifeng avatar

Watchers

 avatar

apache-jmeter2's Issues

Upload your first JMeter test plan

Create your first Thread Group

🚀 Launching 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.

JMeter

Congratuations on launching JMeter 🎉

Test Plan

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

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 🚀

⌨️ Activities

  1. Launch JMeter
  2. Add a Thread Group by right clicking on Test Plan > Threads (Users) > Thread Group
  3. Go to File > Save, enter S01_PetStore.jmx and hit Save button
  4. Push the JMeter test plan to your repo

After 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.

Add HTTP Sampler

HTTP Sampler

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.

⌨️ Activities

  1. Add a HTTP Request Defaults by right clicking on Thread Group > Config Element > HTTP Request Defaults.
  2. Add the properties to the HTTP Request Defaults as shown below.

HTTP Request Defaults

  1. Add a HTTP Sampler by right clicking on Thread Group > Sampler > HTTP Request.
  2. Add / to the Path

HTTP Request 1

  1. Add another HTTP Sampler
  2. Add /actions/Catalog.action to the Path

HTTP Request 2

  1. Save your test plan by pressing Ctrl + S
  2. Push the test plan to the repo to go to next exercise.

Welcome!

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.

  • Check that OpenJDK is installed/configured
  • Check that Git is installed
  • Check JMeter is installed/configured
  • Clone this repository on your local machine

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.

OpenJDK

  • Download OpenJDK and follow the instructions mentioned here. Similar instructions can be found in the internet for Linux or macOS operating systems.

Git

  • Download and install Git for your platform from here

Apache JMeter

  • Download Apache JMeter from here
  • Extract the contents and keep it your favorite location.

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.

Clone this repository

This is your workspace to learn JMeter. Clone this repository by issuing the below command.

git clone <repository-url>

Getting started

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 😊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.