Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for NUnit 3.X #102

Merged
merged 2 commits into from
Apr 7, 2016
Merged

Support for NUnit 3.X #102

merged 2 commits into from
Apr 7, 2016

Conversation

bunnu
Copy link
Contributor

@bunnu bunnu commented Jan 18, 2016

This adds support for NUnit 3.x. Tests are discovered by the existing opencover.ui-way.
The current release of NUnit 3.0.1 contains a bug affecting the assembly name in the output file.
There will be a bug fix in release 3.2. (nunit/nunit#1195). Until then the executed tests will not show up as executed in the opencover.ui test explorer. Nevertheless the coverage is displayed.

@bunnu bunnu mentioned this pull request Jan 18, 2016
@pver
Copy link
Contributor

pver commented Feb 6, 2016

This looks good, thanks! I'll do some tests with it the coming days

@glen-nicol
Copy link

This works for me for the most part. However, frequently I will run all my tests and get coverage but then I won't be able to run them again until I restart Visual Studio. The Cover with OpenCover right click option is disabled. I get the coverage results and coverage is displayed but I cannot run it again. Once I was able to kill OpenCover and Nunit processes that were left over to get the right click option to come back and run again but most times those processes don't show up in Task manager to kill and I have to restart Visual Studio.

This may not even be related to Nunit support but since bunnu's fork is the only branch I can use to run my Nunit 3 tests with this extension I figured this was a good a place as any to bring the problem up.

@nzain
Copy link

nzain commented Mar 6, 2016

This works for NUnit 3.2. Original plugin failed because the nunit-console arguments were invalid.

@linquize
Copy link

This PR 👍
Yes, NUnit 3.2 works with this PR.

@pver
Copy link
Contributor

pver commented Mar 30, 2016

It looks good, the only thing I'm thinking about is: how can we make sure the user uses the correct NUnit version or point out that the wrong version is configured.

The same version should be used as the one used in the test projects. I don't think it will work if you use a test project with NUnit2 while you have NUnit3 configured, but we'll have to test the different combinations

@linquize
Copy link

nunit3-console.exe can run both nunit2 and nunit3 tests. I have tested.

@pver
Copy link
Contributor

pver commented Mar 31, 2016

That sounds good! Did all tests (both nunit2 and nunit3) get discovered? Because the OpenCover.UI test discoverer checks the attributes of the test classes and methods and compares them to the attributes provided by nunit2. That's why I thought it might fail combining nunit2 and nunit3. But if that's not a problem, we can pull this in as is

@linquize
Copy link

Both NUnit2 and NUnit3 use TestFixtureAttribute for classes and TestAttribute for methods.
In a single project, it can have either nunit2 or nunit3.
However, a solution can have a project with nunit2 and another project with nunit3. I have tested such solution, this works!

@linquize
Copy link

linquize commented Apr 6, 2016

Ping!

@csteaderman
Copy link

I am a bit confused about some of the comments indicating that the latest version of OpenCover.UI works with NUnit3. I was having problems getting results and when I looked at the console output of the command line I noticed that it included /runlist, /nologo, and /noshadow parameters for NUnit yet these parameters are not valid for NUnit3. I downloaded the OpenCover.UI source and I see that the SetOpenCoverCommandlineArguments() function includes the invalid parameters. Is there a configuration option that I missed in order to get OpenCover.UI to generate a proper NUnit3 argument list?

@csteaderman
Copy link

Sorry! I see now that this is not a released thread discussion. I need to include the changed sources and build my own OpenCover.UI?

@linquize
Copy link

linquize commented Apr 7, 2016

@csteaderman This is a pending pull request. You need to clone https://github.com/bunnu/OpenCover.UI and compile yourself.

@pver pver merged commit b84fcab into OpenCoverUI:master Apr 7, 2016
@pver pver added the NUnit label Apr 7, 2016
@pver pver added this to the Release 0.8.x milestone Apr 7, 2016
@pver
Copy link
Contributor

pver commented Apr 7, 2016

Thanks @bunnu !

@linquize
Copy link

linquize commented May 4, 2016

When to release next version?

@Eregrith
Copy link

Yes please, next version with this would be really nice to have :(

@M22an
Copy link

M22an commented Jul 18, 2016

Eagerly waiting for this to be released. Do we have a tentative date ?

@linquize
Copy link

Looking forward to the release

@anupam-k-g
Copy link

when will this be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants