Software Testing Techniques Test you code. Aman Jain Application Engineer, Meritech Software Pvt. Ltd.
Characteristics of Testable Software o Operable o The better it works (i.e., better quality), the easier it is to test o Observable o Incorrect output is easily identified; internal errors are automatically detected o Controllable o The states and variables of the software can be controlled directly by the tester o Decomposable o The software is built from independent modules that can be tested independently
Characteristics of Testable Software o Simple o The program should exhibit functional, structural, and code simplicity o Stable o Changes to the software during testing are infrequent and do not invalidate existing tests o Understandable o The architectural design is well understood; documentation is available and organized
Test Characteristics o A good test has a high probability of finding an error o The tester must understand the software and how it might fail o A good test is not redundant o Testing time is limited; one test should not serve the same purpose as another test o A good test should be “best of breed” o Tests that have the highest likelihood of uncovering a whole class of errors should be used o A good test should be neither too simple nor too complex o Each test should be executed separately
Testing Techniques o White Box Testing o Testing of a software solution’s internal coding and infrastructure. o Black Box Testing o Functionality of the Software-Under-Test (SUT) is checked without looking at the internal coding and structure.
White Box Testing o Developers get involved. o Knowing the internal workings of a product, all the internal operations are tested according to specifications and all internal components are exercised. o Logical paths through the software are tested.
White Box Testing o Other names: o Clear Box Testing o Structural Box Testing o Open Box Testing o Opaque (or Glass) Box Testing
Types of White Box Testing o UNIT Testing o INTEGRATION Testing
Unit Testing o A ‘unit’ is the smallest part in the application where the developers test the individual units of source code. o Its a verification and validation methodology where the developers test the individual units of source code. o These tests are conducted during development.
Unit Testing o There are 2 ways of doing “Unit Test” in .NET o Visual Studio Unit Test Facility o In-Built o Third-Party Software (Not Recommended) o NUnit
Types of Unit Tests o Basically 3 types: o Execution Testing: oAgain 3 types: o Conditional Coverage: o Conditional Statements like IF-ELSE are tested. o Loops Coverage: o Loops like FOR,WHILE,DO-WHILE are tested. o Program Technique Testing: o Test to optimize the code (minimum number of lines).
Types of Unit Tests o Operational Testing: oCode should execute on customer expected Operating System. o Mutation Testing: oIntentionally try to bring errors in program execution to increase efficiency.
Example of Unit Testing o Through Visual Basic Unit Test:
Example of Unit Testing o Through NUnit:
Integration Testing o Check all the modules are working with each other as a whole or not. o There are 2 approaches in Integration Testing: o TOP DOWN Approach o BOTTOM UP Approach
Top Down Approach o Main Module is ready and Sub- Module is under development. o Ex: “Log-in” is Ready and “Register” is under development. o Temporary Program (called as “STUBS” in this approach) are like alternatives which takes the module under development, so that testing activity of the main module, or the module which is ready, can be done.
Bottom Up Approach o Main module is under development and Sub-Module is ready. o “Log-in” is under development and “Register” is ready. o Temporary Program (called as “DRIVERS” in this approach) are like alternatives which takes the module under development and the testing activity of the module which is ready, is done.
Black Box Testing o Testers get involved. o Knowing the specified function that a product has been designed to perform, testing is done so as to see if that function is fully operational and error free. o Not concerned with internal logical structure of the software. o Includes tests that are conducted at the software interface.
Black Box Testing o Other names: o Closed Box Testing o Functionality Testing o Behavioral Testing o Test is done just by knowing the inputs and outputs without knowing their internal code implementation. BLACK BOXInput Output
Types of Black Box Testing o Functional Testing: o Related to functional requirements of the system. o Non-Functional Testing: o Not related to testing of a specific functionality but non-functional requirements such as performance, scalability, usability. o Regression Testing: o Done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
References o http://www.guru99.com/ o Online QTP Tutorials. o http://www.nunit.org/
Thank You!

Testing ppt

  • 1.
    Software Testing Techniques Testyou code. Aman Jain Application Engineer, Meritech Software Pvt. Ltd.
  • 2.
    Characteristics of TestableSoftware o Operable o The better it works (i.e., better quality), the easier it is to test o Observable o Incorrect output is easily identified; internal errors are automatically detected o Controllable o The states and variables of the software can be controlled directly by the tester o Decomposable o The software is built from independent modules that can be tested independently
  • 3.
    Characteristics of TestableSoftware o Simple o The program should exhibit functional, structural, and code simplicity o Stable o Changes to the software during testing are infrequent and do not invalidate existing tests o Understandable o The architectural design is well understood; documentation is available and organized
  • 4.
    Test Characteristics o Agood test has a high probability of finding an error o The tester must understand the software and how it might fail o A good test is not redundant o Testing time is limited; one test should not serve the same purpose as another test o A good test should be “best of breed” o Tests that have the highest likelihood of uncovering a whole class of errors should be used o A good test should be neither too simple nor too complex o Each test should be executed separately
  • 5.
    Testing Techniques o WhiteBox Testing o Testing of a software solution’s internal coding and infrastructure. o Black Box Testing o Functionality of the Software-Under-Test (SUT) is checked without looking at the internal coding and structure.
  • 6.
    White Box Testing oDevelopers get involved. o Knowing the internal workings of a product, all the internal operations are tested according to specifications and all internal components are exercised. o Logical paths through the software are tested.
  • 7.
    White Box Testing oOther names: o Clear Box Testing o Structural Box Testing o Open Box Testing o Opaque (or Glass) Box Testing
  • 8.
    Types of WhiteBox Testing o UNIT Testing o INTEGRATION Testing
  • 9.
    Unit Testing o A‘unit’ is the smallest part in the application where the developers test the individual units of source code. o Its a verification and validation methodology where the developers test the individual units of source code. o These tests are conducted during development.
  • 10.
    Unit Testing o Thereare 2 ways of doing “Unit Test” in .NET o Visual Studio Unit Test Facility o In-Built o Third-Party Software (Not Recommended) o NUnit
  • 11.
    Types of UnitTests o Basically 3 types: o Execution Testing: oAgain 3 types: o Conditional Coverage: o Conditional Statements like IF-ELSE are tested. o Loops Coverage: o Loops like FOR,WHILE,DO-WHILE are tested. o Program Technique Testing: o Test to optimize the code (minimum number of lines).
  • 12.
    Types of UnitTests o Operational Testing: oCode should execute on customer expected Operating System. o Mutation Testing: oIntentionally try to bring errors in program execution to increase efficiency.
  • 13.
    Example of UnitTesting o Through Visual Basic Unit Test:
  • 14.
    Example of UnitTesting o Through NUnit:
  • 15.
    Integration Testing o Checkall the modules are working with each other as a whole or not. o There are 2 approaches in Integration Testing: o TOP DOWN Approach o BOTTOM UP Approach
  • 16.
    Top Down Approach oMain Module is ready and Sub- Module is under development. o Ex: “Log-in” is Ready and “Register” is under development. o Temporary Program (called as “STUBS” in this approach) are like alternatives which takes the module under development, so that testing activity of the main module, or the module which is ready, can be done.
  • 17.
    Bottom Up Approach oMain module is under development and Sub-Module is ready. o “Log-in” is under development and “Register” is ready. o Temporary Program (called as “DRIVERS” in this approach) are like alternatives which takes the module under development and the testing activity of the module which is ready, is done.
  • 18.
    Black Box Testing oTesters get involved. o Knowing the specified function that a product has been designed to perform, testing is done so as to see if that function is fully operational and error free. o Not concerned with internal logical structure of the software. o Includes tests that are conducted at the software interface.
  • 19.
    Black Box Testing oOther names: o Closed Box Testing o Functionality Testing o Behavioral Testing o Test is done just by knowing the inputs and outputs without knowing their internal code implementation. BLACK BOXInput Output
  • 20.
    Types of BlackBox Testing o Functional Testing: o Related to functional requirements of the system. o Non-Functional Testing: o Not related to testing of a specific functionality but non-functional requirements such as performance, scalability, usability. o Regression Testing: o Done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
  • 21.
    References o http://www.guru99.com/ o OnlineQTP Tutorials. o http://www.nunit.org/
  • 22.