n8n 'No testing function found for this credential' Fix
Описание и применение
В n8n пользовательские узлы с собственными учетными данными не проходят тестирование из‑за ошибки загрузчика. Решение: определить тест непосредственно в классе учетных данных, удалить testedBy и credentialTest. После перезапуска n8n тест отображается корректно.
Задача
Custom n8n nodes with credentials fail to show a test result, displaying "No testing function found for this credential."
Результат
Custom credentials now test correctly without relying on node‑level credentialTest, simplifying maintenance and avoiding loader bugs.
Рабочий процесс
- 1. Open the credential file (e.g., credentials/MyApi.credentials.ts).
- 2. Remove the testedBy property.
- 3. Add a test property of type ICredentialTestRequest with request details and validation rules.
- 4. Delete the credentialTest method from the node file (e.g., nodes/MyApi.node.ts).
- 5. Save changes and restart n8n.
- 6. In the n8n UI, open the credential and click Test – a green checkmark should appear if the API responds correctly.
- 7. (Optional) If you need shared test logic across nodes, package the node as a real npm module so n8n loads it as a community node, which resolves credentialTest correctly.
Доказательства
The fix that survives across n8n versions is to stop relying on credentialTest on the node and instead define the test directly on the credential class as an ICredentialTestRequest.
For custom and community nodes the two keys never match, so the linkage is dropped and the UI shows the "no testing function" message.
- Дата записи: 2026-09-09T23:15:40.611Z