Skip to main content

Overview

Testing SDK integrations requires a different approach than API testing. The SDK renders UI components, handles tokenization, and manages client-side state. This guide covers mock setup for unit tests, error state testing, integration test patterns, and CI/CD configuration.

SDK Mock Setup for Unit Tests

When unit testing your application code that integrates with the Yuno SDK, mock the SDK to isolate your business logic from the SDK internals.

Mocking the Web SDK

Mocking the Mobile SDK

Error State Testing

Test how your integration handles SDK errors and edge cases.

Common error scenarios

Testing error callbacks

Integration Test Patterns

Integration tests validate the full flow from your frontend through your backend to the Yuno sandbox API.

End-to-end with Playwright

API integration tests

CI/CD Pipeline Integration

GitHub Actions

Environment secrets

Store your Yuno sandbox credentials as CI/CD secrets:
Never use production credentials in CI/CD pipelines. Always use sandbox credentials for automated testing.

Testing Different Payment Methods

Payment method test matrix

Structure your tests to cover each payment method you support:

Sandbox vs. production parity

Always run your full test suite against sandbox before deploying to production. Use feature flags to switch between sandbox and production API URLs based on your environment.