What is Mocking? - Concepts and Best Practices - Software Testing Series #2

  Рет қаралды 37,768

Lucas Paganini

Lucas Paganini

Күн бұрын

To mock or not to mock?
It's a good question that not everyone knows the answer to when developing tests.
To answer that, you need to know the concepts around mocking, what fake data and fake interactions are, the pros and cons, etc.
🚨 Subscribe to the newsletter: www.lucaspaganini.com/newsletter
📧 Email: me@lucaspaganini.com
🐦 Twitter: / lucaspaganini
📸 Instagram: / lucaspaganini
----------
CHAPTERS
0:00 Introduction
1:01 Fake Interactions
1:48 Fake data
2:25 When to mock
2:39 Mocking pros
4:02 Mocking cons
5:36 Best Practices of Mock Testing
7:02 Don't Stop Here
RELATED
1. Static, Unit, Integration, and End-to-End Tests Explained - • Static, Unit, Integrat...
REFERENCES
1. How to test software, part I: mocking, stubbing, and contract testing - CircleCI: circleci.com/blog/how-to-test...
2. What is Mocking in Testing? - Piraveena Paralogarajah on medium: / what-is-mocking-in-tes... )
3. What Is Mocking? - Typemock Blog: www.typemock.com/what-is-mock...
4. Hand-rolled mocks made easy - InfoWorld: www.infoworld.com/article/207...
5. xUnit Test Patterns: Refactoring Test Code - Gerard Meszaros on xUnit Patterns: xunitpatterns.com/
6. Generate dynamic mock data with Mockoon templating system - Mockoon: mockoon.com/tutorials/generat...
7. request - Cypress Documentation: docs.cypress.io/api/commands/...
8. Mock Testing - Devopedia: devopedia.org/mock-testing
9. Faker - Generate massive amounts of fake (but realistic) data for testing and development - Faker-js on GitHub: github.com/faker-js/faker
10. Retry, Rerun, Repeat - Cypress Blog: www.cypress.io/blog/2020/12/0...
11. Test Doubles: Can You Tell a Fake From a Mock? - WWT: www.wwt.com/article/test-doub...)
12. What's the difference between faking, mocking, and stubbing? - Stack Overflow: stackoverflow.com/questions/3...
13. Mocks Aren't Stubs - Martin Fowler: martinfowler.com/articles/moc...
#typescript #programming #testing

Пікірлер: 13
@LucasPaganiniWeb
@LucasPaganiniWeb Жыл бұрын
🚨 Join the waiting list for my ✨Web Animations Course✨ to get a discount when the course launches: www.lucaspaganini.com/web-animations
@poojasingh-pw9fe
@poojasingh-pw9fe Жыл бұрын
Bbye z
@pirategirl94best
@pirategirl94best 7 ай бұрын
Extremely good explanation to a confusing concept
@anupsingh24
@anupsingh24 Жыл бұрын
Great content and presentation.
@LucasPaganiniWeb
@LucasPaganiniWeb Жыл бұрын
Thanks! 🙂
@suriyav3466
@suriyav3466 Жыл бұрын
Thanks
@LucasPaganiniWeb
@LucasPaganiniWeb Жыл бұрын
You're welcome! 🙂
@yaregobrozek3725
@yaregobrozek3725 Жыл бұрын
What a nice video, I think it was a little painful to produce!
@LucasPaganiniWeb
@LucasPaganiniWeb Жыл бұрын
It was! Hahaha Rule of thumb is: You compare the interval between a video and the video posted before that one. If the interval is larger than 2 weeks, then you know it was painful to produce it haha
@iagosilva8573
@iagosilva8573 Жыл бұрын
Dudeee, Great content really. I can't imagine the amount of effort that you and your team put in it, congraaaaaats 🎊 You had mention about continuous integration, a video about which tool you guys use would suit well. See ya
@LucasPaganiniWeb
@LucasPaganiniWeb Жыл бұрын
Thanks a ton! There's a lot to say in the topic of CI, but just to give you an overview: For CI orchestration, we mostly use Github Actions; For testing, static checks with ESLint and TypeScript, unit and integration tests with Jasmine, and E2E tests with Cypress. We are also playing around with Jest, so we might replace Jasmine with Jest. But so far, our recommendation is Jasmine. Hope that helps!
@internetexplorer7880
@internetexplorer7880 2 ай бұрын
Mocking is stupid
C++ testing with mocks is EASY and awesome!
10:00
Smok Code
Рет қаралды 18 М.
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 36 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 24 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 498 М.
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 67 МЛН
Thoughts About Unit Testing | Prime Reacts
11:21
ThePrimeTime
Рет қаралды 215 М.
What is a Type Guard - TypeScript Narrowing #1
4:04
Lucas Paganini
Рет қаралды 8 М.
Golang's Mocking Techniques - Kyle Yost | hatchpad Huddle
41:20
JavaScript Testing - Mocking Async Code
18:05
Academind
Рет қаралды 145 М.
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 92 М.
How Well Designed Is Your Microservice?
19:44
Continuous Delivery
Рет қаралды 31 М.
Mocking Axios in Jest + Testing Async Functions
17:43
Leigh Halliday
Рет қаралды 83 М.
Mocking a Database in Node with Jest
13:29
Sam Meech-Ward
Рет қаралды 65 М.
What is Mock testing ( MOQ) ?
12:36
.NET Interview Preparation videos
Рет қаралды 198 М.
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
ALSER kz
Рет қаралды 342 М.
Лучший браузер!
0:27
Honey Montana
Рет қаралды 803 М.
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 925 М.
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 8 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 13 МЛН
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 1,9 МЛН