0% found this document useful (0 votes)
14 views

Se 7

Hha

Uploaded by

tophitsongsmedia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Se 7

Hha

Uploaded by

tophitsongsmedia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Practical-7

To perform various White box and Black Box Testing Techniques.

Black box testing:-


It is a software testing technique where the internal workings or code structure
of the system being tested are not known to the tester.

Tools used for black box testing:-


• Selenium is an open-source testing framework that allows testers to automate
the testing of web browsers, making it a valuable tool for performing black
box testing on web-based systems.
• Appium is another popular tool that is often used for black box testing,
particularly for mobile application.
• Cypress is a powerful test automation framework primarily used for front-end
testing, including end-to-end (E2E) testing and user interface (UI) testing.

Advantages:-
• Provides a balanced approach by covering both functional aspects and
internal logic.
• Helps in identifying defects that might be missed by either black box or white
box testing alone.
• Allows testers to focus on security vulnerabilities with an understanding of
the system’s architecture.
• Facilitates the testing of interactions between components or systems with a
partial understanding of how they work together.
• Suitable for systems with complex interactions or multiple integrated
components.

Disadvantages:-
• Involves only partial knowledge of the system’s internals, which might limit
the depth of testing.
• May not uncover all internal issues or provide complete coverage of all code
paths, especially if the internal knowledge is insufficient.
• Designing test cases that combine both functional and internal aspects can be
complex and time-consuming.
White box testing:-
It is a form of application testing that provides the tester with complete
knowledge of the application being tested, including access to source code and
design documents.

What do you verify in white box testing:-

1. Control Flow: Verifies the sequence of program execution.

2. Data Flow: Examines how data moves through variables and parameters.

3. Logic: Checks correctness of conditional statements, loops, and logical


operations.

4. Variable Initialization: Ensures proper initialization of variables.

5. Error Handling: Tests error detection, reporting, and recovery


mechanisms.

6. Boundary Values: Verifies handling of extreme values and edge cases.

7. Code Coverage: Measures the percentage of code executed during


testing.

8. Integration: Tests interactions between modules, functions, and


components.

Advantages:-
1) White box testing helps identify and fix code-level issues, improving
overall code quality.
2) Testing at the code level detects defects early, reducing downstream costs.
3) White box testing identifies areas for code optimization, improving
performance.
4) Testing internal code logic helps identify potential security vulnerabilities
5) White box testing reduces debugging time by identifying issues during
testing.
Disadvantages:-
1)White box testing requires in-depth knowledge of programming languages
and code.
2) Creating test cases for complex code can be time-consuming.
3) Testing complex algorithms and logic can be challenging.

Difference between black box testing and white box testing:-

TEST CASE:-
A test case is a set of inputs, expected results, and preconditions designed
to verify a specific functionality or behavior of a software application.

Examples of Test Case:-


Test Case 1: Login Functionality
- Test Case ID: TC-001
- Description: Verify successful login with valid credentials.
- Preconditions: User account exists.
- Inputs:
- Username: test user
- Password: test password
- Expected Result: User logged in successfully.

Test Case 2: Payment Processing


- Test Case ID: TC-002
- Description: Verify payment processing with invalid card details.
- Preconditions: User logged in.
- Inputs:
- Card Number: 1234567890123456
- Expiration Date: 02/2020
- CVV: 123
- Expected Result: Error message “Invalid card details.”

Test case format :-

Test case ID Test case precon- Inputs Expected Status


description ditions result
TC-001 Verify User Username: test User logged pass
successful account user, in
login exists password: successfully
test password
TC-002 Verify User Card Error Fail
payment logged in no.:123456789 message
processing 0 “invalid card
with invalid expiration details”.
card Date: 02/2024,
CVV: 123

TC-003 Verify search User Search Relevant pass


result for logged in keyword: search
keyword software results
testing displayed.

You might also like