Skip to content

๐Ÿš€ Load Testing Manualยถ

This guide explains how to perform load testing using Apache JMeter for Unibeam services.


๐Ÿ“ Prerequisitesยถ

  1. Download JMeter
    Get the latest version from Apache JMeter.

  2. Add Required Libraries
    Place the following JAR files in the lib/ directory of your JMeter installation:

  3. Jedis (Redis client)
  4. Jackson Databind
  5. Common SIA JAR: Build from the common SIA project (mvn clean install) and copy the resulting JAR from target/.

  6. Start JMeter UI
    Run the following command from the bin/ directory:

    ./jmeter
    

  7. Open the Test Plan
    Load the provided .jmx file in the JMeter UI to begin testing.


โš™๏ธ Test Setupยถ

  1. Create a New Customer
    Set up a new customer in the system.

  2. Create a New MNO and Bind SMSC Simulator
    Configure a new MNO and attach the SMSC simulator.

  3. Inject 25,000 Users
    Use the provided script to populate test data.


๐Ÿ“Š Monitoring Resultsยถ

  • Grafana Dashboard: Monitor via the sia-api dashboard.
  • Logs: Review application and infrastructure logs.
  • Alerts: Check for triggered alerts during the test.
  • Kubernetes: Observe resource usage and pod status.
  • AWS Console: Monitor cloud resource metrics.

๐Ÿงช Injecting Test Dataยถ

Redis: Create Usersยถ

Use the following script to create 25,000 users in Redis:

sh create_users.sh

๐Ÿงน Cleaning Up Test Dataยถ

MongoDBยถ

Accessing MongoDB (IL Production)

Connect using the following command:

mongosh "mongodb+srv://il-prod-pl-0.afpte.mongodb.net/" --apiVersion 1 --username unibeam
Password: 7Tw4sz8Euf2mfCXQ

Delete Test Data in unibeam Database:

use unibeam

db.auth_audits.deleteMany({ "customerId": "roi" })

db.customer_level_aggregation_hourly.deleteMany({
  "aggregationKey.customerId": "roi"
})

db.customer_level_aggregation_daily.deleteMany({
  "aggregationKey.customerId": "roi"
})

db.customer_level_aggregation_monthly.deleteMany({
  "aggregationKey.customerId": "roi"
})

Check JobRunr Collections:

use jobrunr

db.getCollectionNames().forEach(function(collectionName) {
  print("Collection: " + collectionName + ", Count: " + db[collectionName].countDocuments({}));
});

Clean Timer Jobs:

db.jobs.deleteMany({ state: { $in: ["SUCCEEDED", "FAILED", "DELETED"] } })

Redis: Delete Usersยถ

Remove test users from Redis:

sh delete_users.sh

๐Ÿ“š Referencesยถ