Code Monkey home page Code Monkey logo

Comments (5)

ricardofslp avatar ricardofslp commented on July 18, 2024

Hi @bokece,

Could you please share how you normally run the tool?

from dotnet-test-rerun.

bokece avatar bokece commented on July 18, 2024

Hello @ricardofslp and thank you for your prompt response.

Command: test-rerun $pwd\bin\Debug\net7.0\TempXunitTest.dll --rerunMaxAttempts 2

Only test class:

public class UnitTest1
{
    [Fact]
    public void Test1()
    {
        var result = RandomBoolProbability(100);

        Assert.True(result);
    }
    
    [Theory]
    [InlineData(1, 2, 3)]
    [InlineData(-4, -6, -10)]
    [InlineData(-2, 2, 0)]
    [InlineData(int.MinValue, -1, int.MaxValue)]
    public void Test2(int value1, int value2, int expected)
    {
        Console.WriteLine("Test: " +  value1);
        
        var _ = value1 + value2;
        var __ = expected;
        
        var result = RandomBoolProbability(100);

        Assert.True(result);
    }
    
    [Theory, MemberData(nameof(TestData)) ]
    public void Test3(TestDataNonSerialized td)
    {
        var result = RandomBoolProbability(70);

        Assert.True(result);
    }
}

Actual behaviour:
When a test case of a theory (e.g. Test2, Test3) fails
Then all theory's test cases are executed again on the second iteration

Expected behaviour:
When a test case of a theory (e.g. Test2, Test3) fails
Then only the failed test case is executed again on the second iteration

from dotnet-test-rerun.

ricardofslp avatar ricardofslp commented on July 18, 2024

Hi @bokece,

Could you please test with this version: https://www.nuget.org/packages/dotnet-test-rerun/1.9.0-alpha.1 to see if it solves the issue you were facing ?

Thanks.

from dotnet-test-rerun.

ricardofslp avatar ricardofslp commented on July 18, 2024

Hi @bokece ,

Did it work?

from dotnet-test-rerun.

ricardofslp avatar ricardofslp commented on July 18, 2024

Officially solved in version: https://www.nuget.org/packages/dotnet-test-rerun/1.9.0

from dotnet-test-rerun.

Related Issues (18)

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.