reportportal / agent-net-nunit

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

Is there a version issue for Reportportal.Nunit for .net #48

Closed santhosh-James closed 4 years ago

santhosh-James commented 4 years ago

I am trying to Integrate reportportal.nunit with .net 4.6. The reports are not getting generated. I am using reportportal.Nunit 3.7.10

I also added the ReportPortal.addins. This also won't help. Not sure what is missing here.

santhosh-James commented 4 years ago

Getting the exception System.Reflection.ReflectionTypeLoadException' in mscorlib.dll when call the Log.info. This is working in .net core but not working in .net 4.6

nvborisenko commented 4 years ago

@santhosh-James do you have App.config file in your test project? If yes, please verify binding redirection section and make sure you redirect nunit assembly to correct version.

If no, please provide simple test project to reproduce the issue. https://github.com/reportportal/example-net-nunit project works for .net 4.6.

santhosh-James commented 4 years ago

This is my App.config file. And it is redirecting the correct nunit assembly.

bindingRedirect oldVersion="0.0.0.0-3.12.0.0" newVersion="3.12.0.0"

nvborisenko commented 4 years ago

Getting the exception System.Reflection.ReflectionTypeLoadException' in mscorlib.dll when call the Log.info

Where do you see it?

And how exactly do you execute tests? dotnet test or nunit-console.exe?

santhosh-James commented 4 years ago

I resolved the error System.Reflection.ReflectionTypeLoadException. It is something related an issue here.

I am executing the tests using NUnit3TestAdapter. Are ReportPortal.addins and Customization class mandatory to be in the project to get this work? Also, i don't have the log4net section in my App.config. Could that be an issue?

nvborisenko commented 4 years ago

I am executing the tests using NUnit3TestAdapter

In Visual Studio?

Are ReportPortal.addins and Customization class mandatory to be in the project to get this work?

ReportPortal.addins is mandatory, but it's automatically generated by nuget package. You can delete this file from the project, but verify that this file is automatically generated in bin/debug folder.

Also, i don't have the log4net section in my App.config. Could that be an issue?

https://github.com/reportportal/logger-net-log4net

santhosh-James commented 4 years ago

It is really strange. The same project works on my colleagues machine with no change in configuration. Not sure what is missing on my machine

nvborisenko commented 4 years ago

Your issue is similar to https://github.com/reportportal/agent-net-nunit/issues/44

santhosh-James commented 4 years ago

Is that because of VS 2019 upgrade?

nvborisenko commented 4 years ago

Definitely, if you execute tests in Visual Studio Test Explorer.

santhosh-James commented 4 years ago

Is there any chance that you would release a newer version of ReportPortal.Nunit to fix this issue?

nvborisenko commented 4 years ago

Is it soo important to you to execute tests from Visual Studio and see results on RP? This is on Microsoft's side.

Our understanding that usually you execute tests on CI on regular basis. And I guess the integration works in this way.

santhosh-James commented 4 years ago

when we debug using VS it is important to see that integrate with RP

santhosh-James commented 4 years ago

It doesn't seems like integrating using nunit.console.exe also in .net 4.6.1

vitali-sonchyk-epam commented 4 years ago

@santhosh-James , could you please clarify do u have issues with report portal logging when running with nunit3-console.exe or dotnet test?

santhosh-James commented 4 years ago

When using Reportportal.Nunit in .net 4.6 The report portal logging is not working for me from both nunit3testadapter and nunit3-console.exe

It is perfectly working in .net core and Reportportal. Specflow in .net 4.6

I am using VS2019 16.2.5. It works for my colleagues who are having lower version of VS2019

On Oct 8, 2019, at 7:53 AM, Vitali Sonchyk notifications@github.com wrote:

 @santhosh-James , could you please clarify do u have issues with report portal logging when running with nunit3-console.exe or dotnet test?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

vitali-sonchyk-epam commented 4 years ago

@santhosh-James when you are running tests with nunit3-console.exe it does not matter which version of visual studio you are using to build your solution.

When you are running tests with the nunit3-console.exe do you have any errors in the output? could you please specify all the logs related to Report portal from nunit3-console.exe console output?

santhosh-James commented 4 years ago

I see a message in console saying "Finishing to send the results to Report Portal... Elapsed: 00:00:01.4159171" but not logging anything when using nuint3-console.exe

In .net 461, is it required to put the nunit3-console.exe and associated dll in the bin directory where the ReportPortal.addins exists? looks like that is the it longing to RP when using from lower version of VS2019.

If that is the case, When setting up a pipe line to execute the tests, do you think it is difficult to move around an .exe file and it 's associated .dll's?

nvborisenko commented 4 years ago

Hi James, please follow readme in this repo, it describes how to connect RP in different ways. If something doesn't work as expected, then please describe here what you did and what you expected. It would help so much to understand where an issue is. Only then we can think of how to make it better. Thanks.

santhosh-James commented 4 years ago

Seems like for .netcore using VS 2017 doesn't log into RP as well? Is it a know issue?

I am using Nunit3adapter

nvborisenko commented 4 years ago

Dear @santhosh-James , again, what you did and how you execute tests. There are many ways, which one you use and how you configured it.

I see a message in console saying "Finishing to send the results to Report Portal... Elapsed: 00:00:01.4159171" but not logging anything when using nuint3-console.exe

It means the results are reported successfully, search for them on UI. On Debug tab?..

nvborisenko commented 4 years ago

No activity, closing.