UAT (User Acceptance Tests)

User Acceptance Testing (UAT) allows you to test your integration with the Martailer platform in your own sandbox or production environments. This ensures that your application can successfully interact with Martailer APIs and meet all necessary requirements before going live.

Key Features

  • Environments: UAT should be performed in your sandbox and production environment.
  • API Access: Test API endpoints and features mirror production functionality.
  • Error Handling: Validate your error handling and edge-case scenarios.
  • Campaign Simulation: Create, manage, and test campaigns using your environment-specific data.

Note: When testing in production, make sure to create short-term, low budget campaigns.




UAT Setup

Step 1: Ensure Environment Access

Confirm access to your chosen environment (sandbox or production). If access is needed, contact your Martailer account representative or administrator.

Step 2: API Credentials

Use the API keys specific to your environment. The same API keys used for regular operations will work for UAT testing.

Example API Key:

key_ProdOrSandbox_12345abcde67890fghij

Step 3: Configure Your Application

Ensure your application targets the correct API base URL for your selected environment:

  • Sandbox:
https://sandbox.api.martailer.com
  • Production:
https://api.martailer.com

UAT Tests

Use your selected environment to validate the following scenarios:

1. Store Creation

Verify that your application can create stores successfully.

Test Steps:

  1. Submit a POST request to the /stores endpoint with sample store data.
  2. Validate the response and ensure the store ID is returned.

Example Request:

POST https://sandbox.api.martailer.com/stores
Content-Type: application/json
X-API-KEY: key_ProdOrSandbox_12345abcde67890fghij

{
  "storeId": "store123",
  "name": "Test Store",
  "location": "US"
}

Expected Response:

{
  "storeId": "store123",
  "status": "CREATED"
}

2. Product Catalog Synchronization

Ensure that your application can synchronize the product catalog.

Test Steps:

  1. Submit a POST request to the /sync/products endpoint with sample product data.
  2. Validate the response to confirm successful synchronization.

Example Request:

POST https://sandbox.api.martailer.com/sync/products
Content-Type: application/json
X-API-KEY: key_ProdOrSandbox_12345abcde67890fghij

{
  "products": [
    {
      "productId": "prod123",
      "name": "Test Product",
      "price": 19.99,
      "availability": "in_stock"
    }
  ]
}

Expected Response:

{
  "message": "Product catalog synchronized successfully",
  "syncedProducts": 1
}

3. Event Logging

Verify that your application can log events such as page views, impressions, and clicks.

Test Steps:

  1. Submit a PUT request to the /log/events endpoint with sample event data.
  2. Validate the response to confirm successful event logging.

Example Request:

PUT https://sandbox.api.martailer.com/log/events
Content-Type: application/json
X-API-KEY: key_ProdOrSandbox_12345abcde67890fghij

{
  "event": "pageview",
  "visitorId": "visitor123",
  "timestamp": "2025-02-01T12:00:00Z",
  "details": {
    "page": "/home"
  }
}

Expected Response:

{
  "message": "Event logged successfully",
  "event": "pageview",
  "visitorId": "visitor123"
}

4. Ad Retrieval

Ensure that your application can retrieve ads based on specified parameters.

Test Steps:

  1. Submit a POST request to the /combined/ads endpoint with the necessary parameters.
  2. Validate the response to confirm that ads are returned as expected.

Example Request:

POST https://sandbox.api.martailer.com/combined/ads
Content-Type: application/json
X-API-KEY: key_ProdOrSandbox_12345abcde67890fghij

{
  "placement": "homepage_banner",
  "visitorId": "visitor123",
  "numberOfAds": 3
}

Expected Response:

{
  "ads": [
    {
      "adId": "ad123",
      "type": "banner",
      "content": {
        "imageUrl": "https://example.com/banner.jpg",
        "clickUrl": "https://example.com"
      }
    }
  ]
}

5. Order Reporting

Verify that your application can report orders.

Test Steps:

  1. Submit a POST request to the /log/orders endpoint with sample order data.
  2. Validate the response to confirm successful order reporting.

Example Request:

POST https://sandbox.api.martailer.com/log/orders
Content-Type: application/json
X-API-KEY: key_ProdOrSandbox_12345abcde67890fghij

{
  "orderId": "order123",
  "customerId": "customer123",
  "items": [
    {
      "productId": "prod123",
      "quantity": 2,
      "price": 19.99
    }
  ],
  "total": 39.98,
  "timestamp": "2025-02-01T12:30:00Z"
}

Expected Response:

{
  "message": "Order reported successfully",
  "orderId": "order123"
}

Testing Best Practices

  • Use realistic data to simulate real-world scenarios.
  • Test both successful and failed API responses.
  • Review all error codes and ensure proper handling in your application.
  • Document all testing outcomes for future reference.

Support

For assistance with UAT, please reach out to our support team:

We’re here to ensure your integration with Martailer is seamless and successful!