Programming

Web Farm Cookie Encryption in ASP.NET

Posted on

If you want to secure a cookie, you need look no further than the System.Web.Security MachineKey class. Using this class, you can protect and unprotect text quite simply. If you are running without load-balancing, you can skip to the wrapper methods at the bottom of the article, which give you methods for protecting and unprotecting […]

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 […]