Visual studio has a built-in unit test framework. I am wondering if I can use nunit instead?
Yes, TestDriven.Net, Nunit and Resharper provide integration with VS. More details in the two posts below (in response to the same question).
Unit test, NUnit or Visual studio?
and
Unit test, NUnit or Visual studio?
Using NUnit without extensions
This answer is long overdue, but I'm using NUnit in Visual Studio without any additional extensions (that are mainly also not free).
The whole idea is to configure your test project (a usual Class library project actually) so that when you hit F5 or Ctrl-F5 it automatically starts NUnit GUI and starts test execution.
The main benefit of this project configuration (all configuration steps are described with images) is that it's easy to also debug your tests if you need to when you have bugs in them.
Here's a free Visual Studio addin for NUnit: NUnitAddin
Related
In old times we used Nunit window test tool.
Right now I am facing some issue with Nunit test adapter & it's not displaying tests in Visual Studio. Unsupported test framework error in NUnit
Now I can find only NUnit Console and no window tool. Any tool available to open NUnit test project out of visual studio for execution & results?
I have installed Nunit 3.0.1 (latest available) on my machine.
There is a new GUI Runner currently under developement - version 0.1 is expected soon. This is the replacement for the GUI you're currently using.
The other option, as Johan said, is to use Visual Studio's built in Test Runner, and install the NUnit3 Test Adapter, either as a Nuget Package, or a Visual Studio Extension.
To run NUnit 3.0 tests in Visual Studio you need to use the NUnit3 Test Adapter.
https://github.com/nunit/nunit3-vs-adapter/wiki
I'm new on protractor and i got a few tests running (i did in Webstorm 30 day trial). But now i'm trying to do it in Eclipse to integrate with TFS or VS itself, so i can associate with our test cases. Does anyone know how to? Do i have to use an especific IDE or something like that?
In visual studio itself, you can write protractor tests (Protractor for .NET is built on top of Selenium WebDriver C# binding.) by installing protractor package and Nunit, then you can integrate with TFS if you want.
For more information, you can look into this link.
You have to use Eclipse Neon.
Probably yow will have to downgrade your protractor because it works only till 4.10(It doesn't work with latest version)
Is there a plugin or configuration option that will open a source file in Visual Studio when the relevant line is clicked in NUnit's GUI test runner? It displays it in NUnit, but that still leaves me searching for the file in Visual Studio to actually fix the error.
You can use http://nunit.org/index.php?p=vsTestAdapter&r=2.6.2
NUnit adapter for integrated test execution under Visual Studio 2012
(all updates),and Visual Studio 2013 (all updates). Compatible with
NUnit 2.0 through 2.6.3.
Download
Is it possible to run/debug multiple projects in visual studio (2010) just like you would do it
in eclipse.
There you can have as many mains running (talking about eclipse for java here) as possible and you could see the nicely.
Furthermore, why does Visual Studio lock all files, even the files independent from current running project?
What i would like to do is simple (seems impossible in visual studio): run a web applications and then debug a automated WatiN test that would do a specific operation on the app such that i can see step by step the automation tool in action, though developing/validating my test.
is this possible?
Yes you can run multiple projects in debug mode. Just right-click on project and the Debug->Start New Instance
A few test scenarios have been recorded using CodedUI test template for my web application in Visual Studio 2010 beta. These run from within the Visual Studio successfully without any issues. I was looking for instructions to create a deployment package.
Configure an environment with a "standalone" MSTest
A series of new test tools is being introduced with Visual Studio 2010. Team Agents provides a very small footprint and includes MSTest (it will be installed in a Visual Studio path).
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe
You can copy the contents of your test project(s) bin\ directory to the machine with Team Agents installed and execute MSTest against your test container.
mstest /testcontainer:x:\test-project\automated-tests.dll"
Coded UI tests use namespaces within libraries that are part of Visual Studio e.g. Microsoft.VisualStudio.TestTools.UITesting
This is unlike UI Automation which is part of the core .NET framework e.g.
System.Windows.Automation
Therefore as I understand it you cannot package Coded UI tests to run in an environment that does not have Visual Studio installed.