forked from xerxesb/SpecFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Windows Phone 7 Support
gasparnagy edited this page Jul 12, 2011
·
12 revisions
You can use SpecFlow for developing Windows Phone 7 applications. Just do these simple steps.
Note: there are some issues reported when using Windows Phone Developer Tools 7.1 Beta, see SpecFlow forum for details
(Windows Phone 7 support for SpecFlow was done by Max Paulousky http://www.maxpaulousky.com)
- Windows Phone Developer Tools RTW
- Windows Phone Developer Tools January 2011 Update (optional)
- Silverlight Unit Test Framework
- You can find a good description about this at http://www.smartypantscoding.com/a-cheat-sheet-for-unit-testing-silverlight-apps-on-windows-phone-7
- Add a reference to
TechTalk.Specflow.WindowsPhone7.dll
to the test project.
- Add an app.config to the project (even if it’s not supported by WP7), with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<specFlow>
<unitTestProvider name="MsTest.WindowsPhone7"/>
</specFlow>
</configuration>
Add feature files and step definitions to the test project. You can use the templates in “Add → New Item…” for that.
Set the project as a startup one and execute it. If you use a device, unlock the screen before starting tests. You should see the result of the test execution displayed on the screen of your device or simulator.
See BowlingKata-WindowsPhone7-MsTest project as a Windows Phone 7 example.