Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Silverlight Support

gasparnagy edited this page · 1 revision
Clone this wiki locally
  • Install Silverlight Toolkit. It comes with the SL Unit Test Framework (
  • In your solution add a "Silverlight Unit Test Application" project. This adds a Silverlight Application project with the tests and a web project to the solution. The former is the test project, where the feature files and step definitions should be added. The latter hosts the test project to execute it in the browser.
  • Add an app.config to the project (even if it's not supported by SL), with the following content:
<?xml version="1.0" encoding="utf-8" ?>
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
    <unitTestProvider name="MsTest.Silverlight" />

This'll get the generator to create MsTest + silverlight-compatible c# files for every feature file you add.

  • Add a reference to TechTalk.Specflow.Silverlight3.dll to the test project.
  • Add the following command to the Pre-build event commands of the project found in "Project Properties -> Build Events".
{SpecFlow-tools-path}\SpecFlow.exe generateAll $(ProjectName) /force /verbose
  • Add feature files and step definitions to the test project. You can use the templates in "Add -> New Item..." for that.
  • Set the web project as your startup project. Execute it. You should see the result of the test execution displayed in the browser.
Something went wrong with that request. Please try again.