MockRest—A Generic Approach for Automated Mock Framework for REST APIs Generation
2020
Mock is an object that replicates the behavior of a real object in a disciplined way and improves unit testing. Unit testing is a testing where each individual or component is tested. The purpose of unit testing is to validate each unit of designed software and allow to verify the generated code is working properly, regardless of its dependencies. A system under test has some external dependencies like APIs and creating a mock object based on that kind of dependencies would be efficient rather than generate a test case on the actual instance of the dependencies. A real working system such as banking, autonomous vehicles, online-supply chain businesses, and E-commerce platforms are heavily dependent on a server and facing difficulty while testing with a real server. Mock server helps in testing by simulating the behavior of a real server. Mocks could be used for testing and developing the front-end even when the back-end is not available. The aim of our research work is to propose a generic approach in which we propose a mock framework named MockRest for REST API in Java. The main reason to propose such kind of framework is to get a consistent response while real API is down at the moment by creating a mock of REST API as it allows the developer to stay constructive while the API is being implemented. Application Programming Interface (API) allows interaction between software programs, exchanges their information while REST is an architectural style, and applies to the design of API. A Web API that follows the standards of REST architectural style is a REST API. Based on the description of Web services by its interface, Mock simulates its behavior.
Keywords:
- Correction
- Source
- Cite
- Save
- Machine Reading By IdeaReader
19
References
0
Citations
NaN
KQI