benefits of unit testing

Post on 19-Nov-2014

257 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Benefits of Unit Testing Presentation

TRANSCRIPT

Benefits of Unit TestingBy Barkan Saeed

• One bug left before release

• Done!

• Send version to QA,

• QA: It doesn’t work!

Problem #1

Programmer

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?

Client

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

Developer when seeing Change Request

Problem # 4

Delays in Schedule

• Unexpected Bugs

• Client frustration

• Delays in schedules

Where does it hurt?

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); }

Does it take more time? Yes!

How can these unit tests help us?

Be Confident about our code.

Welcome Change

Automated tests are the only way to achieve a good test coverage in

each sprint

Future

- NewBie’s - Should understand XUnit

- Start with Regression areas first

top related