Test Mode Configuration
The Test Mode feature in OsmoX enables administrators to toggle a testing environment for an application, allowing functional testing without sending notifications to real recipients.Overview
Blocked Notifications
Providers associated with test mode enabled applications DO NOT send notifications to end recipients
Whitelist Support
Every application can maintain a whitelist of recipients for which notifications will be processed normally
Configuration Fields
testModeEnabled
A binary flag to enable or disable test mode for an application.| Value | State | Description |
|---|---|---|
1 | ON | Test mode is enabled |
0 | OFF | Test mode is disabled (default) |
When test mode is enabled, notifications are automatically marked as SUCCESS with a dummy response, without actually being delivered.
whitelistRecipients
A JSON object specifying providers and related recipients that will process notifications normally even in test mode. Format:- Keys: Provider ID (string)
- Values: Arrays of recipient strings (email addresses, phone numbers)
["*"] to whitelist ALL recipients for a provider, allowing it to work normally even in test mode.
Enabling Test Mode
For Existing Applications
- GraphQL
- cURL
For New Applications
Configuring Whitelist
Add Whitelisted Recipients
- GraphQL
- cURL
Whitelist can be added or updated even if the application is not in test mode.
Identifying Test Mode Notifications
Notifications processed in test mode have the following characteristics:| Field | Value |
|---|---|
delivery_status | SUCCESS (5) |
result | {"result": "This is a test mode notification. Notification was not delivered to recipient."} |
retry_count | 0 |
Best Practices
1
Validate Whitelist JSON
Always validate your whitelist JSON before submission using a JSON validator tool
2
Use Provider-Specific Whitelists
Configure whitelists per provider to control which channels can send real notifications
3
Wildcard Carefully
Use the
["*"] wildcard only when you want a specific provider to bypass test mode completely