extentreports-dotnet-cli icon indicating copy to clipboard operation
extentreports-dotnet-cli copied to clipboard

NUnit3 test results NullRef

Open ideafixxxer opened this issue 6 years ago • 2 comments

Parsing test runner result file 'TestResult.xml' ...
The html report will be output to the folder '..\testresult\'.

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at AventStack.ExtentReports.CLI.Parser.NUnitParser.AssignStatusAndMessage(XElement tc, ExtentTest test)
   at AventStack.ExtentReports.CLI.Parser.NUnitParser.ParseTestRunnerOutput(String resultsFile)
   at AventStack.ExtentReports.CLI.Program.ProcessSingle(String testResultsFilePath, String output, Boolean merge)
   at AventStack.ExtentReports.CLI.Program.OnExecute()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<OnExecute>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass126_0.<OnExecute>b__0()
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](IConsole console, String[] args)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](String[] args)
   at AventStack.ExtentReports.CLI.Program.Main(String[] args)

ideafixxxer avatar May 02 '19 03:05 ideafixxxer

Experiencing same issue.

cavan-dickson avatar Dec 13 '19 16:12 cavan-dickson

All - can you please share the cli command used and a sample result.xml that I can check?

anshooarora avatar Dec 26 '19 07:12 anshooarora