Testing
levels of testing
testing approaches
White-box and Black-box Testing
Size: 2.81 MB
Language: en
Added: Jul 09, 2021
Slides: 23 pages
Slide Content
Software Testing strategies By – ravina Jeswani Sophia Girls college (Autonomous) Ajmer www.sophiacollegeajmer.in
A STRATEGIC APPROACH TO SOFTWARE TESTING Testing is a set of activities that can be planned in advance and conducted systematically. For this reason a template for software testing—a set of steps into which we can place specific test-case design techniques and testing methods—should be defined for the software process. What is it? Software is tested to uncover errors that were made inadvertently as it was designed and constructed. But how do you conduct the tests? Should you develop a formal plan for your tests? Should you test the entire program as a whole or run tests only on a small part of it? Should you rerun tests you’ve already conducted as you add new components to a large system? When should you involve the customer? These and many other questions are answered when you develop a software testing strategy. Who does it? A strategy for software testing is developed by the project manager, software engineers, and testing specialists.
Levels of testing Unit Testing : Size of single module can be tested easily. Integration Testing : If single module work fine then it’s time to test that they will work fine if integrated together. System Testing : Testing the behavior of whole system,(As defined in Software Requirement Specification i.e. SRS) . VALIDATION TESTING : Testing a system as whole to find out if it is satisfies the requirements specifications.
Testing Strategy CODE DESIGN REQUIREMENTS SYSTEM ENGINEERING
Testing approaches
Testing approaches
Unit Testing UNIT TESTING is a type of software testing where individual units or components of a software are tested. The purpose is to validate that each unit of the software code performs as expected. Unit Testing is done during the development (coding phase) of an application by the developers. Unit Tests isolate a section of code and verify its correctness. A unit may be an individual function, method, procedure, module , or object . Code coverage techniques used in Unit Testing are listed below: Statement Coverage Decision Coverage Branch Coverage Condition Coverage Finite State Machine Coverage
Integration Testing INTEGRATION TESTING is defined as a type of testing where software modules are integrated logically and tested as a group. A typical software project consists of multiple software modules, coded by different programmers. The purpose of this level of testing is to expose defects in the interaction between these software modules when they are integrated. Once all the components or modules are working independently, then we need to check the data flow between the dependent modules is known as integration testing . Approaches : Top Down Bottom Up Sandwich/ Hybrid
Maintenance testing Regression Testing : Whenever a Software product is updated with new code, features or functionality, it is tested thoroughly to detect is there any negative impact of added code. Smoke Testing : It is used when software product is rebuilt(with new components added) and smoke test everyday.
System testing SYSTEM TESTING is a level of testing that validates the complete and fully integrated software product. The purpose of a system test is to evaluate the end-to-end system specifications. Usually, the software is only one element of a larger computer-based system. Ultimately, the software is interfaced with other software/hardware systems. System Testing is actually a series of different tests whose sole purpose is to exercise the full computer-based system.
Recovery Testing: To test system’s ability to recover from failure. Security & Portability Testing: This is done when software is meant to work on various platforms and accessed by number of persons..
System testing(non-functional testing)
Verification Testing Verification is the process of evaluating work-products of a development phase to determine whether they meet the specified requirements. verification ensures that the product is built according to the requirements and design specifications. It also answers to the question, Are we building the product right?
Validation Testing Validation Testing, carried out by QA professionals, is to determine if the system complies with the requirements and performs functions for which it is intended and meets the organization’s goals and user needs. This kind of testing is very important, as well as verification testing. Validation is done at the end of the development process and takes place after verification is completed.
Validation testing
Methods of testing 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.
Black box testing In the black-box testing, test cases are designed from an examination of the input/output values only and no knowledge of design , or code is required. The following are the two main approaches to designing black box test cases. • Equivalence class portioning • Boundary value analysis Equivalence Class Partitioning In this approach, the domain of input values to a program is partitioned into a set of equivalence classes. This partitioning is done such that the behavior of the program is similar for every input data belonging to the same equivalence class . Boundary Value Analysis A type of programming error frequently occurs at the boundaries of different equivalence classes of inputs. The reason behind such errors might purely be due to psychological factors.
White box testing One white-box testing strategy is said to be stronger than another strategy, if all types of errors detected by the first testing strategy is also detected by the second testing strategy, and the second testing strategy additionally detects some more types of errors . Control Flow Graph ( CFG ) A control flow graph describes the sequence in which the different instructions of a program get executed. In other words, a control flow graph describes how the control flows through the program . Data flow-based testing Data flow-based testing method selects test paths of a program according to the locations of the definitions and uses of different variables in a program .
Difference between Black Box testing and White Box testing Parameter Black Box testing White Box testing Definition It is a testing approach which is used to test the software without the knowledge of the internal structure of program or application. It is a testing approach in which internal structure is known to the tester. Alias It also knowns as data-driven, box testing, data-, and functional testing. It is also called structural testing, clear box testing, code-based testing, or glass box testing. Base of Testing Testing is based on external expectations; internal behavior of the application is unknown. Internal working is known, and the tester can test accordingly. Usage This type of testing is ideal for higher levels of testing like System Testing, Acceptance testing. Testing is best suited for a lower level of testing like Unit Testing, Integration testing.
Parameter Black Box testing White Box testing Programming knowledge Programming knowledge is not needed to perform Black Box testing. Programming knowledge is required to perform White Box testing. Implementation knowledge Implementation knowledge is not requiring doing Black Box testing. Complete understanding needs to implement White Box testing. Automation Test and programmer are dependent on each other, so it is tough to automate. White Box testing is easy to automate. Objective The main objective of this testing is to check what functionality of the system under test. The main objective of White Box testing is done to check the quality of the code. Basis for test cases Testing can start after preparing requirement specification document. Testing can start after preparing for Detail design document. Tested by Performed by the end user, developer, and tester. Usually done by tester and developers.
Parameter Black Box testing White Box testing Granularity Granularity is low. Granularity is high. Testing method It is based on trial and error method. Data domain and internal boundaries can be tested. Time It is less exhaustive and time-consuming. Exhaustive and time-consuming method. Algorithm test Not the best method for algorithm testing. Best suited for algorithm testing. Benefit Well suited and efficient for large code segments. It allows removing the extra lines of code, which can bring in hidden defects. Skill level Low skilled testers can test the application with no knowledge of the implementation of programming language or operating system. Need an expert tester with vast experience to perform white box testing.
Parameter Black Box testing White Box testing Techniques Equivalence partitioning is Black box testing technique is used for Black box testing. Equivalence partitioning divides input values into valid and invalid partitions and selecting corresponding values from each partition of the test data. Boundary value analysis checks boundaries for input values. Statement Coverage, Branch coverage, and Path coverage are White Box testing technique. Statement Coverage validates whether every line of the code is executed at least once. Branch coverage validates whether each branch is executed at least once Path coverage method tests all the paths of the program. Drawbacks Update to automation test script is essential if you to modify application frequently. Automated test cases can become useless if the code base is rapidly changing.