Great Visual Studio integration - another of the many reasons to upgrade to SpecFlow 1.9

This is a small tribute to a great tool. Mostly for fun but there are some great stuff in the latest release of SpecFlow. Check it out. And get the tool from the Visual Studio Gallery, but be sure to uninstall any previous versions first. For more serious look on some of the code features, head over to Vagif Abilov’s excellent post. Marcus enters the office. He boots up the computer and opens Visual Studio 2012. With a smile he thinks about that not only Vs2010 solutions opens nicely in Vs2012 but also the new release of SpecFlow works fine for both. Where was he now again. There were something about the feature file. He opens it and due to the nice color coding of lines, Marcus is reminded of one of the steps that he didn’t had written a step definition for. “Then the result should be 120”… “This...
Read More

Experience report from rolling out agile in a big (120+ ppl) organization

I just ended my biggest coaching assignment in my career. So far. It started in January and aimed to roll out agile in a organization of 120 (and then some) people – 60 on the business side and 60 on the IT-side. I first thought of writing about how it all went down and what we did, but I then realized that I would reveal way too much about the customer and it’s organization. So instead I’ll write about a couple of things that I’ve experienced and thought of. Hopefully you can learn something from this - i know I did learn a lot. Let me first state that not everything in this article is based from experience from this one client. If you read this and work there; not all of this happened at your place. Know this - it’s the same at a lot of places where I’ve...
Read More

What BDD is all about

I got an email from a colleague a couple of weeks back. We were members of the same team for awhile this last autumn. He (and the rest of the team) are great programmers - way better than me. I had some difficulties to keep in step with them, but to some extent that had to do with F# being the language of choice. A first for me! We had a lot of discussions about TDD and if it’s feasible or pay off. This project made me realize that TDD done backwards (writing unit tests after the production code) is not only NOT TDD but also doesn’t pay off.  But as I am dunked deeply in the BDD pool I suggested that we’ve take a look at that and get started that way. I never got through there… So I was very happy when he wrote me an email with a link to an article that...
Read More

System.InvalidOperationException No automation provider available MsTest and FluentAutomation

We’ve run into a little issue with FluentAutomation and using MsTest at my current client. I’ve blogged about the setup before but then I used NUnit and everything worked just fine. With MsTest… we had some problems. The first was an exception that was thrown to us like above: System.InvalidOperationException: No automation provider available It was a quite awhile since I’ve used MsTest and I’ve forgot about some of it’s quirks. With the combined help of Håkan Forss and Hugo Häggmark I managed to get this to work. Scroll to the end for the short version, by the way. The first thing that I had forgot was that MsTest uses a Visual Studio project template of it’s own. You cannot use the Windows Class Library template, but rather should use the Test project (under the Test-category). Once that was out of the way – we hit the error message above....
Read More

Find the control–a way to stabilize UI automation… a bit

I have been diving deep into automating web pages for my current client. I have a love – hate relationship with this. It’s quite cool but I would also recommend against using it. I wrote about why just a post or two ago so I won’t repeat it here. In this post I will instead acknowledge the fact that we are going to automate against the web page and do our best to handle the brittleness of such tests. One challenge that you are facing when writing code to automate elements of a page is to actually get hold of the elements themselves. This is done in different ways with different automation framework, but typically you can search by Id (or other attributes on the elements), order in the page and position. In this post I will examine those different approaches and suggest one way that I’ve found very useful...
Read More

Ask simpler questions–agile for non-techies III

A couple of years ago I attended a course with David J Andersson, father of Kanban, on Kanban. I learned tons of stuff that I now use everyday but one quote really stood out for me. We were talking about prioritization and how it’s often hard to get business users to put values on a certain item and thus making them hard to prioritize. David said: If you get a bad answer you have to ask a simpler question I think it’s brilliant. It’s actually up to us to help them be able to answer the question we want. So we have to help them understand the question better. (In this case you might ask them to draw a graph showing the possible revenue or cost or something). Since then I’ve been carrying this thought with me; ask simple questions. And then all of a sudden it dawned on me;...
Read More

SpecFlow, page objects and FluentAutomation

I’ve been putting together a sample for my client on how to automate against a web page. The purpose is to show how the tools are used and give a starting ground for training and elaboration. When I was done I realized that this could be useful for many – so here is my story on how I set this up, problems I’ve ran into and solutions to them and the code. Please join me on the journey! Why test against the UI now again? The first thing to notice that testing against the UI is not the best thing you can do. There’s an excellent article on that by Gojko Adzic here. But sometime you don’t have much choice, the application may not be in shape for writing tests against a level under the UI, or you don’t have access in (or knowledge about) the code base. In these...
Read More

Deploying often is better–agile for non-techies II

This is the second post of some of the things that I find myself talking to business people (and some technical folks too for that matter) when trying to explain agile thinking. Here is the first if you want to read that. Again, the disclaimer, this is mostly stated before and probably doesn’t contain much new stuff if your an agile ninja guy. Please don’t flame me - I’m trying to explain this to people who have done other stuff while you and i was geeking out in agile. One thing that very often comes up is this notion of deployment, and maybe that we rather make small deploys to the production environment often rather than big one seldom. For some that might seem like a no-brainer but actually it’s quite the other way around in most big companies where I’ve been. Let me tell you such a story; I...
Read More

Fixed price is bad for you - Agile for non-techies part I

This post need to start with an disclaimer; I write this since I have run into several people to which these thoughts are new and confusing. If you are an agilista you will not find anything new or exciting here. Really… there’s nothing new to see here. Go away you scrum-lovers - this is not aiming for you. How’s that for scaring people away from a blog post. If you’re still around… Anyone… Hello? Ah - there you are. Well – let’s get started then. I recently have introduced agile in a large company and tried to do it through the whole company, business and IT working together in brotherly company. As you can imagine I ran into some problems. And still to this day we need to explain for the business why they would and probably should look into agile thinking (or was it lean maybe?). I was thinking...
Read More

Applying the Switch framework to developers don’t want to write tests–part III

This is the last post in my series on how to motivate developers to write test for their code. Please read the first two posts to get some context (part 1 and part 2). This post talks about the last part of the Switch Framework – Shape the path. This is all about making the change easier by helping our rider and elephant to get a smooth path to walk on as they change. Tweak the environment This talks about changing the environment in which the people we’re trying to change so that it’s easier to change than to not. Microsoft lately has use the expression; “help developers to fall into the pit of success”. I like that a lot – that’s what we want here; it should be easier to do right than to not to. Everything you can do here to get the tooling out of the way...
Read More