Laravel Feature or Unit Tests: The Difference

  Рет қаралды 24,297

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 28
@gaofan2856
@gaofan2856 2 жыл бұрын
Perfect video format. Watching your channel on daily basis while having breakfast. Please keep going with such short videos.
@mikusano4277
@mikusano4277 6 ай бұрын
This video gave me clear understanding about the concept of tests. Thank you!
@JouvaMoufette
@JouvaMoufette 2 жыл бұрын
An interesting thought I have regarding the mistake that was made a few times with a leading zero on time: I feel that if this was a real project, and there was no specific requirements stating how it should be formatted for a particular reason, I'd argue that if you're getting confused over the time, the time you keep thinking it was honestly just should be the way the time gets formatted. Obviously this was just for demo purposes, but I feel that if something is confusing in how software behaves, it's a bug.
@tprinty
@tprinty 2 жыл бұрын
Glad Everyone found this useful
@limpiadora
@limpiadora 2 жыл бұрын
I also heard that unit test usually runs faster because they don't interact with IO, and that's very important in CI/CD setup.
@xadierz1816
@xadierz1816 2 жыл бұрын
Thanks so much for your thoughtful and detailed videos! On to the soft!
@danielj4860
@danielj4860 2 жыл бұрын
I personally write a very high level test to ensure the feature is working as expected generally. For edge cases I'll write a unit test when needed. I only see value in tests to allow for future refactoring jobs to go smoothly. The reality in 90% of the time tests dont bring much value to the company in comparison to spending time writing new features. I would suggest looking up theprimeagen/theo unit test on youtube for a good discussion.
@techjeed9542
@techjeed9542 2 жыл бұрын
thanks for this video, now I understand how laravel test works
@KlethonioFerreira
@KlethonioFerreira 6 ай бұрын
Unit tests don't have access to facades by default so you would have to change the "extends TestCase", in the end you would have a Feature Test, if you make very complex.
@mayanksgajjar
@mayanksgajjar 2 жыл бұрын
Thanks for sharing such a valuable information with us 😊
@jtech04
@jtech04 2 жыл бұрын
I was just waiting for this
@26kito
@26kito 2 жыл бұрын
Hey povillas, just wanna thank you for your explanation about the difference between feature and unit test. Anyway, can you give us video about testing simple crud? I'm still confused with how to use test
@LaravelDaily
@LaravelDaily 2 жыл бұрын
I've created a course about it: laraveldaily.teachable.com/p/laravel-testing-for-beginners-phpunit-and-pest
@free2idol1
@free2idol1 Жыл бұрын
I have a gaming project in which one of the apis is to serve 2 functionalities:
 - assigning mission to user (mission is some sort of quest that once getting complete, user'd get rewards). - fetching a list of missions currently assigned to user. Each functionality has very complex logic inside and each requires seeding to make the test running. So if I want to test if these 2 functionalities, should it be called unit test or feature test? If its called unit test, meaning it would not require any seeding or DB call but there must be DB call in both cases. But how could it be called feature test when they are not the whole api end point? Any insight would be much appreciated.
@LaravelDaily
@LaravelDaily Жыл бұрын
I guess I would call "feature test" any test that touches a DB.
@muhammadumarsotvoldiev8768
@muhammadumarsotvoldiev8768 Жыл бұрын
Thank you very much
@llBestBoyll
@llBestBoyll 2 жыл бұрын
really useful one thanks man ❤️
@razvancomsa2276
@razvancomsa2276 2 жыл бұрын
Are api requests tests feature or unit tests ?
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Feature
@EDRDanielGdz
@EDRDanielGdz 2 ай бұрын
Titanic reference is legit.
@isabelpino1987
@isabelpino1987 2 жыл бұрын
my soft and no content plays, I would really appreciate so guidance on how to fix tNice tutorials problem so I can actually move pass tNice tutorials, thank
@Shyloo
@Shyloo 2 жыл бұрын
you are the best!
@djurdjabarjaktarevic3707
@djurdjabarjaktarevic3707 2 жыл бұрын
wondering if u would be willing to collab to make a . TNice tutorials would be my first and I would understand and apprehensions you may
@firdavs.ibodullayev
@firdavs.ibodullayev 2 жыл бұрын
I did not know about it
@hadizarrabi8192
@hadizarrabi8192 10 ай бұрын
cool
@ricko13
@ricko13 2 жыл бұрын
I always skip testing 🦋
@alexkhonko4115
@alexkhonko4115 2 жыл бұрын
most of your test should be feature test lol what?)) how about test pyramid?
@paulocardoso670
@paulocardoso670 2 жыл бұрын
Since I started to work with nodeJS many things have changed, testing with nodeJS (jest) it makes more sense and it's easier to write unit tests but for laravel projects it's so much easier to write feature tests, I'd say "it depends"
Laravel Security: Top 7 Mistakes Developers Make
11:16
Laravel Daily
Рет қаралды 88 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
AI powered security for your team
5:34
Google Cloud Tech
Рет қаралды 803
Laravel Testing for Beginners: Why and How [NEW COURSE]
16:23
Laravel Daily
Рет қаралды 11 М.
Laravel + Service Pattern + DTOs = ❤️❤️❤️
17:52
Przemysław Przyłucki
Рет қаралды 55 М.
Laravel: Create Public API with Cache and Rate Limits
12:18
Laravel Daily
Рет қаралды 47 М.
Laravel Dusk: painless browser automation
20:49
Aaron Francis
Рет қаралды 25 М.
I'm new to testing in Laravel (Watch me learn)
22:03
Laravel
Рет қаралды 12 М.
Exceptions in Laravel: Why/How to Use and Create Your Own
12:18
Laravel Daily
Рет қаралды 89 М.
Eloquent Observers or Events Listeners? Which is Better?
8:24
Laravel Daily
Рет қаралды 61 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН