Testing & QA
Thorough testing and QA are essential to ensure seamless integration of the Humance SDK. This section guides setting up a test environment, validating functionality, and handling errors effectively.
Testing Environment
Humance provides a dedicated test environment for development and QA purposes. You can safely simulate API interactions and validate functionality without affecting live data.
Test API Keys:
Humance provides a separate set of Test API keys (
API-Key
andAPI-Secret
) specifically for testing.These keys are accessible in your Humance account dashboard under the "Integration" section.
Switching Between Environments
Humance uses the same API endpoint for both test and production environments. Switching between environments is controlled by the API keys you provide:
Test Environment:
Use your Test API Key and Test API Secret to interact with the API in a sandbox environment.
Test keys simulate all functionality without impacting live data.
Production Environment:
Use your Production API Key and Production API Secret for live interactions.
Production keys interact with real data and live transactions.
How to Switch Environments:
Simply update the apiKey
and apiSecret
fields in the SDK configuration. The SDK automatically detects whether the keys are for test or production.
Example Configuration:
Key Testing Areas
API Integration:
Validate all SDK interactions with the Humance API, including:
Fetching projects and stories.
Creating contributions.
Tracking user actions (e.g., likes, shares).
Ensure all required parameters are included in requests.
Error Simulation:
Trigger error responses by:
Using invalid or missing API keys.
Sending incomplete parameters.
Exceeding rate limits.
Verify that your app handles these errors gracefully, using the
message
andfix
fields in the error response object.
SDK Functionality:
Test each SDK component, such as the projects-stories module, contribution workflows, and share functionality.
Verify proper rendering of UI elements in your app.
Last updated