Below topic will be covered under this page
• Black box Testing Introduction
• Types of Black Box Testing
• Black Box Testing Techniques
• Black Box Testing Tools
• Black Box Testing Procedure
• Advantages and disadvantages of Black Box Testing
• Difference between Black box and White Box Testing
Black Box Testing Introduction
Black Box Testing is a technique to test the UI (User Interface) / functionality of any test object without the knowledge of its internal code structure or implementation details. Test cases are designed completely on the basis of SRS (Software Requirement Specification) document shared by customer.
This type of testing is also called as Behavioural Testing or Specification based testing or Closed/Opaque box testing where testers evaluate actual output with expected as per given input without knowing its internal structure. This type of testing can be done at each level of SDLC like Unit, Integration, System and
Types of Black Box Testing
Prevailing Black box testing types are mentioned below:
- Functional Testing: This type of testing validates functionality of the application as mentioned in SRS (Software Requirement Specification) document.
Below mentioned are the major types of Functional Testing:
• Integration Testing
• System Testing
• UAT (User Acceptance Testing)
• Regression Testing
• Sanity Testing - Non-Functional Testing: This type of testing deals with non-functional requirement of any software application to improve overall quality.
Below mentioned are the major types of Non-Functional Testing:
• Performance Testing
• Load Testing
• Stress Testing
• Compatibility Testing
• Usability Testing
Black Box Testing Techniques
In order to validate system effectively it is recommended to design test cases using certain techniques. Prevailing Black box testing techniques are mentioned below:
- Equivalence Class Partitioning: Under this technique Input field’s range is divided into logical groups or classes as per its output similarity, where one input value will be taken from each class to cover the full range as it’s not possible test all input value from any range. Supposed any input field can take integer value from 1 to 100 then (<=0) and (>=101) will be invalid classes and (1 to100) will be valid class.
- Boundary Value Analysis: This technique is used to validate the values around the boundary of any input field. Supposed if any input field can take integer values from 1 to 100, then try to enter invalid values like 0 or 101, application should give valid error message, now try to enter any valid value from 1, anything from 2 to 98 and 100, Application should accept. So overall boundary values here will be (0,1, anything from 2 to 98, 99,100).
- Decision Table Technique/Cause Effect Graph: This type of technique is used when system output is dependent on the combinations of input conditions. Testers should first identify the rules then create cause-effect graph to capture all rules (set of input conditions and their respective outputs) to write test cases for all the possible combinations of each decision control statement under any function. Then create decision table from cause effect graph to prepare test cases.
- State Transition Technique: This validation technique is used when system behaviour/state gets changed after certain number of input attempts. Testers should have knowledge on state transition rules to write test cases around such scenarios. For e.g., if any application locks user’s account after 3 failed attempts so tester should write first test cases on 3 failed attempt to validate appropriate error message and another one on 4th attempt to validate if user’s account has been locked or not.
- Error Guessing Technique: This type of testing techniques is also called as experience based testing where tester validates the overall application as per his experience by testing defect prone areas or scenarios where developers generally make mistakes for e.g., input field length or data type validation etc.
- Syntax Driven Testing: This technique is used to validate the predefined data format of any input field, file format and Database Schema of AUT (Application Under Test). Automation testing is recommended to validate Syntax of AUT since large amount of test data is required.
To enable Syntax testing Testers should declare target language or format first then define syntax of the language, later verify the syntax by matching expected result with actual.
- Requirement Based Testing: This technique is used to validate all requirements mentioned in SRS (Software Requirement Specification) document by preparing high level test condition metrics and validating.
- All Pair Testing Technique: This technique is used to validate all possible different input combinations of available text field, radio buttons, check boxes and drop down on any web page of AUT (Application under test).
- Use Case Technique: This technique is used to validate application from end user’s perspective how application will be used by them and test scenarios will be identified accordingly from start to end as per the usage of the application.
Black Box Testing Tools: Black box testing tools can be divided broadly into two categories depending on the type of testing technique used
Regression Testing Tool: QTP/UFT, Selenium,
Performance Testing Tool: Load Runner, JMeter,
Black Box Testing Procedure/ stages in SDLC
• Tester should analyse SRS document to understand the functionality of AUT (Application Under Test).
• Write High level test conditions using traceability metrics.
• Prepare detailed test cases with all the details of sample input data, test procedure and expected result.
• Execute test cases on AUT.
• Compare actual result with expected and capture the result.
• Log the defect if any discrepancy found.
Advantages of Black Box Testing:
• Testers doesn’t require structural or programming knowledge to test the Application.
• Testing is done completely from Testers and end users/business users’ perspective.
• Test cases can be easily created using SRS (software requirement specification) documents.
Disadvantages of Black Box Testing:
• Possibility of missing test scenarios which may lead to defect leakage.
• Programming /code level defects won’t get revealed.
• It is very time consuming and exhaustive to test with large set of sample test data.
Difference between Black box and White Box Testing
Black Box Testing White Box Testing
Black box testing is mainly focused on testing of functional requirement. White box testing is mainly focused on testing of internal code structure.
Tester can test the application by referring SRS document. Tester should have knowledge of programming language to test the internal code structure.
Tester focus on communication among various modules throughout the application. Tester focus on internal code structure and flow of control inside any module.
Equivalence Class partitioning, Boundary value analysis, Decision table testing, Experience-Based testing, Graph-based testing etc are few approaches for Black box testing. Control flow, Data flow, Path coverage, Condition coverage and Decision coverage are few approaches for White box testing.
Leave a Reply