Home

Awesome

Shock

Warning: This library is not supported by Just Eat Takeaway anymore and therefore considered deprecated. The repository has been archived.

An HTTP mocking framework written in Swift.

DemoApp

The DemoApp is a sample app that shows how to use the Shock framework.

Recording API calls with ShockRecorder

To record API calls during the demo app execution, enable the SAVE_API_RESPONSES_ON_DISK argument passed on launch in the DemoApp scheme.

Once the flag is enabled, the API responses will be saved in the data_responses folder, you can find the path in the console logs, e.g.

[ShockRecorder] filePath: file:///Users/user/Library/Developer/CoreSimulator/Devices/BE295F5C-5D11-4C70-A74E-52AF3389F0C9/data/Containers/Data/Application/A49E2BCB-1E12-4A34-8DE8-9262742BC564/Documents/data_responses/2023-09-23-16-23-31_001_GET_api_breeds_image_random.json

To record API calls during the UITests execution: