15 Aug 2023
Playwright is a tool for end-to-end (e2e) browser testing. Most business logic usually requires a logged-in user, so we need to authenticate the test user from our code programmatically.
One of the challenges of automatic login in e2e testing is 2-factor authentication or 2FA. Even though it doesn’t make much sense to have 2FA enabled for test users, being able to log in with a 2FA user can be very handy sometimes.
In this article, we explore how we can utilize an authenticated browser state and manual login to bypass 2-factor authentication in our playwright tests.
>>> Continue reading <<<
09 Aug 2023
Moq is a popular .NET library primarily used for unit testing. Distributed as a NuGet package, its main purpose is to help with mocking dependencies, a technique heavily used to test small blocks of code in isolation.
To many developers’ surprise, there is a new proprietary dll included in the latest 4.20
package version. The dll contains the code of SponsorLink, a new tool developed by the Moq’s author that tries to facilitate Open Source Projects support. It does it by reading email addresses from local git configs, and although it is claimed users’ privacy is respected, many people still find this practice wrong, dubious or even borderline illegal.
>>> Continue reading <<<
07 Aug 2023
In a previous article we explored how we can enforce code style in a solution with dotnet format --verify-no-changes
.
Today we are discussing a rule that can be enabled in the .eidtorconfig
file and potentially interfere with your local git settings so that dotnet format
fails in the CI build but produces no errors locally.
>>> Continue reading <<<
05 Aug 2023
Today is part 3 of our miniseries on dotnet publish
and Docker images. In the first one we reviewed how we can generate docker images locally, in the second one we pushed our image to Azure Container Registry with Service Principal authentication from our local environment, and today we will publish our image to Azure Container Registry from our CI build, namely Bitbucket Pipelines.
>>> Continue reading <<<
03 Aug 2023
In the previous article we explored how we can generate docker images of .NET applications and push them to the local Docker Desktop daemon.
Let’s now review how we can push a Docker image to a remote registry. We’ll be using Azure Container Registry as our destination, although the process is similar for all Docker Registries.
>>> Continue reading <<<