Create Your First Performance Test

Learn how to create and configure your first performance test in Maeris. This guide will walk you through the process step by step.

Overview

A performance test in Maeris simulates multiple users making requests to your API simultaneously. This helps you understand how your API behaves under load and identify performance bottlenecks.

Step-by-Step Guide

  1. Navigate to Performance Testing: Open the Performance Testing section in Maeris
  2. Create New Test: Click "New Performance Test" or "Create Test" button
  3. Name Your Test: Give your test a descriptive name

    Example: "User API Load Test" or "Checkout Flow Stress Test"

  4. Select API Endpoints: Choose which API requests or flows to test

    You can select individual API requests or entire API flows

  5. Configure Virtual Users: Set the number of virtual users (concurrent requests)

    Start with a small number (e.g., 10-50) and increase gradually

  6. Set Test Duration: Configure how long the test should run

    Common durations: 5-15 minutes for initial tests, longer for soak tests

  7. Configure Load Profile: Set how load ramps up over time

    See Load Profile Configuration for details

  8. Set Performance Thresholds: Define acceptable performance criteria (optional)

    Set maximum response times, error rates, etc.

  9. Configure Test Settings: Set additional test configuration options

    See Performance Test Configuration for details

  10. Save and Run: Save your test configuration and start the test

Selecting API Endpoints

You can test individual API requests or entire API flows. Choose endpoints that represent critical user journeys or high-traffic scenarios.

What to Test

  • Critical Paths: Most important user journeys (login, checkout, etc.)
  • High-Traffic Endpoints: APIs that receive the most requests
  • Resource-Intensive Operations: APIs that perform heavy computations
  • Database-Heavy Endpoints: APIs that make complex database queries
  • Third-Party Integrations: APIs that call external services

Understanding Virtual Users

Virtual users (VUs) simulate real users making requests to your API. The number of virtual users determines the load on your system.

Choosing the Right Number

  • Start Small: Begin with 10-50 virtual users to establish a baseline
  • Gradually Increase: Increase load incrementally to find breaking points
  • Consider Real Traffic: Base numbers on expected production traffic
  • Test Limits: Test beyond expected load to find capacity limits

Example: Basic Load Test

Here's an example configuration for a basic load test:

Test Configuration:
Name: User API Load Test
Endpoints: GET /api/users, POST /api/users
Virtual Users: 50
Duration: 10 minutes
Ramp-up: 2 minutes (gradual increase)
Max Response Time: 1000ms
Max Error Rate: 1%

Test Data Considerations

Using appropriate test data is crucial for realistic performance tests.

Best Practices

  • Use Realistic Data: Use data that mirrors production scenarios
  • Data Pools: Create pools of test data to avoid conflicts
  • Unique Identifiers: Ensure each virtual user uses unique data
  • Clean Up: Plan for cleanup of test data after tests
  • Isolate Test Data: Use separate test environments when possible

Best Practices

  • Start with Baseline: Run a low-load test first to establish baseline metrics
  • Test Incrementally: Gradually increase load to find breaking points
  • Monitor Resources: Watch server CPU, memory, and network during tests
  • Test Realistic Scenarios: Use realistic request patterns and data
  • Document Configuration: Keep notes on test configurations and results
  • Test in Staging: Run performance tests in staging before production
  • Set Up Alerts: Configure alerts for test failures or threshold breaches

Next Steps