C#, Selenium & NUnit

This trio provides a quick and easy way to set up UI-driven tests with Selenium webdriver, and Visual Studio, C# and NUnit to create and initiate the tests.  Here is a step by step guide, using the customary google search scenario as example (fast becoming the “Hello World!” of testing). Continue reading

VS2010 Automated Testing – Extraction Rules and Conditions

To validate values on screen is easy, as Visual Studio provides method of extraction values displayed on screen in a number of ways. I found the most reliable is to extract using relevant field id and/or name, but good markup practices are not always observed.  The method demonstrated here is to use the html code surrounding the value you want to extract, as method of extraction.  One you have extracted value and stored in meaningful parameter name, it will be available to select. To do this, identify step in recorded test (I always use Web Performance Test template) where the value you want to extract is visible (you can use the test results window to discover this). Then right-click over the test step and “Add Extraction Rule”.
Continue reading

Visual Studio & DSL

Well, who would have thought it – buried amongst the multitude of largely unsued tools in Visual Studio,  is a DSL creator tool. Firstly, you need to install the Visual Studio 2010 SDK, then install the Microsoft Visual Studio 2010 Visualization & Modeling SDK.  Then create new project New Project -> Other project types -> Extensibility -> Domain Specific Model Designer.   Select a DSL template that best suits the aim of your DSL project.  Video tutorial is a overview of using the SDK with UML.

Continue reading

How to code with no standards … by .NET

Coding standards on .NET projects is traditionally poor – I don’t know if this is related to the type of developer who ends up in .NET world, or the awkward nature of the main toolset (Visual Studio). Or a general problem endemic in modern developers – we all have our unfavourite tasks, but we are working in a business – it’s not a “pick ‘n mix” scenario.
Continue reading