Quickstart (3 Minutes)
Get up and running with RouteCase and execute your first API test suite in under 3 minutes.
Step 1: Install RouteCase
Section titled “Step 1: Install RouteCase”Open the VS Code command palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS) and run:
code --install-extension UtkarshKumar.routecaseOr search for RouteCase in the Extensions tab (Ctrl+Shift+X).
Step 2: Create a Test Suite
Section titled “Step 2: Create a Test Suite”In your project root, create a file named quickstart.rcase:
{ "$schema": "https://raw.githubusercontent.com/UTKARSHKUMAR712/routecase/main/schemas/rcase.schema.json", "name": "GitHub User API Test", "baseUrl": "https://api.github.com", "headers": { "User-Agent": "RouteCase-Quickstart" }, "tests": [ { "name": "Fetch Public User Profile", "method": "GET", "path": "/users/{username}", "success": [ { "name": "Fetch Octocat User Profile", "params": { "username": "octocat" }, "expect": { "status": 200, "bodyContains": "octocat", "maxDurationMs": 2500 } } ], "errors": [ { "name": "Non-existent user returns 404", "params": { "username": "non-existent-user-routecase-9999999" }, "expect": { "status": 404, "bodyContains": "Not Found" } } ] } ]}::: tip No Local Server Required! This test suite uses GitHub’s public REST API, so you can test RouteCase immediately without needing to run a local server. :::
Step 3: Run the Tests
Section titled “Step 3: Run the Tests”You will see clickable CodeLens actions appear directly above the JSON code in the editor:
[▶ Run All Cases] [📊 Results Dashboard]- Click
▶ Run All Casesat the top of the file. - Watch the live badge update to
✓ PASS (200 • 180ms). - Click the RouteCase icon in the VS Code Activity Bar on the left to see the test tree view.
- Click on any test result to open the Interactive Results Panel and inspect the full response headers and payload preview!
What Just Happened?
Section titled “What Just Happened?”- RouteCase validated the
.rcasesyntax against its JSON schema. - The path template
/users/{username}was substituted withoctocatand URL-encoded. - Node’s HTTP/HTTPS engine executed the request with custom headers.
- The response status (
200 OK), response body (octocat), and latency were asserted. - The second error case was executed with the invalid username, verifying that GitHub properly returned
404 Not Found.
Next Up: Learn how to install and configure RouteCase for daily development in the Installation Guide.
