| id | common-errors | ||
|---|---|---|---|
| title | Keploy Troubleshooting Guide | ||
| sidebar_label | Troubleshooting Guide | ||
| tags |
|
Let’s explore some frequently encountered issues and how to resolve them effectively.
This error occurs when Keploy cannot locate or access a required dependency, such as a database or external service.
- The dependency may not be running or is incorrectly configured.
- Networking issues may be preventing Keploy from connecting to external dependencies.
- Verify that all required services (e.g., databases, third-party APIs) are active and accessible.
- Check the environment variables or configuration files to confirm the correct host and port details.
- Use network diagnostic tools (e.g., ping, traceroute) to identify connectivity issues.
Keploy fails to record incoming API traffic, meaning no tests are generated.
- Incorrect integration with the application.
- Keploy may not be correctly started with the application, or the SDK is not configured properly.
- The application may not be making API calls that are recognizable by Keploy.
- Double-check the integration guide for the programming language you’re using.
- Ensure that Keploy is properly hooked into the API layer.
- Check Keploy logs for any missed or skipped requests.
Keploy is unable to replay recorded API requests.
- External services or databases may be in a different state than they were during recording.
- Non-deterministic values like timestamps, UUIDs, or random values are causing failures.
- Leverage Keploy’s mocking capabilities to simulate external services and databases.
- Use configurations to handle or exclude non-deterministic values for consistent comparisons.
- Regularly reset the database state to match the conditions during recording.
When Keploy replays API calls, it detects a mismatch between the recorded response and the current response.
- The application’s behavior has changed, leading to different responses.
- Changes in the response format, status codes, or headers that weren’t present during recording.
- Review the application changes and determine if the mismatch is expected (e.g., new features).
- If the change is acceptable, update the test baseline to reflect the new behavior.
- Use Keploy’s flexible comparison options to ignore certain fields or values (like timestamps or version numbers).
Keploy generates tests that don’t properly reflect the API interactions.
- The API interaction may be too complex or involve custom logic that Keploy cannot automatically handle.
- API parameters may be missing or misinterpreted during recording.
- Review the recorded test cases for correctness.
- Manually adjust the generated tests to include missing or misinterpreted parameters.
- Make use of Keploy’s API to refine the recording process if necessary.
Keploy cannot connect to the database or other external systems during the replay of tests.
- The test environment may not have access to the same database as the original recording.
- Database credentials or host information could be incorrect or missing in the test environment.
- Mirror the test environment configuration with the recording setup.
- Use database mocks or stubs for isolated testing.
- Double-check connection strings, credentials, and database availability.
Keploy cannot find a valid configuration file or encounters errors in the configuration.
- The Keploy configuration file (keploy.yaml or similar) is missing or contains invalid values.
- Environment variables required by Keploy may not be set.
- Ensure the configuration file exists and follows the correct format.
- Populate all required fields with valid values.
- Check that environment variables are properly set.
Keploy times out while recording or replaying API calls.
- Long-running API requests or slow external dependencies can cause timeout issues.
- Keploy may have low timeout settings for API calls.
- Increase timeout settings in the Keploy configuration.
- Identify and optimize slow-performing APIs or dependencies.
- Use monitoring tools to analyze API performance.
Keploy fails due to insufficient permissions when accessing files, networks, or other resources.
The user or service running Keploy may not have sufficient permissions to access resources like databases, APIs, or file systems.
- Ensure that the user or service running Keploy has the necessary permissions.
- Review system permissions and provide the required access rights for Keploy to function properly.
Errors occur because of version mismatches between Keploy, its dependencies, or the application it’s testing.
- Using incompatible versions of Keploy or related SDKs with your application.
- Dependencies of Keploy (e.g., for mocking or replaying) may have updated and broken compatibility.
- Verify version compatibility for Keploy and its SDKs.
- Consult Keploy documentation or release notes for known issues.
- Use version pinning to maintain a stable environment.
Keploy does not support the protocol or API structure you are using (e.g., gRPC, SOAP, etc.).
- The application might use an API or protocol that Keploy doesn’t yet support (e.g., WebSocket, gRPC).
- Confirm the supported protocols (currently HTTP/REST and GraphQL).
- Consider alternative tools or frameworks for unsupported protocols.
If you’re still encountering issues after trying these solutions, feel free to reach out to the Keploy team on Slack
Happy Testing!