Is automation testing black box testing or white box testing?

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
5 Likes

There is no inherent black-box or white-box in automation. You can do automation on both.

4 Likes

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.
2 Likes

Automation isn’t testing - it’s only checking. Testing is done by manual testers.

Hi,

Testing is performed on various platforms like web application, mobile applications, Desktop application, salesforce lwc testing etc.
But a major difference between a black-box testing and white-box testing is the the knowledge of internal coding/structure of application.
A tester generally does not perform white box testing, it is usually done by developers.
Automation on the other hand is just way of running the application with the help of locators/elements of the application.
Black-box testing is the testing of functionality and is done by testers.
So by the definition the automation does not fall under any of these classifications, but if we have to choose one, it will be black-box testing.