How to test custom node credentials with custom test function?

Hi! I am new to node development, I am building a programmatic style node that connects to an Oracle database. My credentials need to be tested with a custom function. I have declared a credentials object in the .node.ts file like this:

credentials: [
                name: 'myConnection',
                required: true,
                testedBy: 'testConnection'

I’ve declared this testConnection function in the node’s methods object like this:

methods = {
        listSearch: {
                //the credential test function is declared here:
        credentialTest: {
            testConnection /** this function exported in and imported from another file */

My test function adheres to the ICredentialTestFunction interface by n8n, returning a promise of INodeCredentialTestResult

Yet I keep getting the ‘No testing function found for this credential’ error when testing the credentials.

Am I doing something wrong?

  • n8n version: 0.210.0
  • Default SQLite database
  • Running n8n via Docker

Hey @lucianblignaut,

Welcome to the community :raised_hands:

An Oracle node is going to be fun as it would typically require an oracle binary on the image to work but I like what you are trying to do :slight_smile:

Normally we see that message when there is a typo somewhere, As a quick test it might be worth doing a copy of the connection test code into that method just to see if changes anything.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.