Organizing Tests With xUnit Traits

Once you start to have a larger number of tests it can be important to be able to break them down into different categories or groupings. From a functionality perspective this allows you to only run a subset of tests. They can also help to provide clarity or insight to your test code, by replacing … [Read more…]

Code Cooties: C# Basics for Testers

There’s a lot of fear and mysticism associated with code. As a result some testers treat interacting directly with code like its covered in cooties. Immediately taking evasive action to avoid the potential exposure to that life threatening imaginary playground disease. Seriously though, no matter how readable it may seem to those familiar, it’s easy … [Read more…]

Getting Started with xUnit pt. 2

Test Fixture Setup and Tear Down In the last xUnit post we covered how xUnit handles setup and tear down of tests by using the constructor for setup and implementing IDisposable for tear down instead of the usual attributes. That’s great but since xUnit instantiates an instance of the test class for each test, what … [Read more…]

Getting Started With xUnit

I’ve been an NUnit user and fan for years now, but it has limited support for dotNet core and Microsoft has adopted xUnit for many of its current open source projects. Between that and my current team using xUnit it’s a good time to start getting familiar with the framework. Even if you aren’t writing … [Read more…]

Data Driven Testing with Nunit 3

Data Driven tests are a nice way to reduce boiler plate code and offer the option for less technical users to contribute to test cases. We’ll be using nunit 3 for these examples so I’ll be covering the option for data driven tests and some of the changes for nunit 3.0. All the examples are … [Read more…]