GHPReporter / Ghpr.NUnit

Adapter for NUnit 3 (generate HTML report for NUnit 3)
http://ghpreporter.github.io/
MIT License
35 stars 14 forks source link

NullReferenceException on SaveScreenshot() #28

Closed nikembala closed 7 years ago

nikembala commented 7 years ago

Hello,

Please review the exception we have, here is the stacktrace:

... TearDown : System.TypeInitializationException : The type initializer for 'Ghpr.NUnit.Extensions.GhprEventListener' threw an exception. ----> System.NullReferenceException : Object reference not set to an instance of an object. --TearDown at Ghpr.NUnit.Extensions.GhprEventListener.get_OutputPath() at Ghpr.NUnit.Utils.ScreenHelper.SaveScreenshot(Byte[] screenBytes) ...

Setup is Specflow + Selenium. Exception does not appear on all dev's computers. Running version 0.5.0.2 of both Core&NUnit.

If more information is needed please request so I can deliver.

Regards,

elv1s42 commented 7 years ago

Hi @nikembala !

Can you please try to reproduce this issue with the latest Ghpr.NUnit version (v 0.7.0.0)?

nikembala commented 7 years ago

done Issue was reproduced with 0.7.0 result is the same

elv1s42 commented 7 years ago

Thank you! I'll try to reproduce and fix this

nikembala commented 7 years ago

Hello, Could this error appear if something is missing in any of the configuration files ? Regards,

elv1s42 commented 7 years ago

Hi @nikembala !

Can you please make sure, that you have .json config file in your solution and it appears in the build folder? For example, you can set 'Copy Always' option for .json config file: image

nikembala commented 7 years ago

Hi @elv1s42 , please excuse me for the late comment - the issue was resolved and the reason as you stated it - the settings files was not in the required directory. Thank you for the help!