Upload
qushay-bagas
View
59
Download
0
Embed Size (px)
Citation preview
BY QUSHAY BAGASTech [email protected]
Unit Testing
Integration Testing
System Testing
Acceptable Testing
Testing process where individual units/components of a software/system are tested. The purpose is to validate that each unit of the software performs as designed.
Testing process where individual units are combined and tested as a group. The purpose of this level of testing is to expose faults in the interaction between integrated units.
Testing process where a complete, integrated system/software is tested. The purpose of this test is to evaluate the system’s compliance with the specified requirements.
Testing process where a system is tested for acceptability. The purpose of this test is to evaluate the system’s compliance with the business requirements and assess whether it is acceptable for delivery.
Unit Test• Unit tests mainly target smallest functionality (like method, class , component
or small module) with isolation from other component.• Tools : JUnit, Roboelectric
Instrumentation Test• Instrumentation Test (UI) are tests that mock User Interaction like clicking
button , Typing text in EditText. Android Instrumentation is a set of “hooks” into the Android system that allows you to control the lifecycle of Android components (i.e. drive the activity lifecycle yourself instead of having these driven by the system). These tests require an actual device or emulator to run .
• Tools : Espresso, Robotium,
Types of testing in Android
HOW ???
White Box Testing
Method of testing the application at the level of the source code.
control flow testing data flow testing branch testing path testing statement coverage decision coverage modified condition/decision
coverage
Criteria Black Box Testing White Box Testing
Definition
Black Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is NOT known to the tester
White Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester.
Levels Applicable ToMainly applicable to higher levels of testing:Acceptance TestingSystem Testing
Mainly applicable to lower levels of testing:Unit TestingIntegration Testing
Responsibility Generally, independent Software Testers Generally, Software Developers
Programming Knowledge Not Required Required
Implementation Knowledge Not Required Required
Basis for Test Cases Requirement Specifications Detail Design
WHO ???Performed by software developers themselves
or their peers
WHY ???
Unit testing increases confidence in changing/ maintaining code.
Codes are more reusable
Development is faster
The cost of fixing a defect detected during unit testing is less
Debugging is easy
Codes are more reliable
TipsFind a tool/ framework for your language
Do not create test cases for everything. Focus on the tests that impact the behavior of the system
Isolate the development environment from the test environment
Use test data that is close to that of production
Before fixing a defect, write a test that exposes the defect
Write test cases that are independent of each other
Aim at covering all paths through the unit.
Use a version control system to keep track of your test scripts
Perform unit tests continuously and frequently