workflow-integration-testing

Run end-to-end Workflow integration tests with renderForTest and WorkflowTurbine.

1.1k|112|Updated Jun 2, 2020
One-click install
npx skills add https://github.com/square/workflow-kotlin --skill workflow-integration-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-integration-testing
Source: https://github.com/square/workflow-kotlin/tree/main/workflow-testing/.agents/skills/workflow-integration-testing
Command: npx skills add https://github.com/square/workflow-kotlin --skill workflow-integration-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write integration tests that run a full workflow runtime using renderForTest and WorkflowTurbine. Unlike unit tests with testRender, these tests execute real workers, real child workflows, and real async behavior.

Core Features & Use Cases

  • Test multi-step user flows with a real runtime
  • Validate end-to-end asynchronous behavior, renders, events, outputs, and snapshots
  • Use WorkflowTurbine to consume renders, outputs, and snapshots during tests

Quick Start

Create an integration test by calling renderForTest on your workflow and drive the turbine to observe renderings and outputs.

Frequently Asked Questions about workflow-integration-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run integration tests for Kotlin workflows with real workers and async behavior?

Use renderForTest to run your workflow with a real runtime, then drive WorkflowTurbine to consume and validate renders, outputs, and snapshots during tests.

What is the difference between testRender and renderForTest for workflow testing?

Unlike unit tests using testRender, renderForTest executes a real workflow runtime that runs real child workflows, real workers, and real async behavior for true end-to-end integration testing.

How do I validate end-to-end workflow renders, events, and outputs in Kotlin?

Validate end-to-end workflow renders, events, and outputs by driving WorkflowTurbine to consume each rendering and output snapshot produced by the real runtime during integration testing.

Do I need a real runtime to test multi-step user flows in Kotlin workflows?

Yes, testing multi-step user flows requires a real runtime to execute real workers and async behavior, ensuring deterministic lifecycle management and proper cleanup across all steps.

Can I use WorkflowTurbine to test asynchronous workflow behavior and snapshots?

Yes, WorkflowTurbine consumes renders, outputs, and snapshots during tests, allowing you to validate end-to-end asynchronous behavior and deterministic lifecycle management for Kotlin workflows.

When should I use end-to-end integration testing instead of unit testing for workflows?

Use end-to-end integration testing when you need to validate real workers, real child workflows, and async behavior across multi-step user flows, rather than isolated render states in unit tests.