Testing your Custom Connector

Last updated on Jul 18, 2025

After creating the logic of your custom connector, you need to test whether it retrieves data from your Source. Hevo provides a structured method to test your connector within the test_connector repository.

The testing files are available in the src/main/java directory under:

src > main > java/io/hevo/connector > generic_test

The generic_test folder contains the following files:

  • FileConnectorProcessor.java: Internal file that handles the testing processes. You do not need to modify this file.

  • GenericConnectorTester.java: Execution file containing the testing class that runs the connector in a development environment. You need to execute the main class within this file.

  • config.json: Configuration file where you input your Source credentials for testing.

The testing process involves two main steps:

  1. Update the test configuration file with your Source account details

  2. Execute the test class and verify the output


Update the Test Configuration File

Before running the test, you need to update config.json file with your Source credentials. This ensures that GenericConnectorTester.java can establish a connection using real values. To update the config.json file, do the following:

  1. Navigate to the generic_test folder and open the config.json file. This contains the following:

    {
    "accountType": "PRODUCTION", 
    "authCredentials": { 
        "authType": "OAUTH", 
        "clientId": "<your-client-id>", 
        "clientSecret": "<your-client-secret>", 
        "refreshToken": "***" 
        } 
    }
    
  2. Replace <your-client-id> and <your-client-secret> with the Source credentials.

Note: If your authentication method is different, such as API Key, modify the authType and structure accordingly.


Execute the Test Class and Verify the Output

Once the credentials are configured, you can run the test to verify your connector. To do this:

  1. In your Integrated Development Environment (IDE), locate the GenericConnectorTester.javafile.

  2. Right click the file and select Run, or use the following terminal command:

    java -cp target/test_connector.jar io.hevo.connector.generic_test.GenericConnectorTester
    

After running the test class, the connector performs the following steps:

  1. Initialize connection to the Source.

  2. Fetch available objects such as tables or views.

  3. Retrieve schema details for each object, including field types and constraints.

  4. Fetch Source data to verify that records can be read and processed correctly.

  5. Display the retrieved data as it would appear in the Destination, allowing you to validate its structure and accuracy.

Based on the test results, there are a few possible next steps:

  • If the test is successful, the connector is ready for integration with Hevo. You must send the TestConnector.java file containing the connection logic to your Hevo account executive through Google Drive. Hevo will then handle the next steps and deploy the custom connector.

  • If the test fails, check the error logs to troubleshoot potential issues such as incorrect credentials, connection failures, or unsupported data types. Additionally, validate the data formatting to ensure that retrieved records match the expected types and structure.

Tell us what went wrong