300+ TOP NUNIT Interview Questions and Answers

NUnit Interview Questions for freshers experienced :-

1. What Is NUnit ? 

NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 2.2, is the fourth major release of this xUnit based unit testing tool for Microsoft .NET. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection related capabilities. NUnit brings xUnit to all .NET languages.

2. What is the Advantages of NUnit ?

  1. NUnit is an automated unit-testing framework for all .Net languages.
  2. Initially ported from JUnit, which is a unit testing framework for Java applications.
  3. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features.
  4. NUnit brings xUnit to all test are written in .NET supported language e.g. C#, VC, VB.NET, J# etc.
  5. NUnit is an open source free to use with your .NET projects.
  6. NUnit provides a class library which includes some classes, features and methods to help you write test scripts.
  7. NUnit provides user interface application to execute the test scripts and displays result
  8. NUnit does not create any test scripts by itself. We have to write test scripts and use NUnit tools and classes to make the unit testing easier and display the result as a success or failure.
NUNIT Interview Questions
NUNIT Interview Questions

3. What is the Features of NUnit ?

  1. Assertions
  2. Attributes

(1) Assertions :-

Assertions are central to unit testing in any of the xUnit frameworks, and NUnit is no exception. NUnit provides a rich set of assertions as static methods of the Assert class.
The most commonly used assertions.

  • Equality Asserts
  • Identity Asserts
  • Comparison Asserts
  • Type Asserts
  • Condition tests
  • Utility methods
  • StringAssert
  • CollectionAssert
  • FileAssert
  • Equal Constraint (Available NUnit 2.4)
  • Same As Constraint (Available NUnit 2.4)
  • Condition Constraints (Available NUnit 2.4)
  • Comparison Constraints (Available NUnit 2.4)
  • Type Constraints (Available NUnit 2.4)
  • String Constraints (Available NUnit 2.4)
  • Collection Constraints (Available NUnit 2.4)
  • Compound Constraints (Available NUnit 2.4)
  • Custom Constraints (Available NUnit 2.4)

(2) Attributes :-

  • Category
  • Description
  • ExpectedException
  • Explicit
  • Ignore
  • Platform
  • Property
  • SetUp
  • SetUpFixture
  • Suite
  • TearDown
  • Test
  • TestFixture
  • TestFixtureSetUp
  • TestFixtureTearDown

NUnit Questions and Answers Pdf Download

Leave a Reply

Your email address will not be published. Required fields are marked *