Comments (5)
I found this in the Nunit Console Log:
System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List
1.System.Collections.IList.get_Item(Int32 index)
at NUnit.Allure.Core.AllureNUnitHelper.<>c__DisplayClass21_2.b__2(TestResult x)
at Allure.Commons.AllureLifecycle.UpdateTestCase(String uuid, Action1 update) at Allure.Commons.AllureLifecycle.UpdateTestCase(Action
1 update)
at NUnit.Allure.Core.AllureNUnitHelper.UpdateTestDataFromAttributes()
at NUnit.Allure.Core.AllureNUnitHelper.StopTestCase()
at NUnit.Allure.Core.AllureNUnitHelper.StopAll(Boolean isWrapedIntoStep)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.Execute(TestExecutionContext context) in C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Commands\BeforeAndAfterTestCommand.cs:line 73
at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork() in C:\src\nunit\nunit\src\NUnitFramework\framework\Internal\Execution\SimpleWorkItem.cs:line 59`
from allure-nunit.
Hi,
I’m sorry to hear that - the entire approach of allure getation changed a little bit 😕
Wrapper for Action methods should work everywhere between setup and teardown.
Can you please share an example of code or what/where exactly you are trying to create step
from allure-nunit.
We have a custom method in charge of starting the allureStep and stop it. The code is the following:
public string StartStep(string name)
{
var x = TestContext.CurrentContext.Result;
string uuid = Guid.NewGuid().ToString();
StepResult step = new StepResult()
{
name = name,
stage = Stage.finished,
status = Status.passed
};
AllureLifecycle.Instance.StartStep(uuid, step);
return uuid;
}
Then we call a custom method called StopStep() with the uuid of the step we started previously:
public void StopStep(string uuid)
{
AllureLifecycle.Instance.StopStep(uuid);
}
This was working just fine until the new version. The instance of the AllureLifecycle is throwing exceptions everywhere. We remove the custom methods and try the example you have in the project with the AllureNUnitHelper.WrapInStep() method.
The thing is when the test finishes in the Nunit console, it's throwing an exception.
I really need to fix this, otherwise i can't update to new version and stick in the previous one :(
from allure-nunit.
I see the code how you start and stop steps, but I don’t know where you call it. I mean I don’t understand where you use steps - before/after/in test.
@facusantillo can you provide more details? AllureNUnitHelper.WrapInStep does exactly the same your methods do. Are you trying to execute steps after Allure testcase stopped?
from allure-nunit.
@facusantillo , any updates?
from allure-nunit.
Related Issues (20)
- Attribute AllureDisplayIgnored doesn't work with ignoring testcases HOT 6
- Is it possible to add the method's parameters to report with the help of AllureStep? HOT 7
- Test name is created as a step and steps inside the tests are substeps HOT 5
- How to add a screenshot to each test step HOT 5
- If test contains await, then [AllureStep] failed with System.ArgumentNullException : Value cannot be null. (Parameter 'key') HOT 7
- Add support to Include test class name in the report HOT 1
- MaxLimit attribute doesn't logged in allure HOT 4
- "System.MissingMethodException" error appears after update NUnit from 3.13.0 to 3.13.1 version HOT 2
- Changing the version of an assembly reference is not allowed during debugging HOT 3
- Value cannot be null. (Parameter 'key') async Task HOT 1
- Could not install package 'NUnit.Allure 1.0.14' HOT 3
- Cannot find "AllureNUnit" attribute after update of from
- Cannot find "AllureNUnit" attribute after update of "NUnite.Allure" nuget package from 1.0.14 to 1.2.0 HOT 4
- NullReferenceException in AllureStepAspect.WrapStep when some of the arguments are null HOT 3
- Get test result id HOT 1
- How to enable adding Screen Diff HOT 7
- AspectInjector.targets error in Rider HOT 5
- Steps do not show in Setup HOT 1
- Edit and continue does not work due to usage of AspectInjector 2.6 HOT 2
- Archive repo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allure-nunit.