Using Playwright and the WebApplicationFactory To Test Your Blazor Application

There are many posts around Playwright .NET. These cover set up and running it against hosted sites.

What I didn’t find many posts on, was running Playwright .NET using Microsofts WebApplicationFactory. Why? Because it isn’t as simple as implementing the WebApplicationFactory with Playwright .NET and hitting run.

I’ll show how you can create a CustomWebApplicationFactory that will allow you to run your Playwright .NET tests locally using the WebApplicationFactory in .NET 6.

Before getting into the post, I want to give a shout out to Martin Costello. By viewing his solution in GitHub I was able to get my solution working and to write up this post.

Read More »

Running Docker Containers from within your .NET Core Application using Docker.DotNet

In the past, I’ve run into trouble running integration tests against docker containers. Let me give you a recent example, I’ve been working with AWS DynamoDB, when it comes to testing, I don’t want to run my integration tests against either a real or a mocked DynamoDB table. It just so happens that AWS provides us with a DynamoDB docker image, this allows us to spin up a local instance of DynamoDB inside a Docker container.

Read More »

AWS DynamoDB – Add and Get Items in .NET Core Using the AWS SDK for .NET

In this blog post we are going to look at the Put and Get DynamoDB operations. First we will look at how to Add ‘Put’ an item onto a DynamoDB table, then cover how we ‘Get’ either a single item or all items from a DynamoDB table.

If you haven’t already read my previous blog post on Creating an AWS DynamoDB Table in .NET Core that is a good place to start. We covered creating a DynamoDB client and assigned Access and Secret keys to the client. We then used the client to create a DynamoDB table.

Let’s start this post by looking at DynamoDBs PutItem.

Read More »

DynamoDB – Creating Tables Using the AWS SDK for .NET in .NET Core

Amazon Web Services (AWS) is a cloud services platform, they offer compute power, database storage, content delivery and other functionality that help users build and host infranstatuce.

This blog post is the first part of a series where I will go through how to interact with different components that AWS offer.

The first part of the series will look at DynamoDB, this series will also be broken into separate parts so each blog post will focus on one or two pieces of functionality from each feature.

In this blog we will be looking at creating a DynamoDB client, then using that client to create a DynamoDB Table.

Read More »