0

We have been using Nunit Framework for our Test Automation Project.

Programming Language : C# Automation IDE : Visual Studio, Selenium Libraries

Currently we are running all tests in a single namespace and class file.

We have got a requirement to divide the test cases as below

  1. Implement Test Suite concept like Smoke Suite, Regression Suite
  2. Divide the test cases into functionality wise and keep in Regression suite.

For example : Smoke Suite : All general test cases

          Regression Suite should contain Functionality1, Funtionality2,...Functionality n test cases, like we see in HP ALM or Microsoft Test Manager.

like under regression suite ..login test cases, book ticket test cases, Cancellation ticket test cases...

Could you please have a look once and let me know the attributes, way of implementation ideas in Nunit Framework.

Regards, Khaja Shaik

1 Answers1

1

Very general question, so a very general answer. :-)

There are a number of approaches. I will list three...

  1. Divide your tests into separate assemblies. Run each assembly separately when you need it... like SmokeTests.dll, RegressionSuite.dll. I prefer to use this method to divide unit tests from functional or integration tests. It's particularly useful if different people are responsible for each, like programmers for unit tests and testers for final functional tests.

  2. Use Categories to flag fixtures as belonging to each group, like [Category("SmokeTest")], etc. When you run the tests, you need to specify a filter to select the category or, if you don't, you'll run all of them. This has the advantage that the same fixture could be run in more than one category.

  3. Use namespaces to separate your tests, like namespace SmokeTests, etc. Personally, I don't like this because namespaces are more useful to divide tests needing common setup, etc so I prefer to reserve the namespace for dividing the tests according to the nature of what they are testing. However, I've seen some people do it this way.

Charlie
  • 12,928
  • 1
  • 27
  • 31