最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Execute method annotated with @Step outside the Allure test context in Java - Stack Overflow

programmeradmin0浏览0评论

I'm wondering if it is possible to execute an existing method annotated with @Step outside the Allure test context in Java.

The use case I have is that I want to execute some methods as part of @BeforeAll to set up some data as a Precondition because I do not want these steps to be in the Allure report. If I execute the method in @BeforeAll, I get: AllureLifecycle - Could not start step: no test case running.

I know that I can separate the logic in a different method called by the one annotated with @step and calling each when it's needed, but I'm just wondering if there is an easy way to solve this without rewriting a lot of step classes.

Thanks!

发布评论

评论列表(0)

  1. 暂无评论