• Decorator that marks a test class as a Camunda process test.

    Automatically sets up the Camunda runtime, injects the Zeebe client, and manages test lifecycle.

    Type Parameters

    • T extends (new (...args: any[]) => {})

    Parameters

    • constructor: T

    Returns T

    @CamundaProcessTest
    class MyProcessTest {
    private client: ZBClient; // Automatically injected
    private context: CamundaProcessTestContext; // Automatically injected

    @Test
    async shouldCompleteProcess() {
    // given
    const processInstance = await this.client.createProcessInstance({
    bpmnProcessId: 'my-process',
    variables: { input: 'test' }
    });

    // when
    // ... test logic

    // then
    await CamundaAssert.assertThat(processInstance)
    .isCompleted()
    .hasCompletedElements('task1', 'task2');
    }
    }