Overview
This example shows how to test a REST API using SemanticTest. We’ll test the JSONPlaceholder API, which provides fake online REST API for testing.Complete Test
test.json
Running the Test
Breaking It Down
Test 1: Get User
Test 2: Create Post
This test demonstrates POST requests with JSON body:JSONPlaceholder is a fake API, so it won’t actually create the post. But it simulates the response correctly!
Test 3: Get All Posts
Shows how to validate array responses:Variations
With Error Handling
Add retry logic for flaky endpoints:With Authentication
Add auth token to requests:With Setup/Teardown
Clean up test data:Next Steps
AI Chat Test
Learn how to test AI chat APIs
Error Handling
Advanced error handling patterns
HttpRequest Block
Complete HttpRequest documentation
Assertions
All available assertion operators

