Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Software Testing


Published on

Study meeting presentation

Published in: Software
  • Be the first to comment

  • Be the first to like this

Software Testing

  1. 1. Software Testing Denmark Anthony S. Tan
  2. 2. What is Software Testing? • Software testing is a process of executing a program or application with the intent of finding bugs. • Is a process used to identify the correctness, completeness and quality of developed computer software. • It is the process of verifying and validating a software program or application.
  3. 3. What are the importance of Software Testing? • Testing is executing a system in order to identify any gaps, errors, or missing requirements in contrary to the actual requirements. • To check whether the actual results match the expected results and to ensure that the software system is defect/bug/error free. • To meet the business and technical requirements that guided it’s design and development.
  4. 4. What is V Model? • V- model is SDLC (Software Development Life Cycle) model where execution of processes happens in a sequential manner in V-shape. • It is also known as Verification and Validation Model. • V-model is an extension of the waterfall model and is based on association of a testing phase for each corresponding development stage.
  5. 5. V model Pros and Cons
  6. 6. V model design
  7. 7. Verification Phases • Business Requirement Analysis: This is the first phase in the development cycle where the product requirements are understood from the customer perspective. This phase involves detailed communication with the customer to understand his expectations and exact requirement. • System Design: In this phase its time to design the complete system. In system design it is the process of defining the architecture, components, modules, interfaces and data for a system. It is the application of systems theory to product development. System test plan is developed based on the system design. • Architectural Design: This phase can also be called as high level design (HLD). The structure of the data and program components that are required to build a system is defined in this stage. The integration testing can be designed and documented during this stage. • Module Design: This phase can be called as low level design (LLD). It is important that the design is compatible with the other modules in the system architecture and other external systems. Unit tests can be designed at this stage based on the internal module designs.
  8. 8. Coding Phase • The actual coding of the system modules designed in the design phase is taken up in the Coding phase. • The best suitable programming language is decided based on the system and architectural requirements. • The coding is performed based on the coding guidelines and standards. • The code goes numerous code reviews and is optimized for best performance.
  9. 9. Validation Testing • Unit Testing: Unit tests designed in the module design phase are executed on the code during this validation phase. Unit testing is the testing at code level and helps eliminate bugs at an early stage. • Integration Testing: Integration testing is associated with the architectural design phase. Integration tests are performed to test the coexistence and communication of the internal modules within the system. • System Testing: System testing is directly associated with the System design phase. System tests check the entire system functionality and the communication of the system under development with external systems. • Acceptance Testing: Acceptance testing is associated with the business requirement analysis phase and involves testing the product in user environment. Acceptance tests discovers the non functional issues such as load and performance defects in the actual user environment.
  10. 10. Why Unit Testing is important? • Unit testing is a testing technique that is designed to verify individual modules (functions, classes, etc.) at a low level, to verify that module is behaving as specified and determined if there are any issues by the developer himself. • It is concerned with functional correctness of the standalone modules. • Isolate each unit of the system to identify, analyze the defects. • Reduces defects in the newly developed features, reduces bugs when changing the existing functionality.
  11. 11. What is Equivalence Partitioning? • Also known as equivalence classes. • It is a specification based or black-box technique. • Divide a set of test conditions into groups that can be considered the same. • Test only one condition from each partition. • If one condition in one partition works, in this technique it assume all the conditions in that partition will work. • If one of the conditions in a partition does not work, in this technique it assume that none of the conditions in that partition will work.
  12. 12. Example of Equivalence Partitioning • Let's consider the behavior of tickets in the Flight reservation application, while booking a new flight. • Ticket values 1 to 10 are considered valid & ticket is booked. While value 11 and more are considered invalid for reservation and error message will appear, "Only ten tickets may be ordered at one time."
  13. 13. Example of Equivalence Partitioning -Here is the test condition • Any Number greater than 10 entered in the reservation column (let say 11) is considered invalid. • Any Number less than 1 that is 0 or below, then it is considered invalid. • Numbers 1 to 10 are considered valid • Any 3 Digit Number say -100 is invalid.
  14. 14. Example of Equivalence Partitioning • The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick only one value from each partition for testing. The hypothesis behind this technique is that if one condition/value in a partition passes all others will also pass. Likewise, if one condition in a partition fails, all other conditions in that partition will fail.
  15. 15. What is Boundary Value Analysis? • It is the best known functional testing technique. • It is based on testing boundaries between equivalence partitions • It have valid boundaries (in the valid partitions) and invalid boundaries (in the invalid partitions). • Basic idea is to select input variable values at their (minimum, above minimum, nominal value, below the maximum and maximum).
  16. 16. Example of Boundary Value Analysis • Input Box should accept the Number between 1 and 10.
  17. 17. Example of Boundary Value Analysis Test Scenario Test Scenario Description Expected Outcome 1 Value = 0 System should NOT accept. 2 Value = 1 System should accept. 3 Value = 10 System should accept. 4 Value = 11 System should NOT accept.
  18. 18. Example of Equivalence Partitioning and Boundary Value Analysis • First textbox user can input 0-23 hour. • Second textbox user can input 0-59 minutes. • Then a submit button.
  19. 19. Example of Equivalence Partitioning and Boundary Value Analysis -Equivalence Partitioning • Class 1: 24 hours and -1 minute • Class 2: 24 hours and 10 minutes • Class 3: 24 hours and 60 minutes • Class 4: 10 hours and 1 minute • Class 5: 23 hours and 59 minutes • Class 6: 10 hours and 60 minutes • Class 7: -1 hour and -1 minute • Class 8: 0 hour and 0 minute • Class 9: -1 hour and 10 minutes • Class 10: -1 hour and 60 minutes
  20. 20. Example of Equivalence Partitioning and Boundary Value Analysis -Boundary Value Analysis • Test the boundaries between equivalence partitions. • -1, 0, 23, 24 hours • -1, 0, 59, 60 minutes • Test 1: Min value = 0 & Max value = 23 hour : System should accept • Test 2: Min value = -1 & Max value = 24 hour : System should not accept • Test 3: Min value = 0 & Max value = 59 minutes : System should accept • Test 4: Min value = -1 & Max value = 60 minutes : System should not accept
  21. 21. Why Integration Testing is important? • Integration testing starts at the very early stages of development and bugs are caught earlier rather than late in the cycle. • Integration testing focuses mainly on the interfaces, flow of data/information between modules. • Integration tests catch system-level issues, such as a broken database schema, mistaken cache integration, and so on.
  22. 22. What is Finite State Machine Diagram? • Also called finite-state automata. • Is a mathematical model of computation used to design both computer programs and sequential logic circuits. • It is conceived as an abstract machine that can be in one of a finite number of states. • The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition; this is called a transition. • A particular FSM is defined by a list of its states, and the triggering condition for each transition
  23. 23. Why we need to use finite state machine diagram for integration testing? • Finite state machine diagram described aspect of the system. • The diagram is detailed or abstract, the tester will know where a part of the system is more important (that is, requires more testing) and when the system is less important (it requires less testing). • With the use of finite state machine diagram for integration testing it will guide testers because the diagram will show the detailed different states, transitions from one state to another, the events that cause a transition, the action that result from a transition and its is determined in the rules of the machine.
  24. 24. 5 Steps to draw a State Machine Diagram • Define States - in UML is a condition or situation in a system • Describe States - tell others more in detail about what those states are with documentation for future reference. • Draw Transitions - draw directed lines to depict changes from one state to another. • Define Transition Triggers - place constraints that need to be met before a transition. • Define Guard Conditions - a constraint to check before allowing the transition happen.
  25. 25. Thank you!