Skip to content

Do not write empty *-container.json files #1483

Description

@IvanSmolin1

What problem should this solve?

allure-junit-platform writes a container for every test, class and parameterized template, even when it has no fixtures (empty befores and afters). On a large suite that is thousands of empty files per run, and Allure TestOps has to ingest every one of them. Allure TestOps support suggested fixing it in the adapter.

What would you like to happen?

Do not write containers without befores and afters, or add an option for that. Containers with fixtures stay as they are.

Alternatives considered

allurectl --exclude-files drops non-empty containers too. Deleting empty ones in a ContainerLifecycleListener works, but every file is still written first.

Additional context

Minimal example (allure-jupiter 3.0.1, JUnit 5): allure-empty-containers-example.zip

gradle test writes 5 results and 8 containers. Only the container of the test with @BeforeEach has a fixture; the other 7 are empty:

{"uuid":"...","children":["..."],"befores":[],"afters":[]}

Activity

  1. added a commit that references this issue on Nov 9, 2026
    773957b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions