reportportal / agent-net-nunit

Report Portal integration point with NUnit 3
Apache License 2.0
21 stars 10 forks source link

Problem with nunit-console runner #91

Open ochervenchuk opened 1 year ago

ochervenchuk commented 1 year ago

Hi, I'm trying to run tests using nunit-console. Using ReportPortal.Nunit 4.5, nunit-console 3.16.3, .Net 6. I also added the addins file to the nunit-console folder as described in the tutorial. Tests are run from the Visual Studio Test Explorer, and they are all logged into the Report Portal. But through nunit-console it gives an error all the time. _

System.Reflection.TargetInvocationException : ?. ----> System.TypeInitializationException : ? "ReportPortal.NUnitExtension.ReportPortalListener" ????? ??????????. ----> System.IO.FileNotFoundException : ?? ??????? ????????? ???? ??? ?????? "System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ???? ???? ?? ?? ????????????. ?? ??????? ????? ????????? ????. --TargetInvocationException System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) TypeInitializationException "ReportPortal.NUnitExtension.ReportPortalListener" ????? ??????????. ? ReportPortal.NUnitExtension.ReportPortalListener..ctor() FileNotFoundException ???? "System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" . ? ReportPortal.NUnitExtension.ReportPortalListener..cctor()

Could you help what could be wrong

nvborisenko commented 1 year ago

Right, hell of internal dependencies and frameworks.

It works with netcore version of nunit console runner: https://github.com/nunit/nunit-console/releases/tag/3.16.3 NUnit.ConsoleRunner.NetCore.3.16.3.nupkg

Then I executed:

dotnet nunit3-netcore-console.dll ..\test\bin\Debug\net6.0\test.dll

Leaving this issue open to improve our docs. Related to #89

PS: I recommend to use dotnet test, no need to download nunit console at all.