Nunit.core and Nunit.util missing from v3 - nunit

I have started upgrading to Nunit V3.2 however i cannot find nunit.core or nunit.util.
Just what is the upgrade path for these dlls from Nunit 2.6.2

The nunit.core and nunit.util assemblies are not part of NUnit 3. NUnit 3 is an entirely new implementation of NUnit and while it closely matches NUnit V2 in it's Attributes and Assertions, it has a different internal design.
If you are a normal user, then you should not be using those two assemblies anyway. They are internal to NUnit V2. Your upgrade path is to convert your tests to V3, fixing any of the breaking changes noted in the docs. The "Upgrading" page at https://github.com/nunit/docs/wiki/Upgrading gives a pretty good indication of the steps to follow.
If you are not a normal user - for example if you have your own runner that makes use of pieces of NUnit - you will have to ask a more specific question.

Related

How to fix "Either assembly contains no tests or proper test driver has not been found."

I am getting error as mentioned Either assembly contains no tests or proper test driver has not been found.
When i enter "nunit3-console.exe project.dll".
I tried few solutions but it doesn't help me.
Assumming you have not found a new bug in the NUnit engine, then one of the two things in the message is probably true...
You are running an assembly that has no tests
You are running an assembly with tests for which there is no driver installed, IOW tests that the engine does not know how to run.
These two things are combined in one message because it's really all one thing to the engine, which is basically telling you "I can't find anything that looks like a test to me."
Most likely, you do not have any NUnit3 tests, because knowledge of those is built into the engine itself. So, I would guess you are either running NUnit V2 tests or tests from some foreign framework, like xunit or microsoft test.
For more of an answer, please tell us what kind of tests you are running. What testing framework (and version) do your tests reference? If you are running NUnit V2 tests, do you have the V2 Framework Driver extension installed?
So... maybe there is a bug in the NUnit engine.
I had this exact same error message on my build server. At the same time the tests were running fine in Visual Studio (2015 with Resharper).
This happened when I started converting existing xunit to nunit tests in an assembly. As soon as I removed the last xunit test, the error went away.
Try to comment out everything except NUnit tests to see if this fixes the problem for you.

is NUnit 3.5.0 compatible with teamcity

So my nunit 2.6 tests run in team city, the results appear in a 'tests' tab. I just select the built in nunit build step, type the name of the file with the tests in "Runs Tests from:" and the name of the category(s) in "NUnit categories include:"
However, If I upgrade my tests and select NUnit3 from the "NUnit runner" drop down things start to go wrong.
After much googling and mucking round for command lines and console runners I can't get this working with the full 'results in a tab' level of compatibility.
There is a lot of advice out there on how to make this work, but the best articles are at least a year old and I'm not at all clear that they apply to 3.5.0
Has anyone got this fully working or is it no longer supported? Can you explain how you managed it?
NUnit 3.5.0 does work with TeamCity, but it requires that you use the NUnit TeamCity Event Listener Extension. You can install it along with the NUnit Console Runner package or use the NUnit Console Runner with Extensions which includes the TeamCity extension along with other commonly used NUnit extensions.
Once you have the extension, TeamCity should automatically add the --teamcity command line option to the nunit3-console.exe.
Check here more information on the various NUnit Runner NuGet packages and what is included in each.
You add these packages to one of your test projects. That will cause them to be installed in the package directory of your solution root. From there, the built in NUnit 3 step will work, just update the executable location to point to 3.5.0. See the Getting Started With NUnit and TeamCity document. I would use the Case 4, NUnit Build Step.
If you only want to test certain categories, you will need to add your --where clause as an additional command line parameter.

Does the XML Report Processing work for NUnit3?

I'm currently moving one of our projects to DNX (.NET Core now) and I was forced to update to nunit3. Because of other considerations, we run compile the test project as a console app with its own entry point, basically self-hosting the NUnit runner.
I now need to report the results to TeamCity via the XML Reporter, which doesn't seem to parse Nunit3 TestResults.xml files.
Any advice on how to work around this?
The NUnit 3 console has the option to produce results formatted in the NUnit 2 style.
Use the option:
--result=[filename];format=nunit2
Docs: https://github.com/nunit/nunit/wiki/Console-Command-Line
To add to the answer above:
NUnitLite inherits the --result CLI parameter which seems to do the trick.
Another option, which I went for in the end is using the --teamcity CLI parameter:
dotnetbuild --project:<path to project directory> -- --teamcity
which will integrate with TC's service messages. This will also do real-time updates.

Nunit does not recognize Concordion.NUnit addin

Steps taken:
I downloaded and install NUnit.
I downloaded Concordion.NET.
I downloaded the Concordion.NET kickstarter (zip)
I verified that the specification (HelloWorld.html) is marked as an embedded resource.
I verified that the RequiredAddin("ConcordionNUnitAddin") assembly attribute was specified.
I built the solution
I copied the Concordion.NUnit.dll into the addin directory of my NUnit installation (C:\Program Files (x86)\NUnit 2.6.4\bin\addins).
I loaded the kickstarter solution in NUnit GUI runner.
Issue:
NUnit does not recognize the Spec project containing the specifications, i.e. the Spec assembly is marked as non-runnable. (It runs the actual (NUnit) unit tests fine.)
My expectation is that NUnit will recognize the Kickstart.Spec project and that when I run the tests, the results of those test will be indicated in the passed/failed information. Currently, as the project is not recognized, only the success of the NUnit unit test (ShouldGreet) is present.
Are my expectations incorrect, or is there some additional set-up step I missed necessary to get the process running?
You need to use NUnit 2.6.3 for the current release of Concordion.NET.
Unfortunatelly, NUnit addins are version dependent (http://nunit.org/index.php?p=extensionTips&r=2.6.4). This is also stated in the documentation of NUnit: "Most of the add-in samples provided with NUnit are currently version dependent."
NUnit 2.6.4 was released on December 16th, 2014. Future releases of Concordion.NET will support this version as well.
Thank you for providing your feedback - the documentation of Concordion.NET needs to be updated as well to include the information which version of NUnit is supported.
Additionally, you could use the NuGet package of Concordion.NET (https://www.nuget.org/packages/Concordion.NET/) for your Visual Studio projects, which would ensure that you use always the right references of NUnit in your projects.

Multiple NUnit test assemblies, each requiring different config. How can I get NUnit to run them all at once?

I have 13 separate but related architecture assemblies, and 13 separate NUnit test assemblies, each one containing all the test fixtures for its matching architecture assembly. I am using NUnit 2.5.2 (latest version currently).
I can run each test assembly separately in the NUnit GUI and all the tests pass. However, when I come to combine them into a single NUnit project file, NUnit insists on applying a single config file to the whole test run. This won't work because each test assembly requires different config. I can't merge them into one "uber-config" file because some of the sections are mutually exclusive. I have tried running each assembly in the project in separate AppDomains, and also separate processes, but in both cases it fails to use the DLL-specific config file, so all the tests crash and burn.
I have done a Google search but so far I have not found any indication that NUnit supports this scenario. Am I right, or have I missed something?
I have tried my hardest to re-architecture the tests so that they could share the same config file, but I've had to admit defeat on that front.
NUnit 2.5 has as setting where you can enable each assembly to run in a separate AppDomain. By doing this, NUnit will load the config for the assembly and not the one for the .nunit project.
For more info, see here:
http://nunit.org/index.php?p=settingsDialog&r=2.5
In the past I've done this with a batch file running each assembly through the nunit console independently. At one point I had something that merged the xml output together. It might be in the CruiseControl.Net code.
I haven't worked on the NUnit project for a while. I only have the older code in my head. But the issue is that you get one config per AppDomain and NUnit loads all the test assemblies into one AppDomain.
You might want to try alternate runners such as Resharper or TestDriven.net