Test automation is the use of special software to control the execution of tests and the comparison of actual outcomes against expected outcomes. Test automation can automate repetitive but necessary tasks in a formalized testing process, or conduct additional testing that would be difficult to perform manually.
The main approaches to Test automation are given below:
Code-driven testing: The public interfaces to classes, modules or libraries are tested with a variety of input arguments to validate that the results that are returned are correct.
Graphical user interface testing: A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behaviour of the program is correct.
API driven testing: A testing framework that uses an interface to the application to validate the behaviour under test.