Skip to content

Add option to dump container logs on failureΒ #189

@npepinpe

Description

@npepinpe

Is your feature request related to a problem? Please describe.

A common debugging task when a test fails is to check the container logs, especially when running cluster tests where it's not feasible to just use a debugger. This is tedious to do manually in every test, and should be easy to have a small extension which does just that.

Describe the solution you'd like

Add a flag on all ZeebeNodes, e.g. withPrintLogsOnFailure(boolean), and implement TestLifecycleAware. On failure, if true, then dump all the container logs before it is removed.

Describe alternatives you've considered

Each user manually implements this in their own project, or using AfterEach callback in every suite.

Additional context

See https://github.com/camunda-cloud/zeebe/blob/86f1c1cd447ed94a0c4c0b2907334bb4903ac40c/test-util/src/main/java/io/camunda/zeebe/test/util/testcontainers/ContainerLogsDumper.java

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

πŸ” In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions