Automation

Combinatorial And Pairwise Testing With NUnit

Posted on

I discovered these features after a tip off from Jason Gorman. The CombinatorialAttribute and PairwiseAttribute in NUnit. Test Analysts will already be very familiar with combinatorial testing and pairwise testing as they are fundamental test planning techniques. The short version for those who haven’t come across them before is that: Combinatorial – test every possible […]

Programming

Useful SpecFlow Regular Expressions

Posted on

Here are some useful regular expressions that can improve your SpecFlow step definitions. All of the examples are ready to drop-in to a  C# string, so they are pre-escaped for your pleasure (for example, the useful RegEx ([^\”]*) is listed as “”([^\””]*)”” so you can use it in a definition like this: [Given(@”this line accepts […]

Automation

Selenium Page Object Elements

Posted on

If you are using Selenium WebDriver to automate your browser testing, you will almost certainly have come across a variation of the following code. In fact, in many cases you will have found this kind of thing scattered all over the place. IWebElement nameInput = driver.FindElement(By.Id(“name”)); If you are using this to grab elements all […]

Programming

NSubstitute vs Moq vs FakeItEasy vs Rhino

Posted on

The long and short of this article is that I tried out a whole load of mocking frameworks and decided I liked NSubstitute the best. This is currently a reasonably simple decision, because on the whole, Moq, FakeItEasy, Rhino, JustMock and many others besides are all essentially syntactical best friends. There may be some minor […]

Programming

Overloaded Steps In SpecFlow

Posted on

This can be a pretty common situation in SpecFlow, thanks to the trusty default RegEx that SpecFlow uses: Scenario: Binding Test Given I have defined a step for the second line of this specification, but not the third And this line accepts “a string” in And this line accepts “a string” in and “another string” […]