Tutorial 3: Create a service and simulation by capturing real API traffic
In this walkthrough you will capture then virtualize a currency exchange API which exposes one endpoint that returns currency exchange rate information.
Part 1. Explore the API we will capture and then simulate
{
"exchangerates": [
{
"name": "GBP",
"rate": 1.2731
},
{
"name": "EUR",
"rate": 1.0928
},
{
"name": "USD",
"rate": 1
},
{
"name": "JPY",
"rate": 0.007
},
{
"name": "CHF",
"rate": 1.1131
},
{
"name": "CAD",
"rate": 0.7558
},
{
"name": "AUD",
"rate": 0.6768
},
{
"name": "NZD",
"rate": 0.6168
},
{
"name": "RUB",
"rate": 0.0118
},
{
"name": "ZAR",
"rate": 0.0545
},
{
"name": "MXN",
"rate": 0.0582
},
{
"name": "AED",
"rate": 0.2723
}
],
"timeofquote": "2023-07-05T08:38:07"
}Part 2. Start up a Hoverfly instance as a proxy to the real API
Part 3. Capture a request/response pair from the real API
Part 4. Explore the newly created Simulation
Part 5. Change the Request matcher to play back the same response no matter what currency is passed in
Part 6. Change the Response to provide random synthesized data
Part 7. Save the captured and edited simulation as a shareable Simulation
Part 8. Remove the service and simulation
PreviousTutorial 2: Create a service and simulation by importing from a Swagger specificationNextResponse Templating
Last updated




