Return to Video

5.1 - Testing Overview

  • 0:00 - 0:04
    So this, in chapter five, the testing
    overview. This is, this is Brian
  • 0:04 - 0:08
    Kernighan, the author, one of the Bell
    Labs, heroes who the author of the
  • 0:08 - 0:12
    Kernighan and Ritchie book on [inaudible]
    that probably most of you had. The, and
  • 0:12 - 0:16
    it's, if you read it a couple, you can get
    it. Debugging is twice as hard as writing
  • 0:16 - 0:21
    code in the [inaudible]. Therefore, it's
    twice as hard, right? So therefore, if you
  • 0:21 - 0:25
    write the cleverest code the first time,
    you're never gonna be able to debug it,
  • 0:25 - 0:30
    'cause it's twice as hard. Alright, this
    one, this is Dystra test and you've gotta
  • 0:30 - 0:36
    fill in the blank. Testing can never
    demonstrate the. Absence of air is only
  • 0:36 - 0:41
    there. Presence, right? Well that's,
    that's been around for a long time, and
  • 0:41 - 0:47
    just gotta keep that in mind. Here is an
    article that came out a year and a half
  • 0:47 - 0:52
    ago, and it says why are things expensive.
    And you can see here that their study is
  • 0:52 - 0:57
    it's not that there's bugs and [inaudible]
    in design, it's just lousy testing
  • 0:57 - 1:02
    features, lousy, lousy testing processes
    are reasons that there's, there's so many
  • 1:02 - 1:07
    bugs in code. And it says here that
    completely automated testing environments
  • 1:07 - 1:12
    are rare. This was a year and a half ago.
    Still, we're just twenty, twelve percent
  • 1:12 - 1:17
    of software [inaudible] organizations have
    fully automated testing systems. Ten
  • 1:17 - 1:21
    percent do all testing manually. Right? So
    you write the test. You look at the
  • 1:21 - 1:25
    output. You write the test. Look at the
    output. See any mistakes? Okay. So, wow,
  • 1:25 - 1:30
    can't believe that, that, that's still
    true. That's not true here. [laugh]. You
  • 1:30 - 1:35
    know? For agile before the hand, you have
    a separate quality assurance team. So you
  • 1:35 - 1:40
    have all these phases and separate groups
    of people. So, Marge, somehow, the quality
  • 1:40 - 1:45
    assurance team was supposed to insert
    quality in your code. [laugh]. Or make
  • 1:45 - 1:50
    sure that you, you have quality in your
    code. With Agile, it's part of everything
  • 1:50 - 1:54
    we do. We're testing continuously. Every
    week, we bring out new code. You're
  • 1:54 - 1:59
    responsible for testing your code, not
    somebody else. And the tools are highly
  • 1:59 - 2:04
    [inaudible] so unlike that, that statement
    that was done before. And so what the
  • 2:04 - 2:08
    argument here in the [inaudible] the
    actual manifesto is that if with a good
  • 2:08 - 2:13
    process we'll get soft quality rather than
    there's a specific group that's supposed
  • 2:13 - 2:20
    to insure it that they're gonna beat you
    up if you don't have it. So. Bdd and TDD
  • 2:20 - 2:26
    was I said earlier. The phrase behavior
    driven design was inspired by some people
  • 2:26 - 2:31
    getting confused about test driven
    development. Here we're testing acceptance
  • 2:31 - 2:36
    tests, integration tests, and trying to
    capture the behavior. Tdd is gonna be step
  • 2:36 - 2:42
    definitions and actually write unit tests
    and function tests, before you write the
  • 2:42 - 2:47
    code. So that's the. So the good news is,
    you're always gonna have the test up to
  • 2:47 - 2:52
    date because you're writing the code or
    even before it. So here's how they work
  • 2:52 - 2:57
    together. Cucumbers describe the
    [inaudible]. You, you start off writing
  • 2:57 - 3:02
    the stories you want. They fail. Then it
    invokes the implementations, the
  • 3:02 - 3:06
    [inaudible] test. If it fails, you then,
    you implement the methods that are
  • 3:06 - 3:11
    missing. And then when it passes the
    [inaudible] test, you keep iterating
  • 3:11 - 3:16
    internally until you pass the [inaudible].
    And then once you've implemented the
  • 3:16 - 3:21
    feature properly, it, it will pass the
    cucumber green step and you go back and
  • 3:21 - 3:23
    keep going through the development.
Title:
5.1 - Testing Overview
Description:

In this video, Armando motivates the upcoming discussion of automated testing best practices.

more » « less
Video Language:
English
stanford-bot edited English subtitles for 5.1 - Testing Overview
stanford-bot edited English subtitles for 5.1 - Testing Overview
stanford-bot edited English subtitles for 5.1 - Testing Overview
Arkaaito added a translation

English subtitles

Revisions