testing

Specification by Example: Building The Right Things The Right Way

Specification by Example is a collaborative approach to defining requirements.

Specification by Example: Building The Right Things The Right Way

Specification by Example is a collaborative approach to defining requirements.

Chaos Engineering - Part 1: Simmy, chaos in code

Chaos Engineering is a hot topic and very cool to dive into. But knowing where and how to start can be a challenge. In this series, I want to demonstrate different sides and technologies you can use. In the first post: Simmy, a package to inject different kinds of chaos in a .NET project.

Chaos Engineering met Simmy & Polly

Dit artikel is eerder gepubliceerd op de website van Team Rockstars IT. Grote, online services zoals Netflix en Amazon doen het al jaren: Chaos Engineering, het in productie testen van bottlenecks en single point of failures met behulp van chaos. Dit kan op veel verschillende manieren: van het fysiek lostrekken van kabels tot het inbrengen van random gedrag in de code. De mate waarin je dit toepast is natuurlijk afhankelijk van veel factoren en heeft onder andere te maken met de gevolgen van downtime, of slechts deels werkende applicaties.

Using xUnit fixtures with SpecFlow

It can be a challenge to implement new frameworks or tools in your daily life. Often it takes time to find out the quirks and best practices which can take time and even lead to doubts and abandoning frameworks. I have been using SpecFlow for a while now and I keep finding new ways to tackle issues and get cleaner code behind the specs (I am still having trouble creating clean & clear functional requirements though).

One of the things I keep bumbing into is using settings and sharing code between different specs. In the following example I will explain my latest find: using xUnit fixtures to get test settings and reusable api clients for multiple tests.

Specflow and Eventual Consistency

SpecFlow is a tool which can be used to describe test scenarios and automate the tests. Although I have been using SpecFlow for a while now I never used it for advanced examples where time might be an issue. Lets show a simple example scenario first. A scenario, written in Gherkin, looks like this: Scenario: Add simple item with due date Given the user enters "wash my car" And the user adds a due date of "1-1-2022" When the user saves the item Then the item "wash my car" is added to the list And the due date is "1-1-2022" This scenario is easy to implement, the item will be added and stored.