-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronous step
or logStep
methods
#1201
Comments
We'll be unable to provide the sync versions of Allure API due to limitations in some testing frameworks. The new API is framework-agnostic (it can be used the same way in different frameworks). This allows us to provide integrations with additional testing tools (e.g., Axios to automatically request/response logging or Chai for automatic asserts logging). Underneath, the new Allure API relies on the Since some of the message hubs (e.g., in CucumberJS or Playwright) are async, we will not be able to ensure the proper delivery of test events when using synchronous runtime API calls (sync We don't like the idea of some parts of the API being unsupported by some frameworks, so we decided not to implement Allure Runtime API's sync versions. However, in your case, since you're implementing a new integration with your custom test framework (I assume), you can implement the |
@baev thankyou for your replay. What I'm trying to add automatic logging of assertions in the chai framework. And I just can't do it correctly because of the asynchronicity. Judging by your message, there is already implemented support for allures in the chai and axios frameworks, where can I read about it? |
@egorvas, it's only planned; there is no ETA yet. |
Hi guys. If I am not mistaken, in the current implementation of allure-js, it's not possible to create a step from a sync context as I was able to before with the startStep/endStep functions, is it?
Is your feature request related to a problem? Please describe.
I'm integrating Allure reporting into my testing framework, and I need to create Allure steps synchronously without using
await
. Currently, when I callallure.step
orallure.logStep
synchronously, the steps do not display correctly in the Allure report.From what I understand, it's currently not possible to invoke
step
orlogStep
synchronously, as they are designed to be asynchronous and requireawait
. This limitation poses a challenge when working with synchronous code, particularly with assertion libraries like Chai'sassert
, which operates synchronously.Describe the solution you'd like
I would like to have the ability to create Allure steps synchronously, without the need to use
await
. Specifically, having a synchronous version oflogStep
would be highly beneficial. This would allow seamless integration of Allure steps within synchronous code blocks and assertion libraries, without requiring the entire codebase to be refactored to support asynchronous operations.I am looking for something like this:
The text was updated successfully, but these errors were encountered: