What is a Bug or Defect3:39 with Ryan Saul
As developers and testers, one of the terms we hear regularly are “defects” or, more commonly, “bugs” in the software. Generally speaking a defect is any flaw in the intended use of the software.
- Defect/Bug: A flaw in the software that must be fixed.
- Workflow: How a user moves and interacts through the system.
[MUSIC] 0:00 Welcome back. 0:04 One thing we hear about often as developers and 0:06 testers alike are defects, or more commonly bugs, in the software. 0:08 What are they, though? 0:14 Generally speaking, a defect is any flaw in the intended use of the software, 0:16 even if the intended use isn't formally written down somewhere. 0:21 So some easy defects to think of here 0:25 are when I click a button all I see is a blank page, or maybe even a 404 error. 0:28 Another would be when I click Submit on a form but 0:34 I haven't filled out the form yet, so the page is sent anyway. 0:37 In our RSVP app, we have a defect like that. 0:41 Typing someone's name in the Invite Someone field and 0:45 clicking Submit adds them in. 0:48 So let's add that person right now. 0:51 Some new person. 0:53 Great, so that added a new card there. 0:56 But when you click Submit without typing anything in the name field, 0:59 it adds a blank card below. 1:03 I'd expect to get some sort of error from the page before that happens. 1:05 There really isn't a point in adding a blank card like that, after all. 1:09 The user has a certain workflow when they're moving through the application. 1:14 A workflow is how a user moves through and interacts with the system. 1:19 So in our example, instead of typing in a name before clicking the Submit button, 1:23 the user went straight to clicking the Submit button. 1:28 The user's workflow in this defect was to load the page and 1:31 then click on Submit before doing anything else. 1:35 In this example, we did, in fact, list this particular workflow in our test case. 1:39 And we expected to get some kinda error message from the website. 1:45 Since the software didn't match our expectations for this workflow, 1:49 we would write up a bug. 1:52 More on that in the next video. 1:54 But first, I wanna talk about subjectiveness with bugs. 1:57 Remember that there can still be a defect or flaw in the software 2:00 even if the specifications aren't written down for a particular workflow. 2:04 So this is an example of another thing that I think is a problem. 2:08 So I'm gonna add one more name to the bottom of this list. 2:12 And as you can see, that name gets added to a new row, but 2:17 it also takes up the entire row, and it doesn't quite look right to me. 2:21 Is it a bug? 2:26 I'm not really sure. 2:27 I'm going to create a bug report for it just to be on the safe side. 2:28 Later on, though, after telling my team about it, they report that this is simply 2:32 how flexbox works on the front end and that it was never a requirement 2:37 to make the box the same size as all the other boxes on the screen. 2:41 But I insist that this is a defect 2:46 because it doesn't match the style of the other boxes at all. 2:48 I asked the product manager about it, and 2:53 they do agree with me that it doesn't look correct and it needs to be fixed. 2:55 So on some defects, a consensus needs to be made. 3:00 Sometimes technical reasons keep defects in the software because it would be 3:04 too difficult to fix them given the current amount of people on the team or 3:08 whatever other priorities they have. 3:13 Sometimes defects are glaring even if we never spent 3:16 any time thinking about these scenarios when we designed the product. 3:19 That's all okay, and it's part of the reason you're here. 3:24 You need to use that intuition to find problems and report them. 3:28 In our next video, we'll go through how to write up a bug report so 3:32 that developers can fix these problems. 3:36
You need to sign up for Treehouse in order to download course files.Sign up