I am using nunit for unit testing while creating test case i need refer nunit dll in referrences. I am using NUnitASP 2.0, NUnit 3.13.3 . I am not able to find to get dll from both and dll not found in NUnit 3.13.3 . How can we get NUnit.Framework class.
Loading
Jay PankhaniyaPosted May 8, 2023, 1:41 PM
Hey, to use the
NUnit.Frameworknamespace in our NUnit tests, we need to add a reference to thenunit.framework.dllassembly in our project. Here's how to do it:First, make sure you have installed the NUnit Test Adapter extension in Visual Studio. This extension is required to discover and run NUnit tests in Visual Studio.
Next, right-click on the project in the Solution Explorer and select "Add" > "Reference".
In the "Reference Manager" dialog box, select the "Browse" tab.
Navigate to the folder where you have installed NUnit and select the
nunit.framework.dllassembly. This assembly is usually located in thebindirectory of the NUnit installation folder.Click "Add" to add the reference to your project.
Once you've added the reference, you should be able to use the
NUnit.Frameworknamespace in your tests.Note that you mentioned using both NUnitASP 2.0 and NUnit 3.13.3. If we're not specifically testing web applications, we should consider using the latest version of NUnit (currently 3.13.3) instead of NUnitASP. The latest version of NUnit includes support for testing web applications, so we should be able to achieve the same functionality as NUnitASP using NUnit 3.13.3.