This is when testing in software starts to suck

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 60

  • @ItsD3vil
    @ItsD3vil 2 месяца назад +14

    Man, I found your channel two months ago, and since then, I almost never listen to any other dev content creator except you. You're so genuine, and you talk in a very reasonable way-it's not too much and not too little. Keep it up, bro!

    • @WebDevCody
      @WebDevCody  2 месяца назад

      Thanks man glad you enjoy it

  • @sarabwt
    @sarabwt 2 месяца назад +17

    Testing the frontend is way different than testing the backend. Having "unit" tests (either at the API level or business logic level, not mocking the DB) on the backend allows you to move way faster, because you don't need to verify the changes manually and you don't need to worry about regressions. I do TDD like this for 90-95% of tests. If you have a more complex business logic, then you test just that logic, but you make the function as pure as possible.
    As for the front end, it mostly just sucks, because the UI is fragile, especially in the beginning. Automating e2e tests for stable features makes sense, depending on how much work it is.

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 2 месяца назад +1

      It seems that no matter the framework you are using, or if you are making unit tests or e2e tests the experience of testing the frontend will always be unpleasant

  • @donnyroufs551
    @donnyroufs551 2 месяца назад +6

    For side projects that I'm planning to maintain over the months / years I tend to add tests because future me will have forgotten most if not all. Professionally, based on budget and time I always try to add tests if the budget / time is limited I always try to cover the happy path on the highest level possible. You covered it pretty well!

  • @poznianski
    @poznianski 2 месяца назад +1

    Brilliant and valuable perspective. It's great that this is being discussed openly

  • @lucaschitolina7156
    @lucaschitolina7156 2 месяца назад +24

    she was faster, again.

    • @SeibertSwirl
      @SeibertSwirl 2 месяца назад +6

      @@lucaschitolina7156 that’s what he said. 👀

    • @vincentpena7017
      @vincentpena7017 2 месяца назад

      Man just quit. We can't win

    • @vpetryniak
      @vpetryniak 2 месяца назад

      Who is she?

  • @yehudamakarov
    @yehudamakarov 2 месяца назад

    hey really excited to watch this because this is nuanced and challenging when you really get into it

  • @rand0mtv660
    @rand0mtv660 2 месяца назад +2

    Tests are this weird area that can bring so much value and benefit, but you can also still end up in this weird situation where you might require 80-90% code coverage and still have a consistently crappy software and user or developer experience.
    You can reach that code coverage consistently and still have software that breaks all the time, tests that break all the time etc. Just because people start writing tests for the sake of hitting coverage instead of for the sake of writing good reliable tests that make sense and tests behavior that should be tested. Testing is a tricky and hard area.

  • @k98killer
    @k98killer 2 месяца назад +2

    The "value added" to "effort/time" graph would look something like a logarithm. The more interesting graph is "value added / time-and-effort" to "time-and-effort", which will roughly slope downward indicating that the value derived per unit of effort diminishes as the amount of effort increases for a feature. (Maybe something like y=x * (0.9^x) would be more accurate. Idk.)

    • @WebDevCody
      @WebDevCody  2 месяца назад +2

      Honestly it’s more of a step graph. Until your test is done, you have no added value and sometimes it take a lot of time to finish the test.

  • @craigpatterson167
    @craigpatterson167 2 месяца назад

    Nice discussion of testing. I generally agree with your sentiments on this, though I do sometimes specifically create tests to document how vague requirements were interpreted. Very useful documentation of the implemented rules.

  • @oscarhagman8247
    @oscarhagman8247 2 месяца назад

    was getting ready for a hot & spicy take but I 100% agree
    one thing that also sucks with the whole "we gotta test everything dogma" is when managers and product owners tell you to test shit that doesn't make sense to test. but you can't explain that to them cause they don't understand code so now you gotta do unnecessary work 😅

  • @Metruzanca
    @Metruzanca 2 месяца назад +2

    Great intro, love it.

  • @Scapben
    @Scapben 2 месяца назад

    I'm not a big fan of skipping tests, even on small projects-I hate manually testing my app before each deployment. That's why I always include e2e tests, even for smaller apps. If something doesn't work smoothly during testing, I don't test the use case instead of spending too much time on it.
    For example, I had a download button with JPEG, PNG, and PDF options. The PDF snapshot tests kept failing, even though they were correct, while the JPEG and PNG tests passed just fine. Instead of wasting time troubleshooting, I removed the PDF test and moved on.
    Combined with TypeScript, this approach makes me feel confident when deploying. Not sure how well it scales, though.

  • @pencilcheck
    @pencilcheck 2 месяца назад

    you will always find some people thinking tests saved their life and you found out that they never really write tests and just bluffing

  • @k98killer
    @k98killer 2 месяца назад

    My philosophy is to write as few tests as I can get away with while ensuring it functions properly, but you wouldn't know it by looking at my projects. For example, my tapescript project (byte code virtual machine with domain-specific assembly language) has 239 tests and 104 test vectors for the compiler and decompiler. If I made a flowchart for that one, it would look like an integrated circuit.

  • @yehudamakarov
    @yehudamakarov 2 месяца назад

    personally i'm loving testing as a development tool to get a debugger breakpoint on the function i'm working on, one test case at a time, no backtracking that way. etc.

  • @darialyphia
    @darialyphia 2 месяца назад +1

    Sees video title: "I guess I know why cody screamed at his screen at work this morning"

    • @WebDevCody
      @WebDevCody  2 месяца назад

      one more randomly failing cypress test and I'm going to switch careers

  • @twitchizle
    @twitchizle 2 месяца назад +20

    Love you babe

    • @SeibertSwirl
      @SeibertSwirl 2 месяца назад +3

      @@twitchizle aht aht aht…. Me no share!

  • @austincodes
    @austincodes 2 месяца назад

    Cody out here with the nuanced takes

  • @MartinAndrews-u7i
    @MartinAndrews-u7i 2 месяца назад

    Nice video, btw what keyboard are u using

  • @EverydayElk
    @EverydayElk 2 месяца назад +2

    tests are also a form of documentation

  • @mdndev2627
    @mdndev2627 2 месяца назад

    16:00 Man I know that feeling. This happened to me after WEEKS of building a complex set of feature that were « crucial » only to be told that users were not using it at all… makes you want to throw hands at somebody… 😂
    I remember our « proxy product owner » ( cool dude) had to deliver the news, he was acting like Steve Harvey when he made that blunder on miss universe.

  • @br3nto
    @br3nto Месяц назад

    Testing is great when you want to maintain certain sets of behaviours and properties of a system. If something happens to break in a different part of the system and you don’t know about it, then you are in a situation where you have a behaviour or property that you want, but is not tested. So whack a test on it.

  • @meiomi5892
    @meiomi5892 2 месяца назад

    I have been trying to learn programming and have watched countless videos and learned a lot of programming languages in addition to trying to create projects but when I try to do them on my own I just don't know HOW and WHEN to use the things I have learnt in the tutorials. + when I am trying to read other people's code they look much more complicated then what I learn in those tutorials I don't know what to do any one got advice?

  • @TheJubeiam
    @TheJubeiam 2 месяца назад

    Test your domain/buisnes logic. No matter if its 1 if or 100ifs. This will document your system. Second factor ask yourself what test should be there in CI for you to push strait to production and implement them.

  • @NoWorries53
    @NoWorries53 2 месяца назад

    what's a good advice for an API automation tester?

  • @juststudying1019
    @juststudying1019 2 месяца назад +1

    test coverage is a scam, great video btw.

  • @wenxuanmo5443
    @wenxuanmo5443 2 месяца назад

    me: I like working with projects that have well-written tests but I don't like writing tests:)
    btw what's that chrome extension you're using?

  • @vpetryniak
    @vpetryniak 2 месяца назад

    Would be really good if you can make a video about good dev content creators in RUclips. I just discovered your channel recently, and if I had known earlier about your channel I would start watching you earlier.

  • @letrat7021
    @letrat7021 2 месяца назад

    Can you make a video about load balancing and how it’s implemented?

  • @patolorde
    @patolorde 2 месяца назад

    Idk i needed this Masterclass on testing

  • @kal.leroux
    @kal.leroux 2 месяца назад

    I just finished doing my first 2hours of test in go :D

    • @WebDevCody
      @WebDevCody  2 месяца назад

      all to verify add(1, 2) gives you 3 amiright?

  • @grandpowr
    @grandpowr 2 месяца назад +2

    Could be nice if you make videos about how to test

  • @oryankibandi3556
    @oryankibandi3556 2 месяца назад

    Good video.

  • @averagejoe5822
    @averagejoe5822 2 месяца назад +1

    lol. that intro

  • @KrzysztofBaczkiewicz-sc4lh
    @KrzysztofBaczkiewicz-sc4lh 2 месяца назад

    testing in js sucks but when it does not (Laravel) it's hard not to test

  • @ifeoraokechukwu1346
    @ifeoraokechukwu1346 2 месяца назад

    I want to commend you very much for this video. Everything you said for when testing is great is spot on (except for the diminishing returns part which is debatable).
    However, your first point for when testing sucks is a skill issue which can be fixed by the developer. Giving up testing because tests are brittle defeats you earlier point about testing key business-crucial features.
    So, build on and fix your your skill issues.
    Cheers

  • @subproject2771
    @subproject2771 2 месяца назад

    Testing is wasting.

  • @damjandjordjevic1994
    @damjandjordjevic1994 2 месяца назад

    What's a youtube view quota?

    • @WebDevCody
      @WebDevCody  2 месяца назад +2

      Just need my wife to comment and I’m good

    • @SeibertSwirl
      @SeibertSwirl 2 месяца назад +1

      @@WebDevCody ngawwwwww 😩😘

  • @pavelsadovoi6698
    @pavelsadovoi6698 2 месяца назад +1

    Testing is also great when you want increase estimates to earn more money as developer.

  • @SeibertSwirl
    @SeibertSwirl 2 месяца назад +16

    First!!!!

    • @oSpam
      @oSpam 2 месяца назад +3

      Aw man, nearly got there

    • @klapaucius515
      @klapaucius515 2 месяца назад +2

      No fair, she knows beforehand 😣🤣🤣🤣

    • @WebDevCody
      @WebDevCody  2 месяца назад +3

      thanks babe!

    • @anothermouth7077
      @anothermouth7077 2 месяца назад +2

      Babe ! You are doing great babe !

    • @SeibertSwirl
      @SeibertSwirl 2 месяца назад +1

      @@klapaucius515 hahaha insider trading at its finest. #nepotism

  • @-lumqua-827
    @-lumqua-827 2 месяца назад +1

    Lovely jublee, I will never test anything