reportportal / agent-net-nunit

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

Integrate Report portal to NunitAdapter #41

Closed santhosh-James closed 5 years ago

santhosh-James commented 5 years ago

How to integrate report portal with Nunit adapter?

nvborisenko commented 5 years ago

Follow instructions in readme from this repository. It should work if your target test framework is full .net framework (v4.5+). If your target framework is .netcoreapp, just wait official next release of nunit adapter v3.14, or use it from myget nuget feed.

If all above doesn't work for you, please share step you did to try to make it working.

MithunDavid commented 5 years ago

I am facing below error while integrating with NUnit. Any idea what could be the reason? I have set-up the server url correctly in ReportPortal.config.json file

[7/23/2019 2:51:54 PM Warning] The type initializer for 'ReportPortal.NUnitExtension.ReportPortalListener' threw an exception. [7/23/2019 2:51:54 PM Warning] at ReportPortal.NUnitExtension.ReportPortalListener..ctor() [7/23/2019 2:51:54 PM Warning] Innerexception: System.Collections.Generic.KeyNotFoundException: Property 'Server:Url' not found in the configuration. at ReportPortal.Shared.Configuration.Configuration.GetValue[T](String property) in C:\projects\commons-net\src\ReportPortal.Shared\Configuration\Configuration.cs:line 25 at ReportPortal.NUnitExtension.ReportPortalListener..cctor() in C:\projects\agent-net-nunit\src\ReportPortal.NUnitExtension\ReportPortalListener.cs:line 28

nvborisenko commented 5 years ago

But you didn't set a property for the config file to copy it to output folder.

MithunDavid commented 5 years ago

Yes it worked. thanks for the input.

PavelPanasiuk commented 1 year ago

But you didn't set a property for the config file to copy it to output folder.

Hi, I have the same problem. Can you add more information about resolving this problem? I can't understand your advice.

Aleh-Yanushkevich commented 1 year ago

But you didn't set a property for the config file to copy it to output folder.

Hi, I have the same problem. Can you add more information about resolving this problem? I can't understand your advice.

Could you please share your sample?

PavelPanasiuk commented 1 year ago

Starting test execution, please wait... A total of 1 test files matched the specified pattern. Exception System.Collections.Generic.KeyNotFoundException, Exception thrown executing tests in C:\Users\User\source\repos\TAF_ReportPortal\TAF_ReportPortal\bin\Debug\net6.0\TAF_ReportPortal.dll Property 'Server:Url' not found in the configuration. Make sure you have configured it properly. at ReportPortal.Shared.Configuration.Configuration.GetValue[T](String property) at ReportPortal.Shared.Reporter.Http.ClientServiceBuilder.Build() at ReportPortal.NUnitExtension.ReportPortalListener..ctor() in C:\projects\agent-net-nunit\src\ReportPortal.NUnitExtension\ReportPortalListener.cs:line 34 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) No test is available in C:\Users\User\source\repos\TAF_ReportPortal\TAF_ReportPortal\bin\Debug\net6.0\TAF_ReportPortal.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Aleh-Yanushkevich commented 1 year ago

Issue was in wrong place of ReportPortal.config.json file.