none
Continuous Integration Unit Testing Silverlight with the Silverlight Toolkit/CruiseControl

    Question

  • The Silverlight Toolkit contains a unit testing framework written by Jeff Wilcox with an open ended logging system. It's been great. Good job, Jeff.

    I want to use the logging system to produce Visual Studio TRX files and in turn consume them with CruiseControl.net.

    The automated build process may look something like this:

    1. Build project normally
    2. Copy deployed website after the build to a test website location.
    3. Run the silverlight test app from the command line, which would produce the TRX report and upload it to a web service that handles test results
    4. Test results are copied back to the CC artifact directory from where they came
    5. CruiseControl xsl stylesheet delivers them with the rest of the CC log

    Does this look right? If so -- I don't know how to use the VisualStudioLogProvider in the toolkit. Has anyone used this with success and could possibly provide me with an example?

    Friday, December 12, 2008 12:33 PM

Answers

  • I am readying a series of blog posts on this topic, but the content may not be ready for a few weeks given the US holidays. Stay tuned.

    Friday, December 12, 2008 12:59 PM

All replies

  • I am readying a series of blog posts on this topic, but the content may not be ready for a few weeks given the US holidays. Stay tuned.

    Friday, December 12, 2008 12:59 PM
  • I'll keep monitoring the blog. Thanks, Jeff!
    Friday, December 12, 2008 1:35 PM
  • Greetings Mr Wilcox!

     I would highly encourage you to please please please post this series as soon as you can.  You mention here that you were going to do this, and that was back in april. :)

    I've created a temporary QUITE HACKY solution to this mess in the interm.  It is based off this solution (the only one I've found online) and placed in an MSBuild Task. It's super happy-path and barely tested, but does what I need it to.  It uses an IE Com object and MY GOD MAN it's just not how you do things. :)  But it works, usually...

    In any case, I'd love to see a true MSBuild task built that ties directly into the framework and produces the results we need...

     Thank you!

    Sunday, December 28, 2008 12:03 AM
  •  Thanks Michael!

    Tuesday, January 27, 2009 3:21 AM
  • I haven't had a chance to blog the sample apps yet on this, but, if you can spin up a local web server using HttpListener and related .NET types...

    Listen on localhost post 8000

    Accept a request for "/externalInterface/ping/", respond "<rsp stat="ok"">

    Fiddler for the rest of the events, you'll get a results summary via GET and then a log file POST.

    This is pretty easy to throw into a console app that can be used in any interactive session.

    Tuesday, January 27, 2009 4:55 AM
  • LOL... are you sure you responded to the right thread? :)

    Tuesday, January 27, 2009 8:35 AM
  • I haven't tested them, but you can try one of these two solutions:

    Using Powershell: http://blog.lab49.com/archives/2292

    SLRunners (including MSBuild): http://www.codeplex.com/SilverlightRunners

     

    Tuesday, February 03, 2009 12:25 AM
  • I made a test project using the sample from the toolkit.

    My tests are using UIAutomation to invoke buttons and others controls from the silverlight application. Everything works fine on visual studio.

    Now I would like to run those tests on the team foundation server that builds the application with MSBuild.

    In visual studio, I can't add those tests to the vsmdi file (generated when adding a non silverlight test project).

    Is there any (simple ?) way to do this ?

     

     

     

     

     

    Friday, February 20, 2009 6:39 AM
  • Hi Jeff,

    Your effort on Silverlight Unit Test Framework is awesome. I am looking for the steps how to implement MsBuild Automation with SL Unit Framework from continous integration perspective. I got some articles saything that we can do it using PowerShell but not perfectly helpful. Can you please narrate me the steps accordingly?

    Friday, March 20, 2009 5:23 AM
  • @yujever,
    I'm trying to find the time to get this information out there. I've been working very hard on the March 2009 Silverlight Toolkit release and getting to the MIX '09 conference, I hope to find the time now.

    Sorry for the inconvienience.

    Monday, March 23, 2009 2:45 AM
  • FYI there is a new Open Source Silverlight unit testing framework called SilverUnit that sits on top of Typemock Isolator. This framework simplifies unit testing Silverlight .
    Friday, April 17, 2009 6:11 AM
  • Jeff,

    Well. Can you please get me one more information about Silverlight unit test framework implementation for Datagrid unit test cases. I could find DataGridItemAutomationPeer class but if I am trying to declare an object for that class I am getting "Namespace / type couldn't be found" error even though I referred following namespaces. Where I am missing out things?

    using System.Windows.Automation.Peers;

    using System.Windows.Automation.Provider;

    If possible, can you please provide a small article about HOW to implement unit test framework for Silverlight DataGrid control for a Silverlight application?

    Wednesday, April 22, 2009 8:22 AM
  • Is there any update on this - I see this is quite old. We're kicking the tires on the Silverlight technology stack for a not-small LOB application. Not being able to wire up our unit testing assets to our CC.NET automated build is going to be a big issue for our organization. This doesn't seem like it would be that difficult to solve, but I don't want to reinvent any wheel, nor the testing framework from Jeff.
    Wednesday, January 06, 2010 12:03 PM
  • Would love to see this finally posted as well!
    Thursday, January 07, 2010 4:32 PM
  • Did anything ever become of this post? We're using SL4 and ideally need to integrate the SL4 Unit Tests into CI using CruiseControl is this possible?

    Tuesday, October 19, 2010 8:18 AM
  • Any updates on this?

    Also using SL4 here using TFS2010 Continuous Integration.  Any way to run Silverlight Unit tests as part of a TFS build?

    Tuesday, November 02, 2010 5:50 AM
  • Still looking for the best practice way of doing this myself, searching high and low. 

    Really, someone ought to write the book if not the full end-to-end blog post.

    Tuesday, November 23, 2010 2:19 PM
  • Hi Jeff,

    Any thoughts on an ETA for this info?

    Many thanks,

    Paul

    Thursday, December 09, 2010 11:21 AM
  • I'd also like to see this.  Any chance it can get to the top of the list?

    Friday, January 14, 2011 4:22 AM
  • Anyone managed to get SL unit tests running as part of CI process?

    Friday, March 04, 2011 5:36 AM
  • I was able to make it using statlight (http://statlight.codeplex.com) and some generic tests using this post http://www.nielshebling.de/?p=167

    After spending too much time looking for a viable solution, this one looks like the painless one...

    Anyone knows if MS is planning to add Silverlight unit test framework and a better build integration in the next version of Visual Studio / TFS?  What a pain for those who wish to implement TDD and CI with Silverlight...

     

    Friday, May 04, 2012 10:29 AM