I have the good fortune to from time to time give courses in TDD. I organize these events in two parts; one theoretical background part and then a practical part. During the practical part I found great use of Code Katas in general and the Bowling Ball Kata in specific. I really like the way that a kata helps you...
This is a well-known truth for all practicing agile methods. Introduction I’m currently working on a migration project with a fantastic team—possibly the best I’ve ever worked with. We’re converting a large VB6 application to VB.NET and WPF. Due to various reasons, we decided to do this in two phases: Migrate everything with a tool and then get it to...
Recently, I discovered two fantastic frameworks that have significantly improved my test code: Should and NSubstitute. Should I? Yes – You Should First up is Should, an assertion framework that enhances the readability and ease of writing assertions. Here’s an example showcasing its capabilities: object obj = new object(); obj.Should().Be.OfType(typeof(object)); obj.Should().Equal(obj); obj.Should().Not.Be.Null(); obj.Should().Not.Be.SameAs(new object()); obj.Should().Not.Be.OfType<string>(); obj.Should().Not.Equal("foo"); "This String".Should().Contain("This"); "This String".Should().Not.Be.Empty();...
I’m reading the excellent Switch: How to Change Things When Change Is Hard. And in it I stumbled on a interesting story, and when I started to think about how it could be applied in the Software development world I really got excited. But all in due time. Here is the story, in my shortened and simplified form (be sure...
In my last post I asked for comments, and it didn’t take Anders very long time to come up with a better and more correct solution to the problem. The downside of my solution is that you need to tweak the build process on a build server for example. We knew that BUT I left it for later solving. There...
[UPDATED]: See this post for a different way to do this. In our current team, we’re doing a lot of integration testing, which means we need a well-known state in the database before each test run. We have solved this with a simple restore of a known backup before each test run (using the handy BeforeTestRun attribute of SpecFlow). But...
Marcus Hammarberg embarks on an exploration of outside-in development with SpecFlow and ASP.NET MVC. In this narrative, he shares his journey from initial project setup to the implementation of specifications-driven code. Setting the Stage Excited about the opportunity to apply outside-in development practices to a real project, Marcus enters the office, ready to tackle the challenge. His project manager, Tobias,...
After working intensively with SpecFlow for a while now I have experienced something that I think is common. After a while you have all the steps you need… Or rather, if you write your step regular expressions carefully you’ll end up with a little language that automates the running of your application. So if you stay within the supported language...
I have been using White in our project for a couple of days now and it’s looking good I must say. I use White in conjunction with SpecFlow to get our specifications in an executable format (that still makes me smile everything I think of it…) What I soon realized was that much of the White-automating could be pushed to...
I’ve already posted this snippet in C#, but as I from time to time need it in VB.NET I’ll post that too. Here you go: <?xml version="1.0" encoding="utf-8" ?> <CodeSnippets xmlns="<http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <Title>TestMethod</Title> <Shortcut>tm</Shortcut> <Description>Code snippet for creating a test method</Description> <Author>Marcusoft (www.marcusoft.net)</Author> <SnippetTypes> <SnippetType>Expansion</SnippetType> <SnippetType>SurroundsWith</SnippetType> </SnippetTypes> ...