Test your integration

Core Testing Principles

Before diving into specific scenarios, keep these guiding principles in mind:

  • Put the Customer First: Test from the end-user's perspective. Is the setup process intuitive? Are the instructions clear? A customer should be able to set up and use the integration quickly and easily.
  • Support Both Test and Live Environments: MoEngage workspaces can be configured in "Test" and "Live" modes. Your integration must function correctly in both environments. Your sandbox account will provide access to both, allowing you to validate the entire workflow without impacting live customer data.
  • Ensure Multi-Data Center Compatibility: MoEngage operates across multiple data centers to serve our global customer base. It is crucial to test your integration against all data centers to ensure it functions correctly for every mutual customer, regardless of their region.
  • Aim for Resilience: Your integration should handle unexpected issues gracefully. Proactively test for potential failures to ensure they don't break the customer's workflow.

Best Practices for Testing Scenarios

A comprehensive testing plan covers more than just the ideal scenario. We recommend structuring your tests around the following flows:

1. Happy Path Testing

This involves testing the integration under normal, expected conditions to ensure the core functionality works as designed.

  • Successful authentication and connection setup.
  • Successful data sync (users, events, segments) with correct data formats.
  • For Connected Apps, a campaign runs successfully, and the "Sent" status is correctly reported based on a 200 OK API response.
  • Data is correctly received from MoEngage Streams or S3 exports.

2. Error Handling

This involves intentionally testing for common errors and failures to ensure your integration handles them gracefully and provides clear feedback to the user.

  • Invalid Credentials: What happens if a user enters an incorrect API key, token, or password? Is the error message clear and helpful?
  • API Failures: Simulate API timeouts, server errors (5xx), or client errors (4xx). Does the integration retry when appropriate? Is the failure correctly logged?
  • Incorrect Data: Send data in the wrong format or with missing required fields. Does the system reject it with a clear error, or does it fail silently?
  • For Connected Apps, a campaign fails due to an API error. Is the "Failed" status correctly reported in MoEngage campaign stats?

3. Edge Case Testing

This involves testing for unusual or extreme scenarios that could challenge your integration.

  • Empty or Null Values: How does your integration handle empty strings or null values for non-required fields?
  • Special Characters & Different Languages: Does your integration correctly process user data or inputs containing special characters or non-English text?
  • Large Data Volumes: Test with a large number of users or events to check for performance bottlenecks or API rate limiting.

Specific Guidance for Connected Apps

For integrations built using the Connected Apps framework, it is vital to test the complete, end-to-end campaign flow:

  1. Revisit the Connection Setup: Ensure all input fields in the App Marketplace are clear, have appropriate validation, and function as expected.
  2. Test Campaign Creation: Create a campaign using your Connected Channel. Verify that all campaign-level input fields are rendered correctly.
  3. Launch and Verify: Launch the test campaign and meticulously check that the campaign stats ("Sent", "Failed") in MoEngage accurately reflect the API responses from your end.

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?