-
Notifications
You must be signed in to change notification settings - Fork 65
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
Using Step inside [OneTimeSetUp] fails with Value cannot be null
#286
Comments
Hello there, @Lewka ! |
@neparij thanks for the reply. Yeah, I've got that (and I described it in |
Throwing exception is not available due to same reasons. |
@neparij I'm facing the same issue with XUnit. In XUnit we use constructors for one time setup. In my scenario, I am not able to use Steps inside the constructor. Version: 2.9.2-preview.1. (With the latest release (2.1.3) it is working fine ) Any suggestions? |
@tkeerthivel hi! |
@neparij |
Hi, everyone! Please, note, that currently it's mandatory to apply [TestFixture]
[AllureNUnit]
class MyTestClass
{
[OneTimeSetUp]
[AllureBefore]
public void OneTimeSetUp()
{
this.MyStep();
}
[OneTimeTearDown]
[AllureAfter]
public void OneTimeTearDown()
{
this.MyStep();
}
[AllureStep("MyStep")]
public void MyStep() {}
[Test]
public void MyTest() {}
} If the bug still exists, please, let me know here. |
Hello @delatrie, is it expected that allure-results files are not generated (only empty folder) if OneTimeSetUp marked with AllureBefore in case of failure in this method? When OneTimeSetUo method passes steps from OneTimeSetUp are in Set Up section of report but if it fails report files are not generated at all |
Hi, @DenisKorbovskyTds PS: it's better to ask questions like that in discussions. You will receive an answer quicker that way. |
Hello there, I've been playing with new versions (not released ones) and
I've faced an issue, when I'm trying to use
AllureStep
inside aOneTimeSetUp
method, it fails with following error:I'm submitting a ...
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
I can use Step inside OneTimeSetUp
Please tell us about your environment:
Other info
Looks like the problem in
AllureNUnitAttribute
class, theBeforeTest
method is called only afterOneTimeSetUp
, so Allure thinks there is no tests started yet when we call a method withStep
attribute insideOneTimeSetUp
method, that's why it fails.The text was updated successfully, but these errors were encountered: