Automation Testing with SeleniumHQ

In an earlier post, I provided step-by-step instructions in how to perform Behavior Driven Development using Visual Studio, SpecFlow, WatiN and DryRunner.  However, I’ve had a lot of students and blog readers ask me about Selenium, a more-common browser automation tool.  So, I’m writing this post to show how to accomplish BDD and automated test driven development (ATDD) using Selenium.Read more


Behavior Driven Development with SpecFlow + WatiN + DryRunner

In the previous post, we examined some of the principles behind BDD.  If you read it, I’m sure you’re thinking, “Wow! That’s great! But, how do I accomplish this in Visual Studio?”  There are a myriad of posts on the Internet that demonstrate different components.  However, there’s not really a single post with all of the information compiled.  For that reason, I’m going to provide a step-by-step tutorial on how to perform BDD with Visual Studio. Additionally, I will show you how to perform automated testing using your Gherkin scripts.

Read more


Custom Validation Errors in MVC

There are times where you may want to display custom validation error messages in MVC.  As for me, I’m not a huge fan of the classic ValidationSummary HTML helper.  I will still annotate my data model, but I want the errors to have a better presentation in the UI. Occasionally, I may want to display one error at a time.  In order to do all of this, there’s a few steps that need to be implemented.

Read more


Render HTML in a Validation Message in ASP.NET MVC

Often times you may want to render a custom validation message that contains HTML markup.  If you simply add the line:

This will encode the markup so that less than signs and greater than signs are rendered < and >, respectively.  This, of course, is not what you want.

To render your HTML markup, its a little dirty, but it does work.

Simply add the following to your view:

Where “Email” is a property of your model.