In this example, we look at how we can auto-generate API tests from UI tests in Boozang using "Generate API" play mode.
There are many test automation tools to do API testing. As Boozang can be used for both End-2-End/UI tests and API tests it's possible to mix them in the same test, using the same test data. We have also launched the feature "Generate API" that records an API test based on a UI test. This way you can generate API tests really fast without the need for deep developer knowledge of the application.
We will use the test application "The Shop" to illustrate this functionalityhttp://theshop.boozang.com
provided by itswadesh.
In this application you can add a number of items to cart, and place and order for the items. When adding things to the cart, the cart is stored on the client side, so no API calls are being done. It's not until the user placed the order, the server-side is engaged via an API call.