Characteristics of Testable Softwareo Operableo The better it works (i.e., better quality), the easier itis to testo Observableo Incorrect output is easily identified; internal errorsare automatically detectedo Controllableo The states and variables of the software can becontrolled directly by the testero Decomposableo The software is built from independent modulesthat can be tested independently
Characteristics of Testable Softwareo Simpleo The program should exhibit functional, structural,and code simplicityo Stableo Changes to the software during testing areinfrequent and do not invalidate existing testso Understandableo The architectural design is well understood;documentation is available and organized
Test Characteristicso A good test has a high probability offinding an erroro The tester must understand the software and howit might failo A good test is not redundanto Testing time is limited; one test should not servethe same purpose as another testo A good test should be “best of breed”o Tests that have the highest likelihood ofuncovering a whole class of errors should be usedo A good test should be neither toosimple nor too complexo Each test should be executed separately
Testing Techniqueso White Box Testingo Testing of a software solution’s internalcoding and infrastructure.o Black Box Testingo Functionality of the Software-Under-Test(SUT) is checked without looking at theinternal coding and structure.
White Box Testingo Developers get involved.o Knowing the internal workings ofa product, all the internaloperations are tested accordingto specifications and all internalcomponents are exercised.o Logical paths through thesoftware are tested.
White Box Testingo Other names:o Clear Box Testingo Structural Box Testingo Open Box Testingo Opaque (or Glass) Box Testing
Types of White Box Testingo UNIT Testingo INTEGRATION Testing
Unit Testingo A ‘unit’ is the smallest part in theapplication where thedevelopers test the individualunits of source code.o Its a verification and validationmethodology where thedevelopers test the individualunits of source code.o These tests are conducted duringdevelopment.
Unit Testingo There are 2 ways of doing “UnitTest” in .NETo Visual Studio Unit Test Facilityo In-Builto Third-Party Software (Not Recommended)o NUnit
Types of Unit Testso Basically 3 types:o Execution Testing:oAgain 3 types:o Conditional Coverage:o Conditional Statements like IF-ELSE aretested.o Loops Coverage:o Loops like FOR,WHILE,DO-WHILE aretested.o Program Technique Testing:o Test to optimize the code (minimumnumber of lines).
Types of Unit Testso Operational Testing:oCode should execute on customerexpected Operating System.o Mutation Testing:oIntentionally try to bring errors inprogram execution to increaseefficiency.
Example of Unit Testingo Through Visual Basic Unit Test:
Integration Testingo Check all the modules areworking with each other as awhole or not.o There are 2 approaches inIntegration Testing:o TOP DOWN Approacho BOTTOM UP Approach
Top Down Approacho Main Module is ready and Sub-Module is under development.o Ex: “Log-in” is Ready and “Register” is underdevelopment.o Temporary Program (called as“STUBS” in this approach) are likealternatives which takes themodule under development, sothat testing activity of the mainmodule, or the module which isready, can be done.
Bottom Up Approacho Main module is underdevelopment and Sub-Module isready.o “Log-in” is under development and “Register” isready.o Temporary Program (called as“DRIVERS” in this approach) arelike alternatives which takes themodule under development andthe testing activity of the modulewhich is ready, is done.
Black Box Testingo Testers get involved.o Knowing the specified functionthat a product has beendesigned to perform, testing isdone so as to see if that functionis fully operational and error free.o Not concerned with internallogical structure of the software.o Includes tests that are conductedat the software interface.
Black Box Testingo Other names:o Closed Box Testingo Functionality Testingo Behavioral Testingo Test is done just by knowing the inputsand outputs without knowing theirinternal code implementation.BLACK BOXInput Output
Types of Black Box Testingo Functional Testing:o Related to functional requirements of thesystem.o Non-Functional Testing:o Not related to testing of a specificfunctionality but non-functionalrequirements such as performance,scalability, usability.o Regression Testing:o Done after code fixes, upgrades or anyother system maintenance to check thenew code has not affected the existingcode.