Mutation testing

Mutation testing is a way of judging the quality of your tests, just as tests are a way of judging the quality of your code.  Usually, the tests that mutation testing works with are automated unit tests.  In theory it could apply to manual and/or higher-level tests like integration or system tests, but I hope … Continue reading Mutation testing

Named parameters with default values can help unit tests

Introduction I find myself using default values much more in unit tests than in production code.  That is, I do it more often, and use more parameters with defaults per method.  This isn't because default values are bad, but they are often particularly useful when setting data up for unit tests.  It makes the tests … Continue reading Named parameters with default values can help unit tests

Automated testing of a website: Dealing with the database

This article proposes an approach to handling the fine-grained parts of the database parts of an automated system test of something like a website.  You would need other things for the remaining jobs: To orchestrate the test, something like SpecFlow; To interact with the website, something like Selenium; To do the bulk updates to the … Continue reading Automated testing of a website: Dealing with the database

Balancing big picture and details when coding, testing and documenting

Introduction I very much hope that this avoids being a rant.  I also hope it avoids being self-indulgently clever rather than being helpful.  Finally, I understand that people learn in different ways; I think I like images and like to get the big picture before getting into detail.  Other people like to be led along … Continue reading Balancing big picture and details when coding, testing and documenting

SpecFlow + Selenium: The engineering behind decent Gherkin files

This article is in a series about Selenium and SpecFlow Introduction Why bother? Basic plumbing Page objects The engineering behind decent Gherkin files UPDATE: please see another article I've written on the costs and benefits of the approach I describe below. Summary If you are writing the implementation of your SpecFlow + Selenium tests, you … Continue reading SpecFlow + Selenium: The engineering behind decent Gherkin files

Making SpecFlow + Selenium testing easier with Page Objects

This article is in a series about Selenium and SpecFlow Introduction Why bother? Basic plumbing Page objects The engineering behind decent Gherkin files Introduction Page Objects are things that shield the rest of your test from the details of the website under test.  At one end they understand all the text boxes, selects, ids, CSS … Continue reading Making SpecFlow + Selenium testing easier with Page Objects