We are using C# Selenium and NUnit framework for our test automation. Sometimes some test cases will fail in dev environment during execution due environmental issues. I was trying to re-run the failed ones, by using Retry attribute. But it didn't work ( I have kept assertion failures as well)
Could you please have a look and let us know.
Thanks, Khaja Shaik.
TestFixture]
public class UITests : BaseClassProtractor
{
[SetUp]
public void Setup()
{
//**Call chrome driver and open app url set up**//
}
[Test]
[Retry(1)]
public TestMethod1()
{
//** Write test Steps
}
[TearDown]
public void TearDown()
{
Drivers.TryRemove(TestContext.CurrentContext.Test.FullName, out var localDriver);
localDriver?.Quit();
}
}
TestFixture]
public class UITests : BaseClassProtractor
{
[SetUp]
public void Setup()
{
//**Call chrome driver and open app url set up**//
}
[Test]
[Retry(1)]
public TestMethod1()
{
//** Write test Steps
}
[TearDown]
public void TearDown()
{
Drivers.TryRemove(TestContext.CurrentContext.Test.FullName, out var localDriver);
localDriver?.Quit();
}
}
--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/CAHOuc7MFwxm8-txv14NrZdNVcuRmjQH28gmAFrA6x%2Bey6n7_xw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/CALg0G%2BtrvuroOvX6eVkRpvKY-xjoTGTKPD15CDSBto2Mb5TY1Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/CAHOuc7NFEZ82RZNz9dr9TRgfMwuCM-qGG7qU9e5L_0jGe3Rf6A%40mail.gmail.com.
Hi Oskar,Thank you so much for the support.I have kept a assertion fail condition as well, so again test case is not getting re triggered.
Could you please let me know your available time, will schedule a meeting as well.
To view this discussion on the web visit https://groups.google.com/d/msgid/nunit-discuss/CALg0G%2Bv7YrT_NZ%3Din9kN9HpWBfarc8pCgctggOk%3DKcYxSp4xJg%40mail.gmail.com.