CH05.L01 . Black box or white box testing
Summary
TLDRThis script delves into the distinctions between Black Box and White Box Testing, highlighting their respective applications in software development. Black Box Testing, akin to 'specification-based testing', is used for functional and non-functional testing without considering the internal system structure, suitable for later stages like System and Acceptance Testing. In contrast, White Box Testing, known as 'structural-based' or 'glass box', involves examining the system's internal code, crucial for early stages such as Unit and Integration Testing. The script also emphasizes the importance of 'Test to pass' for validating minimum requirements and 'Test to fail' for uncovering software weaknesses, suggesting that practice and learning are key to effective test case development.
Takeaways
- 🔍 Black Box Testing is used for functional and non-functional testing without considering the internal structure of the system.
- 📚 Black Box Testing is based on specifications, where inputs are added and outputs are checked against expected results.
- ✅ If the output matches the expected result in Black Box Testing, it's considered a 'pass'; otherwise, it's a 'fail'.
- 👀 Black Box Testing is conducted from the perspective of an end user without technical background, focusing on the program's functionality.
- 🏢 Black Box Testing is suitable for later testing stages such as System Testing and Acceptance Testing.
- 💼 White Box Testing, also known as Structural Based Testing or Glass Box Testing, allows the tester to see the internal structure and requires access to the source code.
- 🔍 White Box Testing focuses on the code structure, ensuring all paths, conditions, and statements are executed and checked for bugs.
- 🔨 White Box Testing is more suitable for initial testing levels like Unit Testing and Integration Testing.
- 📝 Test cases can be written for two purposes: 'Test to pass' for the happy scenario and 'Test to fail' for the bad scenario.
- 💡 'Test to pass' aims to ensure the software meets its minimum requirements, simulating typical user behavior.
- 🚨 'Test to fail' involves creating the most challenging scenarios to find software weaknesses and bugs, often requiring creative and destructive test cases.
Q & A
What is Black Box Testing?
-Black Box Testing is a method of testing where the tester focuses on the functionality of the software without considering the internal structure or the source code. It is based on the software's specifications and is used to determine if the software behaves as expected when given specific inputs.
What is White Box Testing?
-White Box Testing, also known as Structural Based Testing or Glass Box Testing, is a method where the tester has access to the internal structure of the software, including the source code. It focuses on the paths, conditions, and statements in the code to ensure that all parts of the code are executed and tested.
When is Black Box Testing typically used?
-Black Box Testing is suitable for the later stages of testing, such as System Testing and Acceptance Testing. It is used when the tester wants to evaluate the software from the end user's perspective without needing to understand the internal workings of the software.
When is White Box Testing typically used?
-White Box Testing is more suitable for the initial levels of testing, such as Unit Testing and Integration Testing. It is used when the tester needs to understand and test the logic and structure of the software code.
What is the purpose of Black Box Testing?
-The purpose of Black Box Testing is to verify that the software meets its functional requirements as specified in the software specifications. It checks if the software produces the expected output when provided with specific inputs.
What is the purpose of White Box Testing?
-The purpose of White Box Testing is to ensure that all paths and conditions in the software code are tested. It helps in identifying any untested code paths or conditions that might lead to bugs or errors.
What is meant by 'specification based testing' in the context of Black Box Testing?
-'Specification based testing' refers to a testing approach where the test cases are designed based on the software's specifications. The tester does not need to look at the internal code but focuses on whether the software behaves as described in the specifications.
What is the significance of 'Structural based testing' in White Box Testing?
-'Structural based testing' in White Box Testing means that the test cases are designed based on the structure of the software code. The tester checks if all code paths, conditions, and statements are executed as expected.
What are the two main reasons for writing test cases in any testing technique?
-The two main reasons for writing test cases are to 'Test to pass' and 'Test to fail'. 'Test to pass' aims to ensure that the software meets its minimum requirements and behaves as expected under normal conditions. 'Test to fail' aims to identify the weaknesses in the software and find bugs by testing the software under extreme or unexpected conditions.
How does the approach to test case design differ between Black Box Testing and White Box Testing?
-In Black Box Testing, test cases are designed from the perspective of an end user, focusing on the software's functionality and expected outcomes. In White Box Testing, test cases are designed based on the internal structure and logic of the software code, focusing on ensuring that all code paths and conditions are tested.
Why is it important to train, practice, and learn in testing techniques?
-Training, practicing, and learning in testing techniques help testers to better understand how to write effective test cases for both 'Test to pass' and 'Test to fail' scenarios. This improves the quality of testing and helps in identifying more bugs and ensuring that the software meets its requirements.
Outlines
🔍 Understanding Black Box and White Box Testing
This paragraph introduces the fundamental differences between Black Box Testing and White Box Testing. Black Box Testing is described as a 'specification-based testing' approach that focuses on the functionality and non-functionality of a system without considering its internal structure. It is suitable for later stages of testing such as System Testing and Acceptance Testing. In contrast, White Box Testing, also known as 'Structural based testing' or 'Glass box testing', involves examining the internal structure and source code of the system. This method is more suitable for initial testing levels like Unit Testing and Integration Testing. The paragraph also discusses the importance of writing test cases for both 'Test to pass' (Happy scenario) and 'Test to fail' (Bad scenario), emphasizing the need for thorough testing to ensure software reliability.
Mindmap
Keywords
💡Black Box Testing
💡White Box Testing
💡Functional Testing
💡Non-Functional Testing
💡Specification Based Testing
💡Structural Based Testing
💡System Testing
💡Acceptance Testing
💡Unit Testing
💡Integration Testing
💡Happy Scenario
💡Bad Scenario
Highlights
Black Box Testing is applied for functional and non-functional testing without referring to the internal structure of the system.
Black Box Testing is also known as 'specification based testing'.
In Black Box Testing, inputs are added to a running program without seeing the program's code.
The output is compared against the expected result written in the specification to determine if the test passes or fails.
Black Box Testing is suitable for System Testing and Acceptance Testing.
White Box Testing is referred to as 'Structural based testing' or 'glass box testing'.
White Box Testing involves seeing the internal structure of the system and having access to the source code.
This type of testing focuses on the structure of the code, ensuring all paths and conditions are covered.
White Box Testing is more suitable for initial levels of testing such as Unit Testing and Integration Testing.
Test cases in White Box Testing are designed for the logic test of the program.
Testing techniques can be used to write test cases for two reasons: to pass (Happy scenario) and to fail (Bad scenario).
The 'Test to pass' aims to assure that the software meets its minimum requirements.
The 'Test to fail' strategy involves choosing the hardest scenarios to find the weaknesses and bugs in the software.
Writing test cases that can damage the program is part of the 'Test to fail' approach.
Training, practicing, and learning are essential for effectively identifying 'test to pass' and 'test to fail' scenarios.
Both Black Box and White Box testing have their unique applications and are crucial in different stages of the software testing process.
Transcripts
Black Box Testing
& white Box Testing:
what is the difference between them? when do we use them?
which one of them will be used in
each level of testing?
That is what we will know together.
we will start with Black box testing
which we apply for functional and non-functional
without referring to
the internal structure of the system
which we call "specification based testing"
because I have
a running program and according to
its specification,I can try its execution
I will add input
without seeing the program's code.
if the output is the same as the expected result
written in the specification,
then the result is "pass".
if not, then it is "fail".
For example, if the required is a ,
it presents a certain value when
we add numbers on it. so we test
the output and if the result i have is correct or
without referring to the calculator's code
I should act from
the view of the end user,
and deal as a user
who doesn't have any technical background.
therefore, the Black box testing
is suitable for all the
last testing levels, such as
System testing and acceptance testing.
As for the White box testing
which we call "Structural based testing"
or "glass box testing".
From its name, we can understand that
I can see the internal of the system
and I have at least the source code.
it focuses on the structure
of the code. Since the code of
the system has paths, conditions
and many statements, this type
of testing ensures that
I have passed all paths and conditions
and check if the compiler makes
an execution for them, or there are
some lines of codes have not been checked
due to a certain bug. And since the test case design
in White box testing is written
for the logic test of the program,
so this way of testing is more suitable
for the initial levels of testing
such as: Unit Testing
and Integration Testing.
Finally, there is an important note in
any testing techniques, that we can write
the test case for 2 reasons: either
Test to pass, and that is what we call
the Happy scenario of the software,
or Test to fail, and that is what we call
the Bad scenario of the software.
in "Test to pass" our aim is to assure
that the software is doing its minimum
requirements. The way we write
the test case is simple, as the user
may use the software in a right way
without facing any problems.
for the "Test to fail",
I choose the hardest scenarios
of the software, and use the strategy
that finds out the weaknesses of the software
and lets me find the bugs as much as I can.
I write the test case with the ideas
that I can use to damage the program.
we have to notice that, when you
start to write the test case,
you may fail to write the test case
which makes this program fails.
or you don't know any scenarios.
Of course, this will be easier by training, practicing
and learning which will form a good reference
for us to find out "test to pass"
and "test to fail", whether we work
as Black box testing
or White box testing.
関連動画をさらに表示
CH05.L08 . Conclusion
ISTQB FOUNDATION 4.0 | Tutorial 36 | Value of White Box Test Techniques | CTFL Tutorials | TM SQUARE
CH02. L02. Test-types
Types of Testing in Software Engineering | Levels of Testing
ISTQB FOUNDATION 4.0 | Tutorial 19 | Test Types | White Box Testing | Black Box Testing | TM SQUARE
ISTQB FOUNDATION 4.0 | Tutorial 18 | Test Types | Functional Testing | Non-Functional Testing | CTFL
5.0 / 5 (0 votes)