Writing robust integration tests in .NET with WireMock.NET

  Рет қаралды 36,052

Nick Chapsas

Nick Chapsas

3 жыл бұрын

Become a Patreon and get source code access: / nickchapsas
Check out my courses: dometrain.com
Hello everybody I'm Nick and in this video I will show you how you can step your integration testing (or even acceptance testing) up using WireMock.NET. Third party APIs are a crucial part of a lot of applications and mocking them during integration testing can be really tricky. WireMock.NET is a library that can make your live so much easier by allowing your to cleanly create a mock version of the third party API that you're integrating with.
Given WireMock.NET a star: github.com/WireMock-Net/WireM...
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
#dotnet #testing #wiremock

Пікірлер: 23
@deathmachine808
@deathmachine808 3 жыл бұрын
You’ve got a really solid channel man. One day when I can actually stop working long enough to learn something else I’m going to be deep diving.
@kaiserbergin
@kaiserbergin 3 жыл бұрын
Nice work. Been using wiremock for some time, and I'm glad to see it getting some love on your channel. I started pointing my devs to your channel as you're constantly posting useful content and do a good job at keeping on top of current features and libs. Good work, man. Thanks.
@user-tp8xp1hj8e
@user-tp8xp1hj8e 2 жыл бұрын
me2, the company i work in also created a custom wrap over it, @Nick consider to also cover the topic of PACT testing
@darianferrer
@darianferrer 3 жыл бұрын
Great demo Nick! I've been using it for a couple of years and when building micro-services with multiple externals APIs it's very helpful. One thing that maybe you could expand on this topic is how to do recordings and playbacks, I've never tried that because its not that hard to setup manual requests/responses, but maybe you have experience on this.
@chamiz
@chamiz 2 жыл бұрын
Good work!. Thanks Nick
@dimamartyshchenko2265
@dimamartyshchenko2265 Жыл бұрын
Really nice ! Thanks for the video
@Mrnik123s
@Mrnik123s 2 жыл бұрын
Nice. Do I need to dispose of wiremock server after use ?
@vibes992000
@vibes992000 Ай бұрын
I would be much happier if you would have shown a more real life case scenario for wiremock i.e writing request /endpoints and response contracts pair in a separate external text file rather than building them from precompiled fluent syntax. Still a good video to get started and see internal workings of wiremock web service espeically its configuration via fixtures
@vespuxi2516
@vespuxi2516 9 ай бұрын
Beautiful
@ofiry
@ofiry 9 ай бұрын
Great video Nick, can u explain why this is better then mocking the httpclient
@aaronkoller8811
@aaronkoller8811 3 жыл бұрын
Wire mock does look like a great tool. Maybe I am missing something here, why not just use the Microsoft TestServer where in the client you can use Moq to mock any external dependencies/responses?
@StefHeyenrath
@StefHeyenrath 3 жыл бұрын
Correct, in the example code there is an interface (Refit) to connect to GitHub. So in this case, it was also possible to completely stub this using Mock. However in case the client, which connects to a 3rd party system, cannot be mocked, or if you want to run a more integration-test like test, then WireMock.Net can be used to mock the request with certain responses from that 3rd Party system. Also note that you can also use response templating, which enables you to create not just static responses but also dynamic response based on properties from the request.
@amazotv8382
@amazotv8382 Жыл бұрын
Hi Nick, can this be used with mstest framework and not xunit?
@clearlyunwell
@clearlyunwell 3 жыл бұрын
👍🏽
How to work with text in .NET like a pro with Humanizer
15:44
Nick Chapsas
Рет қаралды 34 М.
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 9 МЛН
Ну Лилит))) прода в онк: завидные котики
00:51
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 123 МЛН
КАХА и Джин 2
00:36
К-Media
Рет қаралды 4,1 МЛН
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 86 М.
Don't throw exceptions in C#. Do this instead
18:13
Nick Chapsas
Рет қаралды 248 М.
How to Implement API Versioning for Minimal APIs | ASP.NET Core 8
18:11
Milan Jovanović
Рет қаралды 11 М.
Automated UI testing in .NET using Playwright and Specflow
23:27
Nick Chapsas
Рет қаралды 40 М.
Don’t Do E2E Testing!
17:59
Continuous Delivery
Рет қаралды 149 М.
ASP.NET Core Web API Best Practices
15:49
Code Maze
Рет қаралды 4,3 М.
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 9 МЛН