Testing Microservices with Docker, Azure, and Visual Studio Team Services

Video | Englisch | Anspruch

This year, I had the opportunity to represent Microsoft at the Software Quality Day Tools Challenge in Vienna again. For this event, the organizers hand out a challenge in the morning. In the afternoon, all participants have to show how they solved it with their tools. This year's challenge was structured into three parts and so is the video.

The first part demonstrates how you can generate an ASP.NET Core server from Swagger/Open API metadata. The idea of the challenge was that a team quickly needs a mock for a RESTful Web API for which somebody has already defined a Swagger definition.

In the second part, we had to show how we create a service mock from scratch without a Swagger definition. Of course, I use ASP.NET Core again to showcase that we can solve the entire challenge based on open-source and cross-platform components. In the video, I also talk about different options where we can run the mock. You see it running locally on Windows, locally in Linux-based Docker containers, and finally in Azure based on Linux containers.

Last but not least we had to show how we can test the system. For that, we got a ready-made implementation of the service that we built the mock for in part one. This implementation was based on Java, so I used Docker again to isolate it inside a container and pushed it into Azure App Service. Next, I decided to make use the Swagger definition again to generate a .NET Core client (with AutoRest) that I can use for building my unit tests. Finally, I used xUnit to keep all base components open-source and cross-platform. In the video, you see the xUnit tests running locally in Visual Studio Code. Additionally, I demo how you can automate them in a Visual Studio Team Services build.

© Microsoft Channel 9. Lizenzierung durch die Creative Commons Attribution-Noncommercial-No Derivative Works 3.0-Lizenz.

Tags

Diese Seite weiterempfehlen