API Integration
Feature: features/api_integration.feature
Description: As a developer, I want to integrate with external APIs
Scenario:Fetch user data from API
-
✓Given the API is available [0.00s] features/step_definitions/api_steps.rb:12
-
✓When I request user data for ID "12345" [0.00s] features/step_definitions/api_steps.rb:28
-
✓Then I should receive valid user data [0.00s] features/step_definitions/api_steps.rb:45
Scenario:Handle API connection timeout
-
✓Given the API is slow to respond [0.00s] features/step_definitions/api_steps.rb:18
-
✓When I request user data with a 2 second timeout [0.00s] features/step_definitions/api_steps.rb:35
-
✗Then I should receive a timeout error [0.03s] features/step_definitions/api_steps.rb:52
ConnectionError: Failed to connect to API endpoint at https://api.example.com:443 Connection timeout after 30 seconds ./features/support/http_client.rb:45:in `get' ./features/step_definitions/api_steps.rb:55:in `/^I should receive a timeout error$/' features/api_integration.feature:13:in `I should receive a timeout error'
Scenario:Respect API rate limits
-
✓Given I have exceeded the rate limit [0.00s] features/step_definitions/api_steps.rb:22
-
✓When I make another API request [0.00s] features/step_definitions/api_steps.rb:40
-
○Then I should wait until the rate limit resets