<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Asynchronous test support &#8211; Silverlight unit test framework and the UI thread</title>
	<atom:link href="http://www.jeff.wilcox.name/2009/03/asynchronous-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/</link>
	<description>Silverlight, rich client apps and web development</description>
	<lastBuildDate>Wed, 10 Mar 2010 13:26:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Phil Cockfield</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1471</link>
		<dc:creator>Phil Cockfield</dc:creator>
		<pubDate>Sun, 24 May 2009 21:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1471</guid>
		<description>Awesome Jeff!!!</description>
		<content:encoded><![CDATA[<p>Awesome Jeff!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Wilcox</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1470</link>
		<dc:creator>Jeff Wilcox</dc:creator>
		<pubDate>Sat, 23 May 2009 21:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1470</guid>
		<description>@Phil,
Wow, yeah, that&#039;s something I&#039;ve really wanted to investigate. It would mean removing the HTML interop loggers, and removing some of the singletons from the implementation today. There&#039;s also the unhandled exception handler logic, that could stay, but would affect any kind of asynchronous/multiple-concurrent test runs.

I&#039;ll see what it might take and either blog on it, or respond back here!</description>
		<content:encoded><![CDATA[<p>@Phil,<br />
Wow, yeah, that&#8217;s something I&#8217;ve really wanted to investigate. It would mean removing the HTML interop loggers, and removing some of the singletons from the implementation today. There&#8217;s also the unhandled exception handler logic, that could stay, but would affect any kind of asynchronous/multiple-concurrent test runs.</p>
<p>I&#8217;ll see what it might take and either blog on it, or respond back here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Cockfield</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1469</link>
		<dc:creator>Phil Cockfield</dc:creator>
		<pubDate>Sat, 23 May 2009 20:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1469</guid>
		<description>Hi Jeff,

Rather than send you a private comment, I&#039;ve taken the advice on your comment page, and am posting on the latest post re your Testing Framework.

I was wondering if there is a way to get more programmatic control over the testing framework - rather than having it take over the page (Root Control), could we instantiate it as a control, and run it diagrammatically receiving test results back as a data-object rather than in UI.

This would make it possible to integrate this into a wider testing story...drawing on the pre-investment in silverlight tests.

If it already does this, apologies, and I wonder if you could point me in the direction of how to do this please.

This would be really awesome, and powerful...and I&#039;m sure would see your framework become the core of many more value-add mash-ups around testing.

Thanks - I&#039;d love to hear your opinion on this.  Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Rather than send you a private comment, I&#8217;ve taken the advice on your comment page, and am posting on the latest post re your Testing Framework.</p>
<p>I was wondering if there is a way to get more programmatic control over the testing framework &#8211; rather than having it take over the page (Root Control), could we instantiate it as a control, and run it diagrammatically receiving test results back as a data-object rather than in UI.</p>
<p>This would make it possible to integrate this into a wider testing story&#8230;drawing on the pre-investment in silverlight tests.</p>
<p>If it already does this, apologies, and I wonder if you could point me in the direction of how to do this please.</p>
<p>This would be really awesome, and powerful&#8230;and I&#8217;m sure would see your framework become the core of many more value-add mash-ups around testing.</p>
<p>Thanks &#8211; I&#8217;d love to hear your opinion on this.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santhosh C</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1442</link>
		<dc:creator>Santhosh C</dc:creator>
		<pubDate>Mon, 04 May 2009 06:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1442</guid>
		<description>1) Does Silverlight UT framework has a UI similar to Nunits ?
2) Is it possible to run only partial test cases similar to Nunits, where i can run only selected &#039;TextFixtures&#039; ?</description>
		<content:encoded><![CDATA[<p>1) Does Silverlight UT framework has a UI similar to Nunits ?<br />
2) Is it possible to run only partial test cases similar to Nunits, where i can run only selected &#8216;TextFixtures&#8217; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mock</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1348</link>
		<dc:creator>Mock</dc:creator>
		<pubDate>Fri, 27 Mar 2009 08:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1348</guid>
		<description>Great article Jeff…
 
Jonas – we’ve just started a new open source project - SilverUnit  - that is capable of unit testing Silverlight and WCF
 
http://www.typemock.com/Silverlight_unit_testing_page.php</description>
		<content:encoded><![CDATA[<p>Great article Jeff…</p>
<p>Jonas – we’ve just started a new open source project &#8211; SilverUnit  &#8211; that is capable of unit testing Silverlight and WCF</p>
<p><a href="http://www.typemock.com/Silverlight_unit_testing_page.php" rel="nofollow">http://www.typemock.com/Silverlight_unit_testing_page.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1288</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Tue, 10 Mar 2009 19:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1288</guid>
		<description>@Jonas:
EnqueueCallback(delegate
{
// Waiting for WCF to return
m_PropertyChangedEventTrap.WaitUntilReceived(1);
Assert.AreEqual(3, m_RoutesViewModel.Routes.Count);
TestComplete();
});
}

Try taking the TestComplete(); out of the EnqueueCallback.</description>
		<content:encoded><![CDATA[<p>@Jonas:<br />
EnqueueCallback(delegate<br />
{<br />
// Waiting for WCF to return<br />
m_PropertyChangedEventTrap.WaitUntilReceived(1);<br />
Assert.AreEqual(3, m_RoutesViewModel.Routes.Count);<br />
TestComplete();<br />
});<br />
}</p>
<p>Try taking the TestComplete(); out of the EnqueueCallback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Karlsson</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1279</link>
		<dc:creator>Jonas Karlsson</dc:creator>
		<pubDate>Fri, 06 Mar 2009 07:18:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1279</guid>
		<description>Thought I replied, but here&#039;s a new post.

What we want to achieve is a functional integration testing in a similar manner as when we develop windows forms by:

1. Injecting stimulus on client side
2. Waiting for server to complete WCF call
3. Evaluating the result on the client side

This is a common practice in testing asynchronous solutions.

The problem is to get the test to actually execute the WCF call, since the BeginXXX-method does not fire away the call immediately but enques the call. The dequeueing takes place when the UI thread is done, see e.g. article http://www.codeproject.com/KB/silverlight/SynchronousSilverlight.aspx.

I was accordingly hoping that the WCF-call would get a chance to execute, before entering the delegate. But it doesn&#039;t. If I take away the event trap (which indeed is blocking, to assure #2 above) the WCF call is executed after the TestComplete. Which is way too late.</description>
		<content:encoded><![CDATA[<p>Thought I replied, but here&#8217;s a new post.</p>
<p>What we want to achieve is a functional integration testing in a similar manner as when we develop windows forms by:</p>
<p>1. Injecting stimulus on client side<br />
2. Waiting for server to complete WCF call<br />
3. Evaluating the result on the client side</p>
<p>This is a common practice in testing asynchronous solutions.</p>
<p>The problem is to get the test to actually execute the WCF call, since the BeginXXX-method does not fire away the call immediately but enques the call. The dequeueing takes place when the UI thread is done, see e.g. article <a href="http://www.codeproject.com/KB/silverlight/SynchronousSilverlight.aspx" rel="nofollow">http://www.codeproject.com/KB/silverlight/SynchronousSilverlight.aspx</a>.</p>
<p>I was accordingly hoping that the WCF-call would get a chance to execute, before entering the delegate. But it doesn&#8217;t. If I take away the event trap (which indeed is blocking, to assure #2 above) the WCF call is executed after the TestComplete. Which is way too late.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Karlsson</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1278</link>
		<dc:creator>Jonas Karlsson</dc:creator>
		<pubDate>Thu, 05 Mar 2009 10:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1278</guid>
		<description>The event trap is waiting for the WCF-call to have been completed. We don&#039;t want to evaluate the result on client side until we know the server return is completed. This is a common practice in testing asynchronous calls. So, yes it is blocking since the WCF call is not executed at all and accordingly not completed. If I take away this trap, the WCF call is executed *after* TestComplete which does not help me. I was hoping the UI thread would get a chance to dequeue the WCF-calls before entering the EnqueueCallBack delegate.</description>
		<content:encoded><![CDATA[<p>The event trap is waiting for the WCF-call to have been completed. We don&#8217;t want to evaluate the result on client side until we know the server return is completed. This is a common practice in testing asynchronous calls. So, yes it is blocking since the WCF call is not executed at all and accordingly not completed. If I take away this trap, the WCF call is executed *after* TestComplete which does not help me. I was hoping the UI thread would get a chance to dequeue the WCF-calls before entering the EnqueueCallBack delegate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Wilcox</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1276</link>
		<dc:creator>Jeff Wilcox</dc:creator>
		<pubDate>Wed, 04 Mar 2009 16:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1276</guid>
		<description>@jonas,
What does your property changed event trap do? You may not actually need it, since it may block one of the key threads.</description>
		<content:encoded><![CDATA[<p>@jonas,<br />
What does your property changed event trap do? You may not actually need it, since it may block one of the key threads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Karlsson</title>
		<link>http://www.jeff.wilcox.name/2009/03/asynchronous-testing/comment-page-1/#comment-1275</link>
		<dc:creator>Jonas Karlsson</dc:creator>
		<pubDate>Wed, 04 Mar 2009 15:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/03/asynchronous-testing/#comment-1275</guid>
		<description>Thanks for this article! This was exactly what I was looking for.  At least I thought. 

We are evaluation this framwork for our functional testing, where we have a Silverlight/WCF-solution. By injecting stimulus on the GUI and evulating the service results, we cover most part of our system.

The issue I&#039;ve been strugling with is that the WCF call is enqued and not executed immediately as it is invoked from the UI thread. 

Now I tried the EnqueueCallback described in this article. See snippet below.  It didn&#039;t help. The WCF call was not executed between the test method is completed and the EnqueueCallback is entered.

//
        [TestMethod]
        [Asynchronous]
        public void TestGetRoutes()
        {
            m_RoutesViewModel.DateTimeFrom = DateTime.Now;
            m_RoutesViewModel.DateTimeTo = DateTime.Now;
            m_RoutesViewModel.GetRoutes();

            EnqueueCallback(delegate
                                {
                                    // Waiting for WCF to return
                                    m_PropertyChangedEventTrap.WaitUntilReceived(1);
                                    Assert.AreEqual(3, m_RoutesViewModel.Routes.Count);
                                    TestComplete();
                                });
        }</description>
		<content:encoded><![CDATA[<p>Thanks for this article! This was exactly what I was looking for.  At least I thought. </p>
<p>We are evaluation this framwork for our functional testing, where we have a Silverlight/WCF-solution. By injecting stimulus on the GUI and evulating the service results, we cover most part of our system.</p>
<p>The issue I&#8217;ve been strugling with is that the WCF call is enqued and not executed immediately as it is invoked from the UI thread. </p>
<p>Now I tried the EnqueueCallback described in this article. See snippet below.  It didn&#8217;t help. The WCF call was not executed between the test method is completed and the EnqueueCallback is entered.</p>
<p>//<br />
        [TestMethod]<br />
        [Asynchronous]<br />
        public void TestGetRoutes()<br />
        {<br />
            m_RoutesViewModel.DateTimeFrom = DateTime.Now;<br />
            m_RoutesViewModel.DateTimeTo = DateTime.Now;<br />
            m_RoutesViewModel.GetRoutes();</p>
<p>            EnqueueCallback(delegate<br />
                                {<br />
                                    // Waiting for WCF to return<br />
                                    m_PropertyChangedEventTrap.WaitUntilReceived(1);<br />
                                    Assert.AreEqual(3, m_RoutesViewModel.Routes.Count);<br />
                                    TestComplete();<br />
                                });<br />
        }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
