1 year ago
#377019
Kiran
Unable to run my specFlow code through nunit.consolerunner
I have tried running my test using nunit.consolerunner:
C:\Users\\.nuget\packages\nunit.consolerunner\3.11.1\tools>nunit3-console.exe "D:\Automation\bin\Debug\netcoreapp3.1\la-automation.dll" --where "cat=KK"
NUnit Console Runner 3.11.1 (.NET 2.0)
Copyright (c) 2020 Charlie Poole, Rob Prouse
Sunday, April 3, 2022 9:25:35 PM
Runtime Environment
OS Version: Microsoft Windows NT 6.2.9200.0
Runtime: .NET Framework CLR v4.0.30319.42000
Test Files
D:\Automation\bin\Debug\netcoreapp3.1\la-automation.dll
Test Filters
Where: cat=KK
Errors, Failures and Warnings
1) Error :
NUnit.Engine.NUnitEngineException : The NUnit 3 driver encountered an error while executing reflected code.
----> System.InvalidCastException : Unable to cast transparent proxy to type 'System.Web.UI.ICallbackEventHandler'.
--NUnitEngineException
The NUnit 3 driver encountered an error while executing reflected code.
Server stack trace:
at NUnit.Engine.Drivers.NUnit3FrameworkDriver.CreateObject(String typeName, Object[] args)
at NUnit.Engine.Drivers.NUnit3FrameworkDriver.Load(String testAssemblyPath, IDictionary`2 settings)
at NUnit.Engine.Runners.DirectTestRunner.LoadDriver(IFrameworkDriver driver, String testFile, TestPackage subPackage)
at NUnit.Engine.Runners.DirectTestRunner.LoadPackage()
at NUnit.Engine.Runners.DirectTestRunner.EnsurePackageIsLoaded()
at NUnit.Engine.Runners.DirectTestRunner.RunTests(ITestEventListener listener, TestFilter filter)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at NUnit.Engine.ITestEngineRunner.Run(ITestEventListener listener, TestFilter filter)
at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)
--
InvalidCastException
Unable to cast transparent proxy to type 'System.Web.UI.ICallbackEventHandler'.
at NUnit.Framework.Api.FrameworkController.LoadTestsAction..ctor(FrameworkController controller, Object handler)
Test Run Summary
Overall result: Failed
Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
Start time: 2022-04-03 15:55:36Z
End time: 2022-04-03 15:55:38Z
Duration: 1.650 seconds
Results (nunit3) saved as TestResult.xml
Can you please help on this issue.?
Configuration:
- NUnit - 3.13.1
- NUnit.Console - 3.11.1
- NUNit.ConsoleRunner - 3.11.1
- NUnit3TestAdapter - 4.0.0
- SpecFlow - 3.9.40
- SpecFlow.Actions.WindowsAppDriver - 0.1.177
- SpecFlow.NUnit - 3.9.40
c#
selenium
bdd
specflow
0 Answers
Your Answer