Closed heilwood closed 5 years ago
Try to upgrade ReportPortal.Shared
package.
TpTrace Error: 0 : 4616, 3, 2019/03/18, 06:32:15.828, 16371736106253, vstest.console.exe, InternalTestLoggerEvents.SendTestResult: Exception occurred while calling handler of type ReportPortal.VSTest.TestLogger.ReportPortalLogger for TestResultEventArgs: 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 ReportPortal.VSTest.TestLogger.ReportPortalLogger.Events_TestResult(Object sender, TestResultEventArgs e)
--- 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.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(Delegate delegates, Object sender, EventArgs args, String traceDisplayName)
TpTrace Error: 0 : 4616, 3, 2019/03/18, 06:32:21.154, 16371789384666, vstest.console.exe, InternalTestLoggerEvents.SendTestRunComplete: Exception occurred while calling handler of type ReportPortal.VSTest.TestLogger.ReportPortalLogger for TestRunCompleteEventArgs: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The tasks argument included a null value.
Parameter name: tasks
at System.Threading.Tasks.TaskFactory.CheckMultiContinuationTasksAndCopy(Task[] tasks)
at System.Threading.Tasks.TaskFactory
1.ContinueWhenAllImpl(Task[] tasks, Func2 continuationFunction, Action
1 continuationAction, TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler, StackCrawlMark& stackMark)
at System.Threading.Tasks.TaskFactory.ContinueWhenAll[TResult](Task[] tasks, Func2 continuationFunction)
at ReportPortal.Shared.Reporter.TestReporter.Finish(FinishTestItemRequest request)
at ReportPortal.VSTest.TestLogger.ReportPortalLogger.Events_TestRunComplete(Object sender, TestRunCompleteEventArgs e)
--- 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.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(Delegate delegates, Object sender, EventArgs args, String traceDisplayName)
looks like same error
Please share you versions of packages. I'wondering about ReportPortal packages, MSTestFramework, MsTestFramework.TestAdapter. This issue is easy for fixing, need just to reproduce it.
<package id="ReportPortal.Client" version="2.1.10" targetFramework="net461" />
<package id="ReportPortal.Shared" version="2.1.4" targetFramework="net461" />
<package id="ReportPortal.VSTest.TestLogger" version="2.0.0-beta.4" targetFramework="net461" />
<package id="SpecRun.Runner" version="1.8.5" targetFramework="net461" />
<package id="SpecRun.SpecFlow" version="1.8.5" targetFramework="net461" />
This line should be added in Default.srporile of SpecRun:
<VSTest testRetryResults="Unified" passRateAbsolute="1"/>
Im not using MsTestFramework, im running tests using SpecRun which are integrated with vsts.
Is it possible to prepare simple solution with dummy tests to reproduce the issue? Thanks you.
not today, it will take several hours :)
Here is it: Common.Test.Automation.zip
P.S. Sorry for not adding to source control, have no time :)
Thanks. How to execute tests with integrated RP to reproduce the issue?
Reproduced it via 'vstest'.
Fix is available in 2.0.0-beta.5
When executing tests using vstest the results are not appear in reportportal web.
Such error found in log:
Error:
TpTrace Error: 0 : 7324, 3, 2019/03/15, 14:06:40.942, 14052382115029, vstest.console.exe, InternalTestLoggerEvents.SendTestResult: Exception occurred while calling handler of type ReportPortal.VSTest.TestLogger.ReportPortalLogger for TestResultEventArgs: 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 ReportPortal.VSTest.TestLogger.ReportPortalLogger.Events_TestResult(Object sender, TestResultEventArgs e)
--- 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.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(Delegate delegates, Object sender, EventArgs args, String traceDisplayName)
TpTrace Error: 0 : 7324, 3, 2019/03/15, 14:06:40.942, 14052382148185, vstest.console.exe, InternalTestLoggerEvents.SendTestResult: Exception occurred while calling handler of type ReportPortal.VSTest.TestLogger.ReportPortalLogger for TestResultEventArgs: 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 ReportPortal.VSTest.TestLogger.ReportPortalLogger.Events_TestResult(Object sender, TestResultEventArgs e)
--- 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.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(Delegate delegates, Object sender, EventArgs args, String traceDisplayName)
Error:
at System.Threading.Tasks.TaskFactory.ContinueWhenAll[TResult](Task[] tasks, Func
TpTrace Error: 0 : 7324, 3, 2019/03/15, 14:06:48.606, 14052458866824, vstest.console.exe, InternalTestLoggerEvents.SendTestRunComplete:
Exception occurred while calling handler of type ReportPortal.VSTest.TestLogger.ReportPortalLogger for TestRunCompleteEventArgs:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The tasks argument included a null value.
Parameter name: tasks
at System.Threading.Tasks.TaskFactory.CheckMultiContinuationTasksAndCopy(Task[] tasks)
at System.Threading.Tasks.TaskFactory
1.ContinueWhenAllImpl(Task[] tasks, Func2 continuationFunction, Action
1 continuationAction, TaskContinuationOptions continuationOptions, CancellationToken cancellationToken, TaskScheduler scheduler, StackCrawlMark& stackMark)2 continuationFunction)
at ReportPortal.Shared.Reporter.TestReporter.Finish(FinishTestItemRequest request)
at ReportPortal.VSTest.TestLogger.ReportPortalLogger.Events_TestRunComplete(Object sender, TestRunCompleteEventArgs e)
--- 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.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(Delegate delegates, Object sender, EventArgs args, String traceDisplayName)
My json:
{
"$schema": "https://raw.githubusercontent.com/reportportal/agent-net-vstest/master/ReportPortal.VSTest.TestLogger/ReportPortal.config.schema",
"enabled": true,
"server": {
"url": "http://myhost:8080/api/v1/",
"project": "superadmin_personal",
"authentication": {
"uuid": "74c2b0f9-90f4-474f-bcaf-52fb48249ce6"
}
},
"launch": {
"name": "superadmin_TEST_EXAMPLE",
"description": "this is description",
"debugMode": true,
"tags": ["t1", "t2"]
}
}