StatLight release (V1.2 & V1.3)
This post is coming a little late (just realized I still had it in my local drafts and had not published it)…
Although I put out these blog posts (sometimes), the best way to learn about new releases is to subscribe to any of the myriad of Codeplex rss feeds for the project.
Released way back on Sep 25, 2010. Mostly a bug fix release, but came with a couple small features that could help out your Silverlight testing.
- Support to test multiple Xaps at once:
EX: StatLight.exe -x="C:\Project1\Test1.xap" -x="C:\Project2\Test2.xap"
- QueryString command line parameter. This will pass a querystring along to the browser instance running the StatLight Silverlight host. Allowing you to grab the querystring and pull some information (config or other) into your test.
- EX: You may want to run some Silverlight Integration tests that talk back to some self hosted web server. Since detecting this automatically is not realistic, because the server and port your tests will detect is the StatLight server, you can’t just call back to “home base” (because that is StatLight’s web server) you need to somehow know where to configure your endpoints. With the QueryString parameter in StatLight, your build scripts can now pass in a known port of your self hosted web server, where your tests can then use to configure any test service calls.
Released Nov 20, 2010. NOTE: This is the first build running on the .net 4.0 framework. If you need 3.5 support stick with the V1.2 build. Much like I did back on the V1.2 release, this release is marked as a “beta” build which I will change the status on the release page to stable if I don’t hear any issue come out of it in the next couple weeks.
This release comes with a feature I’ve been wishing for, for a while now. StatLight uses a web server internally to serve the content and receive messages from the Silverlight(StatLight) test runner. This web server was originally implemented with the WCF WebServiceHost. Unfortunately this required special administrative privileges to get up and running and although most developers have enough rights to not make this a problem, there are some who are not allowed to adjust these port privileges. Looking through Jeff Wilcox’s Microsoft Silverlight Testing framework server side code, I noticed he implemented a very simple web server with the HttpListener. After a quick spike I realized I could port his web server over into StatLight and gain some benefits other than just not requiring administrative privileges on a certain port.
- New WebServer implementation
- No requirement for elevated privileges
- Faster startup time
- With easier & full control of the request/response cycle StatLight now prints out warnings if your tests are making service requests that they shouldn’t be.
- Introductory support to run external web browsers (instead of the self hosted control)
- Added support for NUnit’s TestCaseAttribute
- Note this is not full support, but should work for many general cases.