We use SpecFlow with Selenium successfully to test our HTML applications and are looking for a similar way to test our Silverlight applications. At the moment, we are assessing these options:
- SpecFlow Silverlight with Microsoft Silverlight unit test framework
- Normal SpecFlow using Telerik WebAii
Has anyone tried these approaches? Can Microsoft framework test UI elements (eg click on button, assert on text value)? Are there other options?
I created a blog entry for Silverlight Unit Testing and specflow here
http://rburnham.wordpress.com/2011/05/13/testing-silverlight-asynchronous-code-with-specflow/
just note that this was a pre release built, they may have changed the syntax a bit.
but it sounds like your after UI Tests. You can use the Coded UI Tests with specflow to achieve this. I wrote a series on this as well
http://rburnham.wordpress.com/2011/03/15/bdd-ui-automation-with-specflow-and-coded-ui-tests/
To summorise you would need to do the following
Just a note though Coded UI Tests do not work with out of browser silverlight apps and i think its only silverlight 4.