Writing tests in .NET using xUnit -  xUnit Tutorial

Writing tests in .NET using xUnit - xUnit Tutorial

Nick Chapsas

5 лет назад

131,738 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@adamlasry5225
@adamlasry5225 - 05.09.2023 18:54

Brilliant. Thanks.

Ответить
@barwalgayatri4655
@barwalgayatri4655 - 10.06.2023 20:07

Too good and informative videos Nick. proud to be ur subscriber :)

Ответить
@cyberdragon852
@cyberdragon852 - 27.03.2023 13:03

Very helpful thank you

Ответить
@longb1913
@longb1913 - 19.02.2023 00:51

where do u get CalculatorState from in the calculator class? wtf

Ответить
@taylorjonl
@taylorjonl - 20.01.2023 19:59

Great beginner video but the information about the tests running in parallel is incorrect. Tests within a class will not run in parallel because by default xunit create a test collection per class. You can switch the behavior to create a collection per assembly but you can't go to a lower level than class AFAIK. Also, if you use CollectionDefinitions that use fixtures, you need to ensure you define the CollectionDefinition in the assembly with the tests, otherwise the fixtures part of the CollectionDefinition isn't recognized and it won't create the fixtures, silently failing. After 4 hours I found single sentence in the documentation that states this.

Ответить
@ghostslinger3148
@ghostslinger3148 - 27.04.2022 17:54

Hi Nick, great video!
Do you have a video going through unit tests using InMemoryDatabase db context?
I run into problem "An item with the same key has already been added" when running multiple unit test files when initializing the same context even when i already added IDisposable and EnsureDeleted.
Is it just bad to do unit test using this way?

Ответить
@ibknl1986
@ibknl1986 - 20.03.2022 10:07

Nice video.

Ответить
@TarekFaham
@TarekFaham - 18.03.2022 08:33

Thank you so much...

What if you want to initialize selenium chrome driver using some parameters how you will inject it in the constructor?

Ответить
@zevspitz8925
@zevspitz8925 - 21.02.2022 23:36

Why does TestData need to be an iterator function? Let it return the data from a static field.
(Or better yet, allow MemberData to use fields directly; but that's apparently an xUnit design choice.)

Ответить
@Chiramisudo
@Chiramisudo - 11.02.2022 01:24

Outstanding! This is the ideal video for me. A bunch of real code examples showcasing the full feature set (or at least the most important ones) along with a little explanation as to limitations, use cases, etc. Perfecto!!

The only constructive criticism I have is that (on my desktop speakers at least) the sound is a bit muddled and bassy for voice.

Ответить
@zerosandones7547
@zerosandones7547 - 18.01.2022 10:27

Do we need to suffix "Theory" in every [Theory] method? Like is it best practice?

Ответить
@BeansEnjoyer911
@BeansEnjoyer911 - 18.12.2021 08:32

I wasn't convinced. But about a third of the way through.... This is amazing! Will definitely look into this package

Ответить
@medachref7167
@medachref7167 - 18.11.2021 14:03

hahaha because my pc is too fast

Ответить
@muhamedkarajic
@muhamedkarajic - 03.09.2021 12:23

Great Tutorial Indeed!

Ответить
@tuberklz
@tuberklz - 02.09.2021 13:51

yet again great tutorial. thanks for all the effort

Ответить
@harag9
@harag9 - 11.07.2021 00:06

Thanks for this, though it was quick, it's very useful... But - Who tests the tests?

Ответить
@compman73
@compman73 - 02.07.2021 23:40

Thank you
It was very helpful

Ответить
@lucianocuesta1170
@lucianocuesta1170 - 05.06.2021 00:54

what about Component test, can we use xUNIT for that propouse?

Ответить
@TonoNamnum
@TonoNamnum - 12.05.2021 08:48

Is it bad practice to use a static property containing the dependencies instead of using a context?

Ответить
@clearlyunwell
@clearlyunwell - 01.05.2021 20:08

👍🏽

Ответить
@Eamo-21
@Eamo-21 - 29.03.2021 23:41

just found your channel a week ago. Really high-quality content! keep it up

Ответить
@mdabuzar2130
@mdabuzar2130 - 25.03.2021 17:44

As usual, the best video.

Ответить
@noblenetdk
@noblenetdk - 25.03.2021 16:02

cool and informative as always. Would very much like to see you demonstrate winappdriver. Keep up the god work!

Ответить
@stratman1234
@stratman1234 - 19.03.2021 23:20

This has been a huge help. Before watching your video, I only know about [Fact] and [Theory][InlineData].

Ответить
@JesperPDk
@JesperPDk - 04.03.2021 03:12

It's so that I thought about whether you could make a video where you have a project, service, data and testing. It's because I'm in trouble compared to when I need something in service that I can not access the database. I have researched a bit in relation to stackoverflow around it and there I could read my way to "You can not use appsettings.json as Configuration in test project from Web project. If you want to use, you should make a custom implementation" Thanks for video.

Ответить
@MA-pt6ii
@MA-pt6ii - 31.12.2020 17:35

Hi Great video...I am trying to implement extent reporting using Extent reporting using Selenium c# with Xunit. are you able to guide me details of how to implement this in my framework

Ответить
@RandomVlogsToShare
@RandomVlogsToShare - 07.11.2020 14:06

Great video, nicely explained and you have kept it simple and easy to understand. Thank you.

Ответить
@igor5379
@igor5379 - 21.10.2020 20:14

thanks, bro!

Ответить
@donnyjoe7653
@donnyjoe7653 - 13.10.2020 21:47

Didn't expect this video to go beyond beginner's level and turned out to be extremely useful condensed and clear information. I just created a new private playlist for favorites to add this in. Mille Grazie! :*

Ответить
@fabrizziocht
@fabrizziocht - 07.08.2020 08:20

Great video, thank you!!

Ответить
@iwayansudiana4897
@iwayansudiana4897 - 28.07.2020 06:41

Thanks man! It helps me to start my testing.

Ответить
@saaddahmani1870
@saaddahmani1870 - 15.07.2020 01:49

Very very helpful video... thanks

Ответить
@soucianceeqdamrashti8175
@soucianceeqdamrashti8175 - 06.07.2020 17:19

Good tutorial!

Ответить
@vaibhavmalhotra5644
@vaibhavmalhotra5644 - 03.06.2020 10:57

how does your visual studio look so different?

Ответить
@alfredoquintanalopez2265
@alfredoquintanalopez2265 - 27.05.2020 22:05

Could you please make a video about NUnit? Thanks a lot!!!!!. Great videos!!!

Ответить
@davidpccode
@davidpccode - 20.05.2020 20:44

Great vid.. thank you!!

Ответить
@serhiihorun6298
@serhiihorun6298 - 22.03.2020 00:43

Great video, thank you!

Ответить
@mchen0901
@mchen0901 - 18.03.2020 01:15

Hi there, do you mind providing a tutorial for AssemblyFixture?
CollectionFixture doesnt work for me since it requires all involved tests to be executed sequentially, but I need parallelism
Thank you!

Ответить
@yassineyounes3479
@yassineyounes3479 - 28.02.2020 11:39

Great video! keep up the good work!

Ответить
@serhiihorun6298
@serhiihorun6298 - 23.02.2020 22:49

Thanks for the tutorials! They are superb!

Ответить
@sairk6174
@sairk6174 - 02.02.2020 05:23

AWESOME .. NICK THANKS FOR EXCELLENT VIDEOS ..CAN YOU PLEASE CHECK POSSIBILITIES FOR SOME VIDS ON CLIENT SIDE UNIT TESTING ..USING JASMINE??

Ответить
@vmamore
@vmamore - 26.01.2020 00:38

Awesome Nick, thank you!

Ответить
@flave11
@flave11 - 24.01.2020 16:56

Very nice

Ответить
@VG-vn8kk
@VG-vn8kk - 24.01.2020 16:54

Thank you very much for your videos, Nick! I'm learning a lot!

Would it be possible for you to create a little practical tutorial on how to test API controllers and services which talk to the database layer with xUnit?

Ответить
@Fasiibcs
@Fasiibcs - 24.01.2020 16:00

Your speed is too fast, I know about unit test but not know about xUnit so it is hard to grasp the detail that much quick.
Your videos are good, but please try to slow down your speed and explain thing is little more detail.

Ответить