1 00:00:07,170 --> 00:00:09,956 - [Instructor] Automation helps us keep up. 2 00:00:09,956 --> 00:00:11,624 Let's look at some good ways 3 00:00:11,624 --> 00:00:14,721 to approach automation in agile development. 4 00:00:14,721 --> 00:00:16,505 In traditional projects, we know 5 00:00:16,505 --> 00:00:18,360 when automation is going to happen. 6 00:00:18,360 --> 00:00:20,767 It's going to happen after a whole bunch of other things, 7 00:00:20,767 --> 00:00:22,756 after everything is stable. 8 00:00:22,756 --> 00:00:24,641 And the sole purpose of automation 9 00:00:24,641 --> 00:00:27,000 is usually for regression testing. 10 00:00:27,000 --> 00:00:28,802 In agile development, 11 00:00:28,802 --> 00:00:30,973 automation is not only for regression testing. 12 00:00:30,973 --> 00:00:34,561 It helps us get fast feedback on new features, 13 00:00:34,561 --> 00:00:38,085 on changes, and it's not only functional testing, 14 00:00:38,085 --> 00:00:40,040 we may be testing our infrastructure, 15 00:00:40,040 --> 00:00:42,280 we may be using automation to help 16 00:00:42,280 --> 00:00:44,773 with continuous delivery and appointments. 17 00:00:44,773 --> 00:00:46,863 We need to automate when it makes sense, 18 00:00:46,863 --> 00:00:48,227 and we're going to talk later 19 00:00:48,227 --> 00:00:50,280 about what not to automate. 20 00:00:50,280 --> 00:00:52,133 Automation is hard, right? 21 00:00:52,133 --> 00:00:54,474 We need a diversity of skill sets on the team 22 00:00:54,474 --> 00:00:56,360 to be able to solve problems. 23 00:00:56,360 --> 00:00:59,240 So, having people with different backgrounds 24 00:00:59,240 --> 00:01:01,412 collaborating on automation problems 25 00:01:01,412 --> 00:01:03,114 help us tackle them. 26 00:01:03,114 --> 00:01:06,178 For example, a tester and a developer 27 00:01:06,178 --> 00:01:08,758 can pair to fix so-called flakey tests 28 00:01:08,758 --> 00:01:11,271 that fail some of the time. 29 00:01:11,271 --> 00:01:13,981 Maybe there is a real bug there that the tester can spot. 30 00:01:13,981 --> 00:01:16,152 Or maybe there's just something wrong with the code design 31 00:01:16,152 --> 00:01:18,596 that the developer can spot. 32 00:01:18,596 --> 00:01:21,123 This has to be the priority for the whole team. 33 00:01:21,123 --> 00:01:23,192 Also reach out to other teams, 34 00:01:23,192 --> 00:01:25,027 if you're working at a larger company, 35 00:01:25,027 --> 00:01:27,655 maybe you have a community practice or guild 36 00:01:27,655 --> 00:01:32,577 or even just reach out to the community at large for help. 37 00:01:32,577 --> 00:01:36,299 Share ideas on tools on how different people 38 00:01:36,299 --> 00:01:39,768 have approached different automation obstacles. 39 00:01:39,768 --> 00:01:42,613 Some things are definitely harder to automate than others. 40 00:01:42,613 --> 00:01:45,878 For example, if your user interface 41 00:01:45,878 --> 00:01:47,933 has a lot of business logic built in, 42 00:01:47,933 --> 00:01:50,272 like a Javascript application, 43 00:01:50,272 --> 00:01:52,481 that definitely poses automation challenges 44 00:01:52,481 --> 00:01:56,690 that you don't have if you're testing a server side API, 45 00:01:56,690 --> 00:01:58,895 so discuss up front, 46 00:01:58,895 --> 00:02:01,757 as you're starting to talk about developing a new feature, 47 00:02:01,757 --> 00:02:06,374 how can you design the code to facilitate the automation. 48 00:02:06,374 --> 00:02:09,102 We need reliable, quick feedback loops 49 00:02:09,102 --> 00:02:11,272 via our continuous integration, 50 00:02:11,272 --> 00:02:13,953 and we need to automate not only tests, 51 00:02:13,953 --> 00:02:16,465 but things like automating our deploys 52 00:02:16,465 --> 00:02:18,215 to our test environments, 53 00:02:18,215 --> 00:02:19,797 to our production environments. 54 00:02:19,797 --> 00:02:22,255 There are so many aspects of our infrastructure 55 00:02:22,255 --> 00:02:24,448 that we need to automate. 56 00:02:24,448 --> 00:02:26,086 Let's talk about some things 57 00:02:26,086 --> 00:02:28,463 that testers are particularly good at. 58 00:02:28,463 --> 00:02:30,349 Our whole team works together, 59 00:02:30,349 --> 00:02:32,960 but we each add value with our deep skills 60 00:02:32,960 --> 00:02:34,696 out of our T-shaped skills. 61 00:02:34,696 --> 00:02:37,645 And testers are really good at specifying tests 62 00:02:37,645 --> 00:02:39,480 and asking questions. 63 00:02:39,480 --> 00:02:42,291 When you think about hiring testers for your agile team, 64 00:02:42,291 --> 00:02:44,249 do you really want to hire more coders, 65 00:02:44,249 --> 00:02:47,211 or do you want to hire people with great testing skills. 66 00:02:47,211 --> 00:02:49,719 Testers who use their critical thinking skills 67 00:02:49,719 --> 00:02:52,953 to verify quality attributes beyond the functional, 68 00:02:52,953 --> 00:02:56,495 such as a quadrant four test we discussed in lesson two, 69 00:02:56,495 --> 00:02:58,689 that may be who you want on your team. 70 00:02:58,689 --> 00:03:00,541 To testers and developers, 71 00:03:00,541 --> 00:03:03,523 collaborating together is the ideal scenario on your team. 72 00:03:03,523 --> 00:03:05,815 Leverage those different skill sets together 73 00:03:05,815 --> 00:03:07,653 to solve problems. 74 00:03:07,653 --> 00:03:11,191 Test code is equally or more valuable than production code, 75 00:03:11,191 --> 00:03:12,859 in my opinion. 76 00:03:12,859 --> 00:03:15,270 As Janet mentioned, it's living documentation. 77 00:03:15,270 --> 00:03:17,829 It tell us how our code works now. 78 00:03:17,829 --> 00:03:20,575 Developers who write production code 79 00:03:20,575 --> 00:03:23,813 are also the ideal people to write test fixture code, 80 00:03:23,813 --> 00:03:26,372 because they're really good at code design, 81 00:03:26,372 --> 00:03:28,969 and testers are ideal for a specifying test, 82 00:03:28,969 --> 00:03:31,312 because they're using their critical thinking skills 83 00:03:31,312 --> 00:03:32,878 all the time, 84 00:03:32,878 --> 00:03:34,965 analyzing risk, and knowing what to cover 85 00:03:34,965 --> 00:03:37,353 with automated tests. 86 00:03:37,353 --> 00:03:39,863 DevOps means a combination of developers, 87 00:03:39,863 --> 00:03:44,057 testers, system administrators, database experts, and others 88 00:03:44,057 --> 00:03:46,804 collaborating on our test environments, 89 00:03:46,804 --> 00:03:48,707 our continuous integration, 90 00:03:48,707 --> 00:03:50,850 and our deployment infrastructure. 91 00:03:50,850 --> 00:03:54,878 So we need collaboration across all these skill sets. 92 00:03:54,878 --> 00:03:57,015 But the key is in the collaboration. 93 00:03:57,015 --> 00:03:59,109 For example, the programmers may think 94 00:03:59,109 --> 00:04:02,425 to add code to the test script to tell it 95 00:04:02,425 --> 00:04:04,233 when the page is loaded, 96 00:04:04,233 --> 00:04:05,868 so that the test can proceed, 97 00:04:05,868 --> 00:04:07,673 that way we avoid having any timeouts, 98 00:04:07,673 --> 00:04:09,173 or false failures. 99 00:04:10,348 --> 00:04:13,364 We need data experts, we need operations 100 00:04:13,364 --> 00:04:15,473 and system administration experts, 101 00:04:15,473 --> 00:04:17,849 as well as coding and testing experts. 102 00:04:17,849 --> 00:04:19,849 We like generalizing specialists, 103 00:04:19,849 --> 00:04:23,832 but we also like bringing in the skill set we need 104 00:04:23,832 --> 00:04:26,426 and transferring those skills across the team. 105 00:04:26,426 --> 00:04:28,517 Look for tools that promote collaboration, 106 00:04:28,517 --> 00:04:31,111 and that allow people who do not write code 107 00:04:31,111 --> 00:04:34,461 to participate in specifying automated tests. 108 00:04:34,461 --> 00:04:37,797 Not only testers, but business analysts, 109 00:04:37,797 --> 00:04:40,423 maybe product owners, maybe even designers.