Page 1 of 1

Code coverage and debugging support for NUnit C# code

Posted: Tue Feb 06, 2018 11:37 am
by hellboy81
I try to write unit tests for my own test framework in Ranorex Studio (RS).

As I mentioned Unit testing addin is in RS is disabled by developer (Ranorex)

The solution to run NUnit Tests works for me also with standard delivered NuGet Version:

Code: Select all

Install-Package NUnit.Runners -Version 2.6.4 # The only NuGet Package you need .
My unit tests (for own framework) can be recognized and executed by standard NUnit GUI Runner (nunit-x86.exe):

Is there possible to collect and to show code coverage info (may be also in Ranorex Studio using CodeCoverage Addin)?

Re: Code coverage and debugging support for NUnit C# code

Posted: Tue Apr 10, 2018 9:17 am
by hellboy81
If I try to debug NUnit test using Ranorex Studio I got

Code: Select all

Can not start process. The directory name is invalid. (Exception from HRESULT: 0x8007010B)
Trying to run tests without debugging and code coverage. Got:
Unable to run unit tests. The file '{0}' cannot be found.
from SharpDevelop

At the moment unit tests can be executed only from NUnit GUI Test Runner manually as standalone app.

As I mentioned it is not possible to override this property to allow to use NUnit Test runner installed to another directory. Can this issue be fixed by Ranorex Studio Developers?


See also Unit test for NUnitConsoleApplication

Re: Code coverage and debugging support for NUnit C# code

Posted: Mon Apr 16, 2018 4:30 am
by Vega
I think the below link will be helpful for your first post if you have not yet seen it:

http://community.sharpdevelop.net/blogs ... Cover.aspx

For your second post I'm afraid I'm not 100% clear on what you are having trouble with. Would it be possible to upload a small sample solution? If this is functionality that you believe Ranorex is missing, it may be worthwhile to submit a user voice post. I did not see any existing User Voice posts related to your question:

https://uservoice.ranorex.com/forums/15 ... ve-ranorex

Re: Code coverage and debugging support for NUnit C# code

Posted: Fri Dec 22, 2023 5:09 pm
by Marie143
Thanks for the info, just randomly checking past topic that I could use in the fiture. click here http://concretedrivewaypittsburgh.com/