Which type of testing would you say should be the emphasis (for testers/QAs), and why?
A quick set of definitions from wikipedia:
Black box 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.
I only partially agree with the top rated answer for this question. Which type of testing would you say should be the emphasis (for testers/QAs), and why?
I agree with the definition here which states that White Box Testing method is applicable to the following levels of software testing:
Testers need to focus on the testing pyramid. You will want to understand unit tests, integration tests, and end to end tests. Each of these can be performed both with black box and white box testing. Start small and work your way up learning the different types and when to use each. remember you cant always test everything.
QA should focus on Black box testing. The main goal of QA is to test what the system does (do features meet requirements ?), not how it does it.
Anyway it should be hard for QA to do white box testing as most of QA guys aren't tech guys, so they usually test features through the UI (like users).
A step further, I think developpers too should focus on Black box testing. I disagree with this widespread association between Unit testing and White box testing but it may be just a question a vocabulary/scale. At the scale of a Unit test, the System Under Test is a class/method which has contract (through its signature) and the important point is to test what it does, not how. Moreover White box testing implies you know how the method will fill its contract, that seems incompatile with TDD to me.
IMHO if your SUT is so complex that you need to do white box testing, it's usually time for refactoring.
Black Box
1 Focuses on the functionality of the system Focuses on the structure (Program) of the system
2 Techniques used are :
· Equivalence partitioning
· Boundary-value analysis
· Error guessing
· Race conditions
· Cause-effect graphing
· Syntax testing
· State transition testing
· Graph matrix
Tester can be non technical
Helps to identify the vagueness and contradiction in functional specifications
White Box
Techniques used are:
· Basis Path Testing
· Flow Graph Notation
· Control Structure Testing
Condition Testing
Data Flow testing
· Loop Testing
Simple Loops
Nested Loops
Concatenated Loops
Unstructured Loops
Tester should be technical
Helps to identify the logical and coding issues.