How to do the unit testing for each node in workflow?

Hello Everyone,

I’m currently working on a REST API to fetch data from various platforms and applications such as Google, Facebook, and others for our reporting dashboard. Our ultimate goal is to display consolidate data and metrics from all platforms into a single application. So far, we have completed more than 6 workflows, all triggered from webhooks.

Now, I’m looking to perform unit testing for these workflows. Could anyone provide guidance on how to conduct unit testing with n8n workflows?

Your assistance would be greatly appreciated.

Information on your n8n setup

  • n8n version: 1.25.1
  • Database: Postgres 15
  • n8n EXECUTIONS_PROCESS setting: Queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

There is a “pin data” option for almost every node. Thats how you can test that your workflow works as intended.

Thanks for the Reply. How can I do this pin data without using n8n UI. Is there any other option is available which like cli tool or REST api. Just I want to be integrate in CI pipeline.

There is a pinData property for the node in the JSON view. But how are you going to use the n8n without an UI? It doesn’t make any sense

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