Create simulations from API message
APIs allow different software applications to communicate with each other and exchange information. In API testing, you send requests to the API and check the responses to ensure that everything works as expected.
If you want to save your API message as a simulation, you can easily create one:
-
Go to
API simulation > API playground.
-
Create a new API message or select an existing one from the left pane.
-
In the subsequent dialog, select Create simulation and the type of service you want to create:
-
Service: A service that waits for an incoming message and responds like a real service (inbound).
-
Runnable: A runnable service that starts with an outgoing message to request data from other services (outbound).
-
-
Enter a unique name for your simulation.
-
Select whether you want to create your simulation with or without a connection. You need a connection in your simulation to define the endpoint to which a service sends messages. To create a new connection, enter the Port and Connection name. Select No connection, if you want to manually add an existing connection later.
And that's it! To view your new simulation, go to API simulation > Simulation registry.
What's next
Deploy the simulation you've just created and give it a try.