citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
445 stars 135 forks source link

Citrus Cucumber Spring uses the same TestContext for all tests #1115

Closed christophd closed 5 months ago

christophd commented 5 months ago

Citrus Version 4.1.1

Expected behavior Do not use the same TestContext for all Cucumber feature scenarios but create a fresh context for each scenario.

Actual behavior The Cucumber Spring object factory provided by Citrus uses a singleton TestContext for all scenarios executed. This leads to unexpected behavior as scenarios influence each other when sharing the same context (e.g. when reporting exceptions to the context)