I have provided sample code from this to implement the new Nunit attribute to retry the test on failure. I added this code as a class in my solution.
Then I call this new class along with the [Test] attribute:
[Test, RepeatOnFailureAttribute(2)]
But the test does not repeat on failure. I think I need to add this attribute to the Nunit attribute list. I see the sent attribute list in the nunit.framework XML file, here I added a new element:
.member. name="T:NUnit.Framework.RepeatOnFailureAttribute"
But I donβt understand how to add this new element to the XML file when we only have the nunit.framework.dll link assigned to my project.
Any help would be greatly appreciated here. Thanks in advance.
source share