Is automation testing black box testing or white box testing?
Keen to know in what context you ask this question Jahnvi. Without, it is difficult to provide a full answer.
But here are some of my thoughts on it:
- In general it can be both. I could stop here but will add more explanation
- It depends on which level of the application you want to implement your automation (GUI, interface, API, database)
- An automated test implementation on the GUI level generally speaking is black-box, but can make it more white-box by combining it with hooking up checkpoints in the lower layers of the application stack (checking logs for example).
- Testing without the GUI doesn’t necessarily imply white-box, when the only thing you do is execute a command and wait for the response to check
There is no inherent black-box or white-box in automation. You can do automation on both.
An additional thought of me.
Some whitebox testing tools are:
- Coverage tools
E.g. how many statements have been tested? How many conditions have been tested?
(If the age is lower than 3, then the ride is free.)
- Code analysers
E.g. according to the style guide this code is slow.
- Metrics tools
E.g. this class has more than 100 methods. This might be a sign of bad coding.
- Mutation testing tools
E.g. change the source code and look whether the existing test cases can detect the error.
Automation isn’t testing - it’s only checking. Testing is done by manual testers.