Skip to content

JMeter test suite for performance & functional validation of a financial system's API, showcasing API chaining, data-driven testing, and realistic load simulation. Its main objective is to mimic a full transaction lifecycle_from admin authentication to financial exchanges_while verifying data integrity and system stability under load.

Notifications You must be signed in to change notification settings

ehasan101/JMeter-API-Chaining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JMeter API Chaining

This repository contains a JMeter performance and functional test suite designed to validate a financial system's API. It demonstrates API Chaining, data-driven testing, and realistic load simulation.

The primary goal is to simulate a complete transaction lifecycle—from Admin authentication to various financial exchanges—ensuring data integrity and system stability under load.

Testcase Scenarios for API Chaining in JMeter Test

  1. Admin Authentication & Token Chaining:

    • Logs in as an Admin once to generate a bearer token.
    • The token is extracted and shared globally across all thread groups for secure API access.
  2. Agent-to-Customer Deposit:

    • Threads: 5 Agents.
    • Action: Performing deposits for 10 unique customers.
    • Data Source: deposit.csv.
  3. Customer-to-Customer Fund Transfer (Send Money):

    • Threads: 5 Customers.
    • Action: Sending money to 10 different recipient customers.
    • Data Source: sendMoney.csv.
  4. Customer-to-Merchant Payment:

    • Threads: 5 Customers.
    • Action: Making payments to 2 registered merchants.
    • Data Source: payment.csv.

Technical Implementation

  • API Chaining: Uses JSON Extractors to pass dynamic variables (like Auth Tokens) between different requests.
  • Data Driven: Integrated 3 separate CSV files to manage credentials for Agents, Customers, and Merchants.
  • Dynamic Values: Utilizes the Random Variable Controller to generate dynamic transaction amounts, ensuring realistic balance fluctuations.
  • Load Balancing: Each thread group is configured with a 120-second ramp-up period to simulate a gradual increase in traffic.
  • Assertions: Every request includes Response Assertions to verify successful status codes (e.g., 200 OK, 201 Created) and ensure no transaction failure.

Prerequisites

  • Install JAVA JDK (LTS) & Apache JMeter 5.x
  • Plugins: Plugins Manager (recommended)
  • External CSV data files (included in 'resources' the repo)

How to run!

  1. Clone this repository:
    git clone https://github.com/ehasan321/JMeter-API-chaining.git
    cd JMeter-API-chaining
    
  2. Ensure all required CSV datasets are moved into the root directory of the project folder.
  3. Run the JMeter test in CLI (Non-GUI) mode to optimize performance and generate the results file:
    jmeter -n -t DMoney_Jmeter_API_chaining.jmx -l DMoney.jtl -e -o Reports
  • -n: Run in non-GUI mode.
  • -t: Path to the JMX source file.
  • -l: Path to the JTL file to log sample results.
  • -e -o: Generate an HTML report in the specified "Reports" folder.
  1. View the Results: navigate to the Reports directory and open index.html

Summary & Statistics

image1 image2


This is what I have done in this project!

  • API Chaining
  • Multiple Scenarios
  • Data-Driven Testing
  • Automated Assertions
  • HTML Report Generation

This project demonstrates end-to-end API testing with token chaining, data-driven CSV inputs, realistic load simulation across 4 user roles, automated response validation, and an interactive HTML dashboard for performance analysis.


Contributing

Contributions are welcome! If you would like to help improve this project, please feel free to contribute, simply fork the repository, create a feature branch, and submit a pull request with your changes.

Author: @HASAN

About

JMeter test suite for performance & functional validation of a financial system's API, showcasing API chaining, data-driven testing, and realistic load simulation. Its main objective is to mimic a full transaction lifecycle_from admin authentication to financial exchanges_while verifying data integrity and system stability under load.

Resources

Stars

Watchers

Forks