The cleanest way to use Docker for testing in .NET

44779
121
1996
25.07.2022
Nick Chapsas

Nick Chapsas

14173719
145000
293
29.11.2011
GB
Описание видео:

Check out my courses: 🤍nickchapsas.com Become a Patreon and get source code access: 🤍🤍patreon.com/nickchapsas Hello everybody I'm Nick and in this video I will show you how you can quicly spin up and tear down docker containers specific to your test executions. This is only a fraction of what I show in my Integration Testing course so if you want to learn even more cool topics like this check 🤍nickchapsas.com out. Workshops NDC Oslo | 26 – 30 Sept | 🤍bit.ly/ndcoslo2022workshop NDC Sydney | 10 – 14 Oct | 🤍bit.ly/ndcsydney2022workshop dotnetdays | 20 – 22 Oct | 🤍bit.ly/dotnetdays2022workshop NDC Minnesota | 15 – 18 Nov | 🤍bit.ly/ndcminnesota2022workshop NDC London | 23-27 January 2023 | 🤍bit.ly/ndclondon2023 Give TestContainers a star on GitHub: 🤍github.com/testcontainers/testcontainers-dotnet Don't forget to comment, like and subscribe :) Social Media: Follow me on GitHub: 🤍bit.ly/ChapsasGitHub Follow me on Twitter: 🤍bit.ly/ChapsasTwitter Connect on LinkedIn: 🤍bit.ly/ChapsasLinkedIn Keep coding merch: 🤍keepcoding.shop #csharp #dotnet #testing

Кадры из видео
The cleanest way to use Docker for testing in .NET
The cleanest way to use Docker for testing in .NET
The cleanest way to use Docker for testing in .NET
The cleanest way to use Docker for testing in .NET
Тэги из видео
Комментарии пользователей:
The GenX Gamer Guy
2022-08-27 07:00:58

Or save yourself a lot of headache and get rid of all this 1970s "SQL" nonsense.

No-SQL databases are far superior and much more easy to integration test against.

David Mata Viejo
2022-08-20 17:39:05

Great video Nick. How would you do it if some tests do need to run sequentially and need the information from the results from other tests?

Andrei Claudiu
2022-08-19 19:11:48

Hey! I've been using Fluent Docker(or Ductus for some) for running integration tests inside a Docker container for over a year now and it has been great so far. I didn't even know there are any alternatives to it before I stumbled upon on your video. However, after watching your video, I would love if you could do a small parallel between the two of them as I am sure there are some differences or other things that one does better over the other. Great video again and can't wait to see you in Romania!

Guilherme Augusto
2022-08-12 04:28:27

I tried reproduce the steps and an exception was thrown (Testcontainer has not been created), the database used is MySql 8

I noticed the method InitializeAsync of IAsyncLifetime isn't being reached, is there some chance of the issue being related at MySqlTestcontainer?

tplummer217
2022-08-04 12:47:45

Nick is great at showing us hidden gems like this. Great work!

K V
2022-08-03 20:42:27

Thanks for the yet another great video. Is there a way we can run these in the devops pipelines? What are the pre-req for the same?

Ильдар И
2022-08-03 20:33:55

Hi, Nobody asks how much RAM these tests consume and if the container go down, i suppose the test will fail.

Paw Baltzersen
2022-08-02 08:45:45

Nick, I have a request for your videos, please turn on tracking of the selected file in the solution explorer pane. This would help to better keep track of the selected file when you sometimes go a bit fast between file.
Love your content.
See you at NDC Oslo!

SpicyCoders
2022-08-02 06:59:09

This looks similar to FluentDocker, that you presented in one of your videos "5 open source .NET projects that deserve more attention"
Very useful, Thank you

Harikrishnan R
2022-08-01 12:18:02

Hi Nick, we do have similar problem, however we are using UI testing and cant run the tests in parallel. Any solution for these scenario, great if you could do a video on running UI testing parallel.

Kevin Dammann
2022-07-31 22:05:31

One question which came in my mind regarding those containers is: What if I want to have the testdatabase created by an ef core migrator?

Augustine Gyawu Adjei
2022-07-30 17:23:52

Amazing introduction. Thanks Nick!!

Vedran Mandić
2022-07-30 16:15:33

This is gold. Really. No more need to complicate with multiple DB services in CICD or docker-compose just to bring up databases. Thanks!

Anson Wells
2022-07-29 13:17:04

Thanks for this video Nick. I have struggled for awhile getting CI integration tests working for a realistic scenario. We use Azure DevOps CI and our solutions are .net core 6 with ef core 6 with Azure SQL DB. My solution during CI is to start the mssql localdb service after my build. The web app points to the localdb, my app seeds it with test data and then run all the tests. This effectively tears down every run and we have a clean new database everytime. Love all your videos! Great work!

Moran Monovich
2022-07-28 14:47:13

This is a brilliant video. Thank for the info

zeljko
2022-07-28 11:29:38

How does this compare to Respawn, is it faster or slower? With Respawn you can't have parallelism but you're not creating/destroying DB for each test. This looks awesome but it seems like it would be resource-intensive and slow since it has to create DB, apply migrations, run a test, then destroy DB - all this for each test.

oxido A
2022-07-28 10:22:12

Who you are teaching Docker with vscode?? Be serious pls

Pianochess 1
2022-07-27 17:17:37

Interesting! How did you run the initial migration scripts (ie creating the customer table)?

Anymn
2022-07-27 16:23:20

Nice video, but can you use timestamps next time? It's a very handy feature that helps people finding the parts they do know / didn't know yet, saving valueable time

Что ищут прямо сейчас
svarkaqilishusullari zxcursed Hisui расти механик ureyim sensen menzure მეტეხი Park Hee von rəsmi kanal dainik rashifal phasmophobia гайд lucas dobre Speak Malay Like a Local Raon Queen Fox Rihanna dinosaur survival game ดรีมมีน paper pencil box อาหารสัตว์ al araf guru purnima images
Похожие видео
30.03.2022
Writing C# without allocating ANY memory

Writing C# without allocating ANY memory

21.07.2022
Goodbye controllers, hello Minimal APIs - Nick Chapsas - NDC London 2022

Goodbye controllers, hello Minimal APIs - Nick Chapsas - NDC London 2022

06.04.2021
Writing robust integration tests in .NET with WireMock.NET

Writing robust integration tests in .NET with WireMock.NET

11.05.2021
Stop wasting server resources by properly using CancellationToken in .NET

Stop wasting server resources by properly using CancellationToken in .NET

05.01.2022
You are doing .NET logging wrong. Let's fix it

You are doing .NET logging wrong. Let's fix it

31.08.2022
How IEnumerable can kill your performance in C#

How IEnumerable can kill your performance in C#

29.11.2021
How to write

How to write "smarter" enums in C#

09.09.2021
5 open source .NET projects that deserve more attention

5 open source .NET projects that deserve more attention

26.03.2021
Elegant Acceptance Testing in .NET with SpecFlow

Elegant Acceptance Testing in .NET with SpecFlow

01.08.2022
Testing your C# code reliably by freezing it in time

Testing your C# code reliably by freezing it in time

07.09.2022
The CORRECT way to implement Retries in .NET

The CORRECT way to implement Retries in .NET

04.09.2021
In defence of .NET Minimal APIs | Refactoring

In defence of .NET Minimal APIs | Refactoring

07.07.2022
SingleOrDefault or FirstOrDefault? When LINQ might harm you

SingleOrDefault or FirstOrDefault? When LINQ might harm you

28.07.2022
How to test

How to test "untestable" code in .NET

15.07.2022
The NEW caching you should be using in .NET 7

The NEW caching you should be using in .NET 7

24.09.2022
The RIGHT way to deal with Date and Time in C#

The RIGHT way to deal with Date and Time in C#