Michael Whelan

behaviour driven blog

BDDfy In Action: Custom Reports

This post looks at how to customize the HTML Report and how to create your own custom reports. You can customize the HTML report via configuration or by applying custom CSS or JavaScript. You can create custom reports either by implementing a new Processor or Batch Processor and adding them into their respective pipelines (see the BDDfy Architecture Overview for details about the differences between these).

Read more


BDDfy In Action: BDDfy Architecture Overview

The rest of the articles in this series revolve around customizing and extending BDDfy. I thought it would be good to start with an overview of the main components of the BDDfy architecture to provide some context for that discussion and to illustrate the extensibility points.

Read more


The Rules Design Pattern

Lately, I’ve been having to support some legacy code that has a lot of conditional logic and duplication. It can be quite hard to integrate new rules as the code can be difficult to understand and to digest what is going on. This sort of code often has comments explaining what the different pieces of conditional logic are doing. The problems only gets worse as you have to add more conditions over time.

Read more


Getting started with Seleno

Seleno is an open source project from TestStack which helps you write automated UI tests with Selenium. It focuses on the use of Page Objects and Page Components and by reading from and writing to web pages using strongly typed view models. This post is a brief overview of what you need to know to get started using Seleno.

Read more


Seleno 0.4

TestStack have just released version 0.4 of Seleno, our web browser automation framework. It's a pretty big release with lots of bug fixes and enhancements and quite a number of breaking changes as we solidify the core API in preparation for a 1.0 release. We have done extensive refactoring to the core code and internal architecture to improve its testability and to lay the groundwork for new features we are wanting to provide in future releases. While we have strived to keep breaking changes to a minimum, we did choose to make a few as we saw opportunities to improve the API and make the framework easier to use. These changes will greatly reduce as Seleno matures but at this stage we feel it is good to let the API evolve.

Read more


BDDfy In Action: Reports

BDDfy provides a rich array of reports to choose from and is also very easy to extend if you want to add your own reports. The two main reports are the Console Report and the HTML Report and both of these are on by default, though you can turn them off if you want to. In addition there is a Markdown Report, and recently a Diagnostics Report using JSON has been added. Both of these are off by default.

Read more


BDDfy In Action

This is a series of posts about BDDfy, the Behaviour Driven Development framework from TestStack. This series of posts builds on and continues the series of articles by the BDDfy creator, Mehdi Khalili, and shows 'BDDfy In Action.' I am a contributor on the project.

Read more


Paste JSON as Classes

In the recent ASP.Net and Web Tools 2012.2 Update a new feature was added to allow pasting of JSON as .Net classes. This feature allows you to generate strongly typed classes in C# or VB.NET from valid JSON text. To use the feature, open a .vb or .cs file, copy the JSON text to the clipboard, select “Paste Special” from the Edit menu, and then select “Paste JSON As Classes.”

The feature uses the Json.Net JSON parser from Newtonsoft to parse JSON text from the clipboard. Once the parser validates the clipboard data as valid JSON, it converts it into the C# or VB.NET class depending on the selected file type. If the JSON object on the clipboard is invalid, a dialog is displayed showing the Json.Net error message with the reason the text was not valid JSON.

Read more


NuGet Add-BindingRedirect

This is one of those "note to self" posts. I recently came across this NuGet feature which is useful on those infrequent occasions when I need to do binding redirects. Hopefully others will find it useful too!

I was wanting to use AutoSubstitute, the cool little auto mocking container from fellow TestStacker Rob Moore that uses Autofac to resolve unknown dependencies from NSubstitute. The problem was that AutoSubstitute is strongly named and when an assembly has a strong name, the binding to that assembly becomes very strict. Because AutoSubstitute currently binds to NSubstitute 1.4.0 and I was using 1.4.3 I was getting a FileLoadException.

Read more


Using PhantomJS and GhostDriver with Selenium WebDriver in .Net

With GhostDriver 1.0 recently being released I was keen to check out using PhantomJS with WebDriver. I couldn’t find any .Net examples so I thought I would post one myself.

PhantomJS is a headless browser. That means it is a web browser, but the rendered web pages are never actually displayed. This makes it fast and an excellent candidate for speeding up those slow functional tests. According to their website PhantomJS is “a headless WebKit with JavaScript API.” Webkit is the layout engine used by a few browsers, such as Chrome and Safari. So PhantomJS is a browser, but a headless one.

Read more



Google