Can NUnit stand up to TestNG

11,552

I usually use Moq mocking library to set up my fixtures when writing NUnit tests.

Share:
11,552
Tarun
Author by

Tarun

I work in various fields of software testing https://www.seleniumtests.com

Updated on June 26, 2022

Comments

  • Tarun
    Tarun almost 2 years

    Possible Duplicate:
    Selenium, Nunit Best Practices?

    I have been working on Selenium using TestNG which has given me lots of flexibility, especially with test dependency. While working on UI based integration test it becomes indispensable to have test dependency. For example I have 5 steps registration process and each step is individual method having inter dependency. i.e. -

    ......step3Method DependsOn step2Method DependsOn step1Method

    Not only this I can also define which class is to be executed before any other class. For example Registration class is to be executed first followed by ManageProfile class.

    These fixtures are very easy to achieve with TestNG, but TestNG can only be used with java. While working on Selenium test with C# I came across NUnit. But I suppose these fixtures are not possible with NUnit and I also understand that NUnit is unit testing framework and not for integration testing. But then is my selection of Nunit wrong or I am just not aware of how these features could be leveraged in NUnit.

  • Tarun
    Tarun about 13 years
    I am not sure if mocking is going to help with this. Problem being, I need to navigate from page to page and it is neither possible nor right for mocking for testing. I need to simulate it as a normal user would do, step by step > Continue with more steps depending on the out come of previous step. Does Moq provide such features? n.b. I have not worked with mocks and wonder how it fits world of Selenium Integration testing.
  • Rian Schmits
    Rian Schmits about 13 years
    Maybe this is what you're looking for: nunit.org/index.php?p=suite&r=2.5.10