getgauge / gauge-csharp

Csharp runner for Gauge
https://gauge.org
GNU General Public License v3.0
33 stars 21 forks source link

Getting a cannot convert to type exception while executing a spec with data table driven execution #80

Closed sswaroopgupta closed 8 years ago

sswaroopgupta commented 8 years ago

Expected behavior

Should be able to run specs with table params

Actual behavior

Getting the following exception

Test Name:  Vowel counts in multiple word
Test Outcome:   Failed
Result StandardOutput:  
Gauge.CSharp.Runner.SandboxFactory Creating a Sandbox in: C:\Users\sswaroop.CORPORATE\AppData\Roaming\gauge\plugins\csharp\0.8.0.nightly-2016-06-08\bin\
# Specification Heading

     |hfg  |
     |-----|
     |aeiou|
  ## Vowel counts in multiple word

        Failed Step: Almost all words have vowels
        Specification: specs\example.spec:30
        Error Message: Connection closed [127.0.0.1:49951] cause: EOF
        Stacktrace: 

        Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
        Stacktrace: 

        Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
        Stacktrace: 

        Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
        Stacktrace: 

    Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
    Stacktrace: 

  Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
  Stacktrace: 

Unable to connect to plugin Html Report 2.1.1. proto: required field "SuiteExecutionResult.SuiteResult.SpecResults.ProtoSpec.Items.TableDrivenScenario.Scenarios.ScenarioItems.Step.StepExecutionResult.PostHookFailure.StackTrace" not set

  Error Message: write tcp 127.0.0.1:49948->127.0.0.1:49951: use of closed network connection
  Stacktrace: 

Gauge.CSharp.Runner.GaugeListener System.ArgumentException: Object of type 'Gauge.CSharp.Lib.Table' cannot be converted to type 'Gauge.CSharp.Lib.Table'.

Server stack trace: 
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Gauge.CSharp.Runner.Sandbox.ExecuteMethod(MethodInfo method, Object[] args) in c:\Program Files (x86)\Go Agent\pipelines\Csharp-Package\gauge-csharp\Runner\Sandbox.cs:line 60
   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 Gauge.CSharp.Runner.ISandbox.ExecuteMethod(MethodInfo method, Object[] args)
   at Gauge.CSharp.Runner.MethodExecutor.Execute(MethodInfo method, Object[] args) in c:\Program Files (x86)\Go Agent\pipelines\Csharp-Package\gauge-csharp\Runner\MethodExecutor.cs:line 46
   at Gauge.CSharp.Runner.Processors.ExecuteStepProcessor.Process(Message request) in c:\Program Files (x86)\Go Agent\pipelines\Csharp-Package\gauge-csharp\Runner\Processors\ExecuteStepProcessor.cs:line 61
   at Gauge.CSharp.Runner.GaugeListener.PollForMessages() in c:\Program Files (x86)\Go Agent\pipelines\Csharp-Package\gauge-csharp\Runner\GaugeListener.cs:line 52
Specifications: 1 executed  0 passed    1 failed    0 skipped
Scenarios:  1 executed  0 passed    1 failed    0 skipped

Total time taken: 124ms

Steps to reproduce

  1. In visual studio run all tests test.zip

    Gauge version

Gauge version: 0.4.1.nightly-2016-06-08

Plugins
-------
csharp (0.8.0.nightly-2016-06-08)
html-report (2.1.1.nightly-2016-06-02)
java (0.4.1.nightly-2016-05-30)
ruby (0.2.0)
xml-report (0.1.2.nightly-2016-05-03)
sriv commented 8 years ago

Not reproducible on

Gauge version: 0.6.1

Plugins
-------
csharp (0.9.2)
html-report (2.1.1)
java (0.5.1.nightly-2016-07-25)
xml-report (0.1.2)