allure-framework / allure-java

Allure integrations for Java test frameworks
Apache License 2.0
357 stars 226 forks source link

Fixed test-results missing in case of test parallel execution [allure-scalatest] (fixes #945) #946

Closed dm-test closed 1 year ago

dm-test commented 1 year ago

fixes #945

Context

When you run tests in parallel with scalatest, you can miss some allure-results files. It caused by different from java frameworks (testng, junit) test threads behaviours in scalatest. Allure-scalatest knows about this point, but it was a bug in stopTest behaviour: this method worked as in java-style and tried to get UUID of test case from internal allure thread holder class. In multithreading launches in scalatest threads sometimes have changed and we can't find UUID by thread in allure internal threadlocal storage. So in such cases we can't write a test result to file.

Checklist

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

baev commented 1 year ago

@dm-test thanks!