Giter Site home page Giter Site logo

If test contains await, then [AllureStep] failed with System.ArgumentNullException : Value cannot be null. (Parameter 'key') about allure-nunit HOT 7 CLOSED

unickq avatar unickq commented on May 30, 2024
If test contains await, then [AllureStep] failed with System.ArgumentNullException : Value cannot be null. (Parameter 'key')

from allure-nunit.

Comments (7)

unickq avatar unickq commented on May 30, 2024 2

I reproduced this issue, debugged through allure.commons.
But can't answer why with await new step we create can't find its parent.
image

from allure-nunit.

ProAntix avatar ProAntix commented on May 30, 2024

I have this issue too. Very perplexing.

from allure-nunit.

unickq avatar unickq commented on May 30, 2024

@ProAntix @redfirefox
Created issue allure-framework/allure-csharp#106 in base repo

from allure-nunit.

unickq avatar unickq commented on May 30, 2024

Another example - #41 (comment) by @bloodgang94

[AllureNUnit]
    public class AllureAsyncTest
    {
        [Test]
        public async Task Test()
        {
            var testUser = await GenerateAsync();
            AllureLifecycle.Instance.WrapInStep(() =>
            {
                Assert.AreEqual(testUser, "a");
            });
        }

        public static async Task<string> GenerateAsync()
        {
            return await Task.Run(() => Generate());
        }

        public static string Generate()
        {
            Thread.Sleep(1000);
            return "AAA";
        }
    }

System.ArgumentNullException : Value cannot be null. (Parameter 'key')
   at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNullException()
   at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValue(TKey key, TValue& value)
   at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)

from allure-nunit.

NaZaRKIN123 avatar NaZaRKIN123 commented on May 30, 2024

Any updates here?

from allure-nunit.

EvgenyMarchuk avatar EvgenyMarchuk commented on May 30, 2024

The same issue and critical for me! Pls, solve the problem! Thanks

from allure-nunit.

unickq avatar unickq commented on May 30, 2024

please follow https://github.com/allure-framework/allure-csharp/tree/main/Allure.NUnit
since all the code there - should be much easier to fix

from allure-nunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.