Category: Tests

Programming, Quality, Tests, Unit tests

Unit tests: code coverage – line coverage vs branch coverage

Quite often we can meet with a statement that code coverage should be x% where usually x = 80. But what is exact meaning? Is it line coverage or branch coverage or something else? Typicaly developers are using line coverage as most of software supports it however much more meaningful is branch coverage. Let’s take …

.NET, .NET Core, BDD, C#, CSharp, Library, Programming, Quality, Tests, Unit tests

SpecFlow – BDD in C# – induction

BDD – this acronym stand for Behavior Driven Development. This methology has been built using concepts of TDD (Test Driven Development) and DDD (Domain Driven Design). This type of tests is often done as integration tests (UI tests or API). One of the most popular libraries is SpecFlow. I was using this solution for Xamarin, …

.NET, C#, CSharp, Library, Programming, Tests, Unit tests

Fluent Assertions in unit tests

As a continouation of the article about unit test frameworks I would like to introduce Fluent Assertions. This framework simplifies testing by BDD style syntax. Let’s start from basic assertion. As you noticed, first is going the result, then the keyword (or rather extension method) Should() and at the end the condition (so in case …