allure-framework/allure-java

๐Ÿž: No execution info when running tests via JUnit5 Launcher API

wazzeps opened this issue ยท 3 comments

What happened?

When running tests via the Launcher API

LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder.request()
    .selectors(selector)
    .build();

Launcher launcher = LauncherFactory.create();

launcher.execute(request);

execution info is empty:

image

Attachments are not cloned into the results folder and Allure-results files contain only basic information
{"uuid":"2d1e446a-f232-47f6-a4af-5a3785e5d7d9","name":"Some test","children":["49bb1c84-dfeb-4b54-942b-9502455e899e"],"befores":[],"afters":[],"start":1701260685892,"stop":1701260697663}

AspectJ configuration follows the documentation .

What Allure Integration are you using?

allure-junit5

What version of Allure Integration you are using?

2.24.0

What version of Allure Report you are using?

2.24.0

Code of Conduct

  • I agree to follow this project's Code of Conduct

Thanks for the quick answer, @baev.

After setting autodetection extension to true

final LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder.request()
        .configurationParameter("junit.jupiter.extensions.autodetection.enabled", "true")

I can see fixtures and stacktraces in the report.

But steps and attachments declared through annotations are not generated.
The report includes only those for which the runtime API is used.

Any ideas on this?

steps and attachments declared through annotations

@Step and @Attachment annotations rely on AspectJ. Make sure you have aspect weaver specified for the java process that runs the launcher.