BUG: testThreadIsolation="SharedAppDomain" broken

128 views
Skip to first unread message

leo stone

unread,
Nov 7, 2016, 8:21:34 AM11/7/16
to SpecRun
Hello TechTalk,

I'v been trying to use testThreadIsolation="SharedAppDomain". This is unfortunatly broken.

As soon, as you try to execute Tests for more than one target, the test execution will fail for all targets except the first.

Here is the stacktrace:


 
[ERROR] Add two numbers: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
     bei TechTalk.SpecRun.Framework.TestAssemblyExecutor.<InitSpecRunner>b__17_1(StepType stepType)
     bei TechTalk.SpecRun.EventsClass.RaiseStartStep(StepType stepType)
     bei TechTalk.SpecRun.SpecRunner.StartArrangeStep()
     bei TechTalk.SpecRun.SpecFlowPlugin.Runtime.SpecRunListener.WriteTestOutput(String message)
     bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance)
     bei TechTalk.SpecFlow.TestRunner.Given(String text, String multilineTextArg, Table tableArg, String keyword)
     bei SharedAppDomainNullPointerException.SpecFlowFeature1Feature.AddTwoNumbers() 
     bei TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(ITestThreadExecutionContext testThreadExecutionContext)
     bei TechTalk.SpecRun.Framework.TestAssemblyExecutor.ExecuteTestNodeTask(TestNode testNode, ITaskExecutor task, TraceEventType eventType)


To reproduce this error, just use the demo feature with all methods empty, so they all succeed and configure Default.srprofile like:

<Environment testThreadIsolation="SharedAppDomain" />
  
<Targets>
    <Target name="target1" />
    <Target name="target2" /> 
</Targets> 

Tx leo
 

Andreas Willich

unread,
Nov 7, 2016, 8:33:14 AM11/7/16
to SpecRun
Hi Leo

Thanks for the info.
Which version of SpecFlow+Runner and SpecFlow are you using?

Best regards
Andreas


--
You received this message because you are subscribed to the Google Groups "SpecRun" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specrun+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

leo stone

unread,
Nov 7, 2016, 8:54:57 AM11/7/16
to SpecRun
Hi Andreas,

the error is happening on latest stable and latest pre-release.

An important note for reproducing the error: The exception happens when a test thread has to switch to a new target.

This means if you have two test threads, you need at least 3 targets to reproduce the error. 
My example is meant to expose the bug if you have 1 test thread only. 

Ciao leo

Andreas Willich

unread,
Nov 8, 2016, 4:41:24 AM11/8/16
to SpecRun
Hi Leo

I wasn't able to reproduce this behaviour yet.
Could you provide me some additional information?

Is this always happening for you?
Could you send me your srProfile? If it contains sensitive data, you could send it to sup...@specflow.org
Or do you have a project for reproducing the error?

Thanks!
Andreas



Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

leo stone

unread,
Nov 9, 2016, 4:22:57 AM11/9/16
to SpecRun
I've attached a bug project.

Ciao leo
SharedAppDomainNullPointerException.zip

Andreas Willich

unread,
Nov 9, 2016, 4:35:21 AM11/9/16
to SpecRun
Thanks for the repro project!
I will have a look at the issue in the next days.

Best regards
Andreas


Andreas Willich

unread,
Nov 14, 2016, 8:39:47 AM11/14/16
to SpecRun
Hi Leo

I found the bug and fixed it. It will be included in the next release.
Thanks again for the repro project!

Best regards
Andreas

leo stone

unread,
Nov 14, 2016, 12:01:24 PM11/14/16
to SpecRun
Wonderful!!! tx alot

Is the next release already scheduled? If so, can you tell me the date more or less.

tx leo

Andreas Willich

unread,
Nov 15, 2016, 3:51:18 AM11/15/16
to SpecRun
Hi Leo

I hope I will at least release a new preview- version in the next 2 weeks.

Best regards
Andreas

Andreas Willich

unread,
Nov 25, 2016, 7:47:28 AM11/25/16
to SpecRun
Hi Leo

I just published SpecFlow+Runner 1.6.0-rc002. This includes the fix for this bug.
It should be available on NuGet.org in the next minutes.

Best regards
Andreas
Reply all
Reply to author
Forward
0 new messages