Post on 12-Apr-2017
Developer’s QA ToolkitBY CHAMIL JEEWANTHASOFTWARE ARCHITECT 34 T H NATIONAL IT CONFERENCE – SRI LANKAHTTP://WWW.NITC.LK/2016/
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
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 | …
Developer’s QA Responsibility?THIS IS THE QUESTION IN YOUR MIND NOW…
Proper Design Consistent Maintainable Simple Loosely coupled Highly Cohesive proper, Testable Units
Clean Code Easily Understandable Simple and Focused No Duplicates Pleasant reading experience Smaller is better Expressive No Bugs can hide behind
Other Quality Responsibilities Sense of,◦ Performance◦ Auditability◦ Diagnostibility◦ User Experience
“SOLID Design & Clean Code is more important in “Agile” than anywhere else”BUT IT’S A CHALLENGE…
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
The Challenge is,Focusing on Quality while delivering the changing customer
needs within the short cycles.
So,
Tools are Important!
Tools in the Dev’s QA Toolkit
Most Important Tools
Knowledge
Passion
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
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
Example: public class HelloWorld{ public static void main(String args[]){ System.out.println("Hello World"); } }
Refactoring (IDE features) Improves non-functional attributes of Software
◦ Readability◦ Reusability◦Maintainability◦ …ity
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();
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
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
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
Other Tools Code Coverage
Code Reviews
Developer Level Integration Tests
Communicate with QA & BA
“Digital Disruption” of “Quality Software Delivery” is
“Tools”.
Thank You!