white box and black box testing in software engineering

NabeelRehman21 33 views 35 slides Dec 20, 2024
Slide 1
Slide 1 of 35
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35

About This Presentation

white box and black box testing in software engineering


Slide Content

Name: Abdul Suleman Roll No: 22081A1202 Branch: I.T. III Yr – I Sem Subject: Software Engineering PPT Presented to: Dr. G. Sridhar Shadan College Of Engg. & Tech.

Topic: “White Box & Black Box testing”

Software Testing Assessing / Measuring the software to determine its “Quality”. One of the KPA of project life cycle in ensuring quality of software.

What is Quality? Bug-free product. Fit to use on-spot. Produced as per the pre-defined specifications.

Testing Techniques Structural & Functional V&V Static & Dynamic White-Box & Black-Box

Structural and Functional Testing Structural testing is  a type of software testing which uses the internal design of the software for testing  or in other words the software testing which is performed by the team which knows the development phase of the software, is known as structural testing. Functional testing is a quality assurance process and a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered.

V & V Testing

Static and Dynamic testing Static Testing is a software testing technique which is  used to check defects in software application without executing the code . Static testing is done to avoid errors at an early stage of development as it is easier to identify the errors and solve the errors. Dynamic testing is a term used in software engineering to describe the testing of the dynamic behavior of code. That is, dynamic analysis refers to the examination of the physical response from the system to variables that are not constant and change with time.

Black – Box Testing

Black – Box Testing Black Box Testing  is a software testing method in which the functionalities of software applications are tested without having knowledge of internal code structure, implementation details and internal paths.  Mainly focuses on input and output of software applications. Also known as Behavioral Testing.

Types of Black-Box Testing Functional testing  – This black box testing type is related to the functional requirements of a system; it is done by software testers. Non-functional testing  – This type of black box testing is not related to testing of specific functionality, but non-functional requirements such as performance, scalability, usability. Regression testing  – Regression Testing is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.

Goal of Black-Box Testing “We do not code to determine a test suite , rather knowing the problem that we try to solve .”

Black-Box Testing Techniques Random Testing Equivalence Partitioning Decision tables State-based testing Boundary Value Analysis Error Guessing Compatibility testing

Random Testing Random testing is a  black-box software testing technique where programs are tested by generating random, independent inputs . Results of the output are compared against software specifications to verify that the test output is pass or fail.

Equivalence Partitioning Equivalence partitioning or equivalence class partitioning (ECP) is  a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived . In principle, test cases are designed to cover each partition at least once.

Decision Table Decision Table Testing is  a software testing methodology used to test system behavior for various input combinations . In this systematic approach, the several input combinations and their corresponding system behavior are represented in tabular form.

State Based Testing  State-based testing validates the expected transformations that can occur within a class. Classes are modeled using physical values assigned to the attributes of the class.

Boundary Value Analysis Boundary value analysis is a software testing technique in which tests are designed to include representatives of boundary values in a range. The idea comes from the boundary. Given that we have a set of test vectors to test the system, a topology can be defined on that set.

Error Guessing Error guessing is a  type of testing method in which prior experience in testing is used to uncover the defects in software . It is an experience based test technique in which the tester uses his/her past experience or intuition to gauge the problematic areas of a software application.

Compatibility Testing Compatibility Testing is a  type of Software testing to check whether your software is capable of running on different hardware , operating systems, applications, network environments or Mobile devices. Compatibility Testing is a type of Non-functional testing.

Procedure The foremost step is to understand the requirement specification of an application. Properly documented SRS (Software Requirement Specification) should be in place. Using the above mentioned Black Box Testing techniques such as Boundary Value Analysis, Equivalence partitioning etc, sets of valid and invalid inputs are identified with their desired outputs and test cases are designed based on that. The designed test cases are executed to check if they Pass or Fail by verifying the actual results with the expected results. Failed test cases are raised as Defects/Bugs and addressed to the development team to get it Fixed. Further, based on the defects being fixed, the tester retests the defects to verify if they are recurring or not.

Advantages of Black box Testing More effective on larger units of code than Glass Box testing (White box testing). Tester needs no knowledge of implementation including specific programming languages. Tester can be non technical This testing helps us to find and identify vagueness and contradictions in functional specifications. Tests are done from user’s point of view.

Disadvantages of Black Box testing Test cases are challenging to design without having clear functional specifications. There is a chance that program paths may left unchecked. More error prone as the tests cannot be directed towards specific segments of code. There might be a chance that programmer might have already committed certain amount of tests from his side, therefore, unnecessary repetition of tests occurring. Suitable for small amount of test cases.

White Box Testing

White Box Testing White-box testing is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality. In white-box testing an internal perspective of the system, as well as programming skills, are used to design test cases. Also known as Glass Box testing

White Box Testing (Contd.) Assumes that path of logic in a unit of the program is already known to the user. Consists of testing paths, branch by branch and produce predictable results. Focuses on internal knowledge of software to guide the selection of test data.

White Box Testing Techniques Statement Coverage - Involves execution of all statements of the source code at least once . It is used to calculate the total number of executed statements in the source code, out of total statements present in the source code. Decision Coverage - This technique reports true and false outcomes of Boolean expressions. Branch Coverage - Used to cover all branches of the control flow graph. 

White Box Testing Techniques (Cont.) Data Flow Testing - Group of testing strategies that examines the control flow of programs in order to explore the sequence of variables according to the sequence of events. Control Flow Testing -  In this technique, a particular part of a large program is selected by the tester to set the testing path.  “Choose the combinations of techniques appropriate for different types of applications!!!”

Steps to perform UNDERSTAND THE SOURCE CODE CREATE TEST CASES AND EXECUTE

Goal The goal of White Box testing in software engineering is to verify all the decision branches, loops, statements in the code.

Advantages of White Box Testing Code optimization by finding hidden errors. White box tests cases can be easily automated. Testing is more thorough as all code paths are usually covered. Testing can start early in SDLC even if GUI is not available.

Disadvantages of White Box Testing White box testing can be quite complex and expensive. Developers who usually execute white box test cases detest it. The white box testing by developers is not detailed can lead to production errors. White box testing requires professional resources, with a detailed understanding of programming and implementation. White-box testing is time-consuming, bigger programming applications take the time to test fully.

Difference

Difference (contd.)

THANK YOU
Tags