-
Notifications
You must be signed in to change notification settings - Fork 217
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悶: Before Suite and AfterSuite steps not appearing in allure report anymore after version 2.21 #953
Comments
To workaround a bug you can downgrade this dep:
It also makes sense to move this issue to the main project |
|
Due to performance issues, we dropped support for recursive containers in Allure Report (it was never supported in Allure TestOps). We must use separate containers for each test fixture to fix the issue. |
dear @baev any update on this one , or any missing data from my side , i'm still using version 2.21 as a workaround and i'm not able to generate single file because of this , your support is highly appreciated |
Here is a workaround: by using custom listener create links between suite and test classes:
import io.qameta.allure.Allure;
import java.util.Objects;
import org.testng.ITestListener;
import org.testng.ITestResult;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
@Listeners(SampleTest.AllureTestNGListener.class)
public class SampleTest {
@AfterSuite
public void after() {
Allure.step("after step");
}
@Test
public void test() {
Allure.step("test step");
}
public static class AllureTestNGListener implements ITestListener {
@Override
public void onTestStart(final ITestResult testResult) {
Allure.getLifecycle().getCurrentTestCase()
.ifPresent(testId -> {
var suite = testResult.getTestContext().getSuite();
var suiteId = Objects.toString(suite.getAttribute("ALLURE_UUID"));
Allure.getLifecycle().updateTestContainer(suiteId, container -> container.getChildren().add(testId));
});
}
}
} |
What happened?
after suite method not shown in allure report since version 2.22
for example below code
latest version
version 2.21
What Allure Integration are you using?
allure-testng
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
The text was updated successfully, but these errors were encountered: