140 likes | 206 Views
Subject Name: Software Testing Subject Code: 10CS842 Prepared By: Tamilarasi.R Department: CSE Date. Unit –I A Perspective on Testing, Examples. Topics. Basic definitions Test cases Insights from a Venn diagram Identifying test cases Error and fault taxonomies
E N D
Subject Name: Software Testing Subject Code: 10CS842 Prepared By: Tamilarasi.R Department: CSE Date
Unit –I A Perspective on Testing, Examples
Topics • Basic definitions • Test cases • Insights from a Venn diagram • Identifying test cases • Error and fault taxonomies • Levels of testing • Examples: Generalized pseudo code, The triangle problem, The Next Date function, The commission problem, The SATM (Simple Automatic Teller Machine) problem, The currency converter, Saturn windshield wiper.
Basic Definitions • Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. • Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation.
Test Cases A test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements or works correctly. Formal Test cases A formal written test-case is characterized by a known input and by an expected output, which is worked out before the test is executed. Informal Test cases For applications or systems without formal requirements, test cases can be written based on the accepted normal operation of programs of a similar class.
Test case format Test case ID Test case description Test step or order of execution number Related requirement(s) Depth Test category Author Check boxes for whether the test can be or has been automated Pass/Fail Remarks
Characteristics of good Test case Accurate: Exacts the purpose. Economical: No unnecessary steps or words. Traceable: Capable of being traced to requirements. Repeatable: Can be used to perform the test over and over. Reusable: Can be reused if necessary.
Insights from a Venn diagram A diagram using circles to represent sets, with the position and overlap of the circles indicating the relationships between the sets.
Identifying test cases There are many approaches available in software testing. Reviews, walkthroughs, or inspections are referred to as static testing, whereas actually executing programmed code with a given set of test cases is referred to as dynamic testing. Software testing methods are traditionally divided into white- and black-box testing. White-box testing tests internal structures or workings of a program, as opposed to the functionality exposed to the end-user.
Black-box testing treats the software as a "black box", examining functionality without any knowledge of internal implementation • Specification-based testing aims to test the functionality of software according to the applicable requirements. • The aim of visual testing is to provide developers with the ability to examine what was happening at the point of software failure by presenting the data in such a way that the developer can easily find the information he or she requires, and the information is expressed clearly. • Grey-box testing involves having knowledge of internal data structures and algorithms for purposes of designing tests, while executing those tests at the user, or black-box level
Error and fault taxonomies • Fault : It is a condition that causes the software to fail to perform its required function. • Error : Refers to difference between Actual Output and Expected output. • Failure : It is the inability of a system or component to perform required function according to its specification.
Levels of testing • There are generally four recognized levels of tests: Unit testing Integration testing System testing Acceptance testing. • Unit testing, also known as component testing, refers to tests that verify the functionality of a specific section of code, usually at the function level. • Integration testing is any type of software testing that seeks to verify the interfaces between components against a software design.
Component interface testing The practice of component interface testing can be used to check the handling of data passed between various units, or subsystem components, beyond full integration testing between those units. • System testing, or end-to-end testing, tests a completely integrated system to verify that it meets its requirements • Acceptance Testing At last the system is delivered to the user for Acceptance testing.
Example for testing • Generalized pseudo code, The triangle problem, The Next Date function, The commission problem, The SATM (Simple Automatic Teller Machine) problem, The currency converter, Saturn windshield wiper