developer's qa toolkit - 34th national it conference - sri lanka

22
Developer’s QA Toolkit BY CHAMIL JEEWANTHA SOFTWARE ARCHITECT 34 TH NATIONAL IT CONFERENCE – SRI LANKA HTTP://WWW.NITC.LK/2016/

Upload: chamil-jeewantha

Post on 12-Apr-2017

32 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Developer’s QA ToolkitBY CHAMIL JEEWANTHASOFTWARE ARCHITECT 34 T H NATIONAL IT CONFERENCE – SRI LANKAHTTP://WWW.NITC.LK/2016/

Page 2: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

What is QA?“The maintenance of a desired level of quality in a service or product, especially by means of attention to every stage of the process of delivery or production.”

– Oxford Dictionary

Page 3: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

What is QA?“The maintenance of a desired level of quality in a service or product, especially by means of attention to every stage of the process of delivery or production.”

– Oxford Dictionary

Requirements | Development | Testing | UAT | …

Page 4: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Developer’s QA Responsibility?THIS IS THE QUESTION IN YOUR MIND NOW…

Page 5: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Proper Design  Consistent Maintainable  Simple  Loosely coupled Highly Cohesive  proper, Testable Units

Page 6: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Clean Code  Easily Understandable  Simple and Focused No Duplicates  Pleasant reading experience Smaller is better Expressive No Bugs can hide behind

Page 7: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Other Quality Responsibilities  Sense of,◦ Performance◦ Auditability◦ Diagnostibility◦ User Experience

Page 8: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

“SOLID Design & Clean Code is more important in “Agile” than anywhere else”BUT IT’S A CHALLENGE…

Page 9: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Waterfall Agile Transformation

  Business requirements may change drastically over the time.

  Single lengthy flow converted to a small large number of cycles.

  Cycle time is shorten from many Months to few weeks.

Discover

Design

Develop

Test

Launch

Page 10: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

The Challenge is,Focusing on Quality while delivering the changing customer 

needs within the short cycles.

So,

Tools are Important!

Page 11: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Tools in the Dev’s QA Toolkit

Page 12: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Most Important Tools

Knowledge

Passion

Page 13: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Knowledge & Practice  Object Oriented / Functional /  Flow Based / … Programing◦ Concepts / Guide Lines

  SOLID◦ Single Responsibility◦ Open/Closed ◦ Liskov Substitution◦ Interface Segregation◦ Dependency Inversion

  GRASP◦ General Responsibility Assignment Software Principles (or Patterns)

  GoF Patterns◦ Gang of Four Patterns

Page 14: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Automated Code Analysis

 Static Analysis◦ Offline analysis without executing the program◦ Quick and Easy◦ Detects possible Flaws◦ Escalates violations of◦ Standards / Best Practices

 Dynamic Analysis◦ Runtime analysis◦ Detects the flaws which is not possible to detect with static analysis◦ Time Consuming◦ Full coverage is not guaranteed

Page 15: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Example:  public class HelloWorld{  public static void main(String args[]){  System.out.println("Hello World");  } }

Page 16: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Refactoring (IDE features) Improves non-functional attributes of Software

◦ Readability◦ Reusability◦Maintainability◦ …ity

Page 17: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Example: Refactoring  Change to better names◦ duration  durationInSeconds

Design level refactoring

new Notification(“Failure”,”DB Failure”,new Date())

new Notification.Builder().typeOf(“Failure”).describedBy(“DB Failure”).atNow().build();

Page 18: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Unit Test Unit  A single indivisible Entity◦ A “Class” In OOP

 Unit Test◦ Select the smallest piece of testable software in the application◦ Isolate it from the rest of the code◦ Determine whether it behaves exactly as you expect◦ Each unit is tested separately before integrating them into modules to test the interfaces between modules

Page 19: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

TDD – Test Driven Development1.Write a(nother) unit test that fails

2.Write the minimum production code until all the tests pass

3.Refactor your code

4.Repeat until all your work is done

Fail Pass

Refactor

Page 20: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

TDD Benefits Write non-testable codes are impossible

  Test-first forces you to plan before you code

  It’s faster than writing code without tests

  It saves you from lengthy code

  It guides you to build good, SOLID units

  It increases your confidence (refactor without fear)

  Acts as a  real-time progress bar

Page 21: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

Other Tools  Code Coverage

  Code Reviews

 Developer Level Integration Tests

  Communicate with QA & BA

Page 22: Developer's QA Toolkit - 34th National IT Conference - Sri Lanka

“Digital Disruption” of  “Quality Software Delivery” is 

“Tools”.

Thank You!