1. A method for automatically testing an Application Programming Interface (API), the method comprising: determining, by a processor, a type of Application Programming Interface (API), a type of input data elements processed by the API, and a type of output generated by the API; identifying, by the processor, a web application template based on the type of API, wherein the web application template comprises libraries required for invoking the API; generating, by the processor, a first Hyper Text Markup Language (HTML) page comprising a HTML form, wherein the HTML form comprise User Interface (UI) elements to be mapped with input parameters; creating, by the processor, input data elements using the input parameters received from the HTML form; invoking, by the processor, the API using the input data elements to generate an output; generating, by the processor, a second HTML page for providing the output generated by invoking the API, wherein the second HTML page is created based on the type of output generated by the API; generating, by the processor, a set of test scripts for accepting inputs from a data file; receiving, by the processor, the inputs in the first HTML form; submitting, by the processor, the first HTML form to generate final outputs by the API; and verifying, by the processor, the final outputs by matching the final outputs with expected outputs stored in the data file, thereby automatically testing the API, wherein the API is one of: Representational State Transfer/JavaScript Object Notation (REST/JSON), Representational State Transfer/Extended Markup Language (REST/XML), Simple Object Access Protocol (SOAP), and Normal Java Code.