Webhook Integration

Overview Loadmance webhooks allow you to receive real-time notifications about test events and test builder operations in your application. When configured, Loadmance will send HTTP POST requests to your specified endpoint with event data.

Setup 1. Navigate to your profile settings in Loadmance 2. Go to the "Integrations" section 3. Select "Webhook" and enter your endpoint URL 4. Choose which events you want to receive notifications for 5. Save the configuration

Webhook Request Format

Headers

Content-Type: application/json
[Custom headers as configured]

Note: You can configure additional custom headers in your webhook settings.

Request Body Structure

json
{
 "type": "notification",
 "source": "Loadmance",
 "eventType": "TEST_STARTED",
 "title": "Load Test Started",
 "message": "Your load test has begun execution",
 "timestamp": "2025-07-03T14:30:00",
"metadata": {
  "testRunId": "1234567890",
  "maxUser": "100",
  "duration":"300"
 },
 "severity": "INFO"
}

Event Types and Metadata Fields TEST_STARTED Triggered when a load test begins execution.

Metadata Fields:

  • testRunId (string): Unique identifier for the test run

  • maxUser (string): Maximum number of virtual users

  • duration (string): Test duration in seconds

  • watchLive (string): Report address link

Example:

json 
{
 "type":"notification", 
 "source":"Loadmance", 
 "eventType":"TEST_STARTED", 
 "title":"Load Test Started", 
 "message": "Load test execution has begun",
 "timestamp":"2025-07-03T14:30:00", 
 "metadata"{ "
  "testRunId":"1234567890", 
  "maxUser":"100",
  "duration":"300",
  "watchLive":"xxx"
 }, 
 "severity":"info" 
}

TEST_FINISH Triggered when a load test completes successfully.

Metadata Fields:

  • testRunId (string): Unique identifier for the test run

  • status (string): Final test status (FINISHED, FAILED etc.)

  • duration (string): Actual test duration in seconds

  • maxUser (string): Maximum number of virtual users reached

  • totalRequestCount (string): Total number of requests made

  • avgResponseTime (string): Average response time in milliseconds

  • throughput (string): Requests per second

  • apdexScore (string): Apdex score (0.0 to 1.0)

  • runningTime (string): Running time

  • reportLink (string): Report link

Example:

json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"TEST_FINISH",
 "title":"Load Test Completed",
 "message":"Load test has finished successfully",
 "timestamp":"2025-07-03T14:35:00",
 "metadata":{
  "testRunId":"1234567890",
  "status":"FINISH",
  "duration":"15",
  "maxUser":"3",
  "totalRequestCount":"1500015000",
  "avgResponseTime":"245.7",
  "throughput":"50.2",
  "apdexScore":"0.85",
  "runningTime":"10",
  "reportLink": "xxx"
 },
 "severity":"success"
}

TEST_FAILED

Triggered when a load test fails or encounters an error.

Metadata Fields:

  • testRunId (string): Unique identifier for the test run

  • duration (string): Duration until failure in seconds

  • totalRequestCount (string): Total requests made before failure

  • errorRate (string): Error rate as a percentage (0-100)

  • avgResponseTime (string): Average response time before failure

  • runningTime (string) Running time

  • failReportLink (string): Failed report link address

Example:

json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"TEST_FAILED",
 "title":"Load Test Failed",
 "message":"Load test encountered an error and stopped",
 "timestamp":"2025-07-03T14:32:30",
 "metadata"{
  "testRunId":"1234567890",
  "duration":"150",
  "totalRequestCount":"7500",
  "errorRate":"6.0",
  "avgResponseTime":"3200.5",
  "runningTime":"15",
  "failReportLink": "xxx"
 },
"severity":"error"
}

TEST_BUILDER_CREATED

Triggered when a new test builder is created.

Metadata Fields:

  • testBuilderId (string): Unique identifier for the test builder

  • testBuilderTitle (string): Name/title of the test builder

  • projectId (string): Project identifier

  • projectName (string): Project name

Example:

json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"TEST_BUILDER_CREATED",
 "title":"Test Builder Created",
 "message":"A new test scenario has been created",
 "timestamp":"2025-07-03T14:25:00",
 "metadata":{
  "testBuilderId":"9876543210",
  "testBuilderTitle":"API Stress Test",
  "projectId":"12345",
  "projectName":"E-commerce Platform"
 },
"severity":"info"
}

TEST_BUILDER_UPDATED

Triggered when an existing test builder is modified.

Metadata Fields:

  • testBuilderId (string): Unique identifier for the test builder

  • testBuilderTitle (string): Name/title of the test builder

  • projectId (string): Project identifier

  • projectName (string): Project name

TEST_BUILDER_DELETED

Triggered when a test builder is deleted.

Metadata Fields:

  • testBuilderId (string): Unique identifier for the test builder

  • testBuilderTitle (string): Name/title of the test builder

  • projectId (string): Project identifier

  • projectName (string): Project name

PROJECT_CREATED

Triggered when a new project is created.

Metadata Fields:

  • No metadata fields are included for project events

Example:

json
{ 
 "type":"notification",
 "source":"Loadmance",
 "eventType":"PROJECT_CREATED",
 "title""title":"📁 New Project Created",
 "message":"Project 'E-commerce Platform' has been created.",
 "timestamp":"2025-07-03T14:20:00",
 "metadata"{},
 "severity":"info"
}

PROJECT_UPDATED

Triggered when an existing project is modified.

Metadata Fields:

  • No metadata fields are included for project events

Example:

json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"PROJECT_UPDATED",
 "title":"📝 Project Updated",
 "message":"Project 'E-commerce Platform' has been updated.",
 "timestamp":"2025-07-03T14:22:00",
 "metadata":{},
 "severity":"info"
}

PROJECT_DELETED

Triggered when a project is deleted.

Metadata Fields:

  • No metadata fields are included for project events

Example:

json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"PROJECT_DELETED",
 "title":"🗂 Project Deleted",
 "message":"Project'E-commerce Platform' has been deleted.",
 "timestamp":"2025-07-03T14:25:00",
 "metadata":{},
 "severity":"info"
}

Severity Levels

  • INFO: Informational events (test started, builder created/updated, project events)

  • SUCCESS: Successful completion events (test finished successfully)

  • WARNING: Warning events (performance thresholds exceeded)

  • ERROR: Error events (test failed, critical issues)

Endpoint Requirements

Response

Your webhook endpoint should respond with:

  • Status Code: 200-299 for successful processing

  • Response Time: Under 10 seconds

  • Content: Any response body (ignored by Loadmance)

Retry Logic

  • Loadmance will retry failed requests up to 3 times (4 total attempts)

  • Retry intervals use exponential backoff: 1 second, 2 seconds, 4 seconds

  • Maximum delay between retries is capped at 10 seconds

  • Requests timing out after 10 seconds will be retried

Last updated