Skip to main content

All posts with Tag Testing

Preview image blogpost

Adding test description for data-driven tests in xUnit

Often times, you find yourself in writing data-driven tests in xUnit (like Theory tests) and you want to add a description to each test case. Let's explore how to do that.

Read article

Preview image blogpost

How to test HttpClient inside API Tests

I am a great fan of API tests. I do like to utilize the WebApplicationFactory for this. I even wrote some articles about this in the past "Introduction to WebApplicationFactory". But what if we need to "mock" HttpClient calls inside our tests?

Read article

Preview image blogpost

From Testing Pyramid to Diamond

In this article, we will discuss the testing pyramid - what it is and what are some problems with that.

We will also discuss a different approach: The testing diamond.

Read article

Preview image blogpost

Anonymous test data with AutoFixture

Often times we have unit or integration tests that rely on some input data. The easiest solution is just to take some hard-coded values and move on with life. This has some major downsides:

Giving specific values in a test carries meaning, but we are often times not interested in that. We just need to pass the object around to fulfill the API. Also the simplest solution to fulfill your test is literally checking against those values.

Here is an elegant solution to that problem: AutoFixture. I will show you what it can do, especially in combination with xUnit.

Read article

Preview image blogpost

Introduction to WebApplicationFactory

This article will show you what exactly a WebApplicationFactory is and why it is so "mighty" when it comes down to testing. I will highlight some of the properties, which you can leverage to write powerful tests.

Read article

An error has occurred. This application may no longer respond until reloaded.Reload x