Archive for category Specflow

SpecFlow Tables And Parameters Invalid cast from System.String to TechTalk.SpecFlow.Table

If your trying to use a parameter and a table in the one step and you get this exception System.InvalidCastException: Invalid cast from ‘System.String’ to ‘TechTalk.SpecFlow.Table’. Make sure your table parameter is the last one in the method like this. It can be a bit tricky to find the problem due to the exception being […]

Leave a comment

Loading External Files for Image Comparison using Specflow and MSTests

Every now and then you need to be able to load an external file into your test such as an image or a spread sheet of expected results. The normal way to do this for an application would be to add the file to your project and then set the “Build Action” and “Copy to […]

1 Comment

My SpecFlow steps are not restricted by namespace

If your using SpecFlow you have probably realised that SpecFlow steps definitions are not restricted by namespace. This means it can be challenging to write steps that are generic but won’t conflict with other steps. For a while i thought this was just a limitation to SpecFlow. It turns out i didn’t know about the […]

1 Comment

Wire up the Specflow step definitions with a Coded UI test methods

This post is the third edition of the Specflow with Coded UI Tests series So our project now has the Specflow Feature that describes the Calculate Addition feature and our Coded UI Recordings that contain our actions of inputting a value into our calculator. Now we just need to wire the two together. Specflow does […]

5 Comments

Record your Coded UI test methods

This post is the second edition of the Specflow with Coded UI Tests series Now that we have our feature and scenarios we need to record the actions used in the scenario. In the previous step, Create a Specflow Feature file, I explained that a Scenario would normally contain multiple actions like this one. The […]

2 Comments

Create a Specflow Feature file

This post is the first edition of the Specflow with Coded UI Tests series To create a Specflow feature file first we will need to set up our test project to be able to support specflow tests. Install Specflow from http://www.specflow.org/. Specflow is an open source project, the source and wiki is located here https://github.com/techtalk/SpecFlow. […]

2 Comments

Testing Silverlight Asynchronous Code with Specflow

The asynchronous support is not parallel support, your test will still execute serially. This feature is to test asynchronous code. Intro Testing asynchronous code in Silverlight is based upon the same code and design that is used in the Silverlight Unit Test Framework. The concept is that you queue an item of work into the […]

1 Comment