Software Testing Java
Endy Muhardin
8 Oct 2012
Who Am I
- Endy Muhardin
- Software Developer since 2001
- Learn Java at 2003
- Roles
- Programmer
- Software Designer
- Project Manager
- Business Analyst
- Lecturer
- Business Process Improvement Team
Programming Language
- PHP (2001 - 2004)
- Java (2003 - now)
- Python (2004)
- Ruby (2006 - 2007)
Presentation Overview
- Why Test
- What kind of test
- What to be tested
- How to test effectively
- How to test efficiently
- Myths and urban legends
- What next
What kind of test
- Unit Test
- Integration Test
- Functional Test
- Performance Test
- Stress Test
Test-equivalent Analysis
- Peer Review
- Coverage Test
- Static Code Analysis
What to be tested
- Right-BICEP
- Result is Right
- Boundary Condition
- Inverse Relation
- Cross Check using other means
- Force Error Condition
- Performance Characteristic
Boundary Condition : CORRECT
- Conformance
- Ordering
- Range
- Reference
- Existence
- Cardinality
- Time
How to test effectively
- One database instance per programmer
- Create and maintain (in VCS) seed data
- Create and maintain (in VCS) test scenario
- Create Automated Test scripts
How to test efficiently
- Outsource seed data creation and maintenance
- Run automated test on each build
- Outsource test scenario execution
- Test Scenario creation and maintenance must not be outsourced
- Use tools
Some Demo
- JUnit
- Integration Test
- Functional Test using RestAssured
Myths and Urban Legends
- Test Driven Development
- Coverage Testing
- Coverage must be > 80%
- What to cover
- What not to cover
- Getter Setter
- IDE generated classes
- One line library invocation
- JUnit is only for Unit Testing
What next
- Automated Testing
- Source Code Repository
- Automated Build
- Continuous Integration
- Binary Repository
- Automated Deployment
- Continuous Delivery
Conclusion
- Test is a must
- Test is not free (creation and maintenance effort)
- Analyze cost vs benefit
Q & A
Thank You