benefits of unit testing
DESCRIPTION
Benefits of Unit Testing PresentationTRANSCRIPT
![Page 1: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/1.jpg)
Benefits of Unit TestingBy Barkan Saeed
![Page 2: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/2.jpg)
• One bug left before release
• Done!
• Send version to QA,
• QA: It doesn’t work!
Problem #1
![Page 3: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/3.jpg)
Programmer
![Page 4: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/4.jpg)
Problem #2
- Developer 1 writes web-services on day 1 and 2
- Developer 2 is scheduled to write an app to consume those services on day 3 and day 4
- Problem : Services don’t work as expected
How will this affect schedule?
![Page 5: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/5.jpg)
Client
![Page 6: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/6.jpg)
Problem # 3
• We don’t like changes
• But business requirements change thats why we work agile.
• Developer problem: Changes are not good because they break code
![Page 7: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/7.jpg)
Developer when seeing Change Request
![Page 8: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/8.jpg)
Problem # 4
![Page 9: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/9.jpg)
Delays in Schedule
• Unexpected Bugs
• Client frustration
• Delays in schedules
![Page 10: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/10.jpg)
Where does it hurt?
![Page 11: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/11.jpg)
What is Unit Test?
• Verifies an atomic piece of code
• Tests one specific behavior
• Each Test is autonomous [TestMethod] public void CheckPassword_ValidUser_ReturnTrue() { bool result = CheckPassword(“user”, “pass”); Assert.IsTrue(result); }
![Page 12: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/12.jpg)
Does it take more time? Yes!
![Page 13: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/13.jpg)
How can these unit tests help us?
![Page 14: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/14.jpg)
Be Confident about our code.
![Page 15: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/15.jpg)
Welcome Change
![Page 16: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/16.jpg)
Automated tests are the only way to achieve a good test coverage in
each sprint
![Page 17: Benefits of Unit Testing](https://reader033.vdocument.in/reader033/viewer/2022061119/546b888daf7959604f8b7c41/html5/thumbnails/17.jpg)
Future
- NewBie’s - Should understand XUnit
- Start with Regression areas first