Getting Started
Start Snapline Hub, push your first test report, and view results in the dashboard — in about five minutes.
Minute 1 — Start Snapline Hub
git clone https://github.com/vaagatech/snapline-hub.git
cd snapline-hub
npm install
npm run dev
Open http://localhost:5173. You should see the dashboard with an empty state.
Minute 2 — Choose how to send a report
You have three ways to get data into Hub:
| Method | Best for |
|---|---|
| A. Push from Snapline | Active test runners (Node.js or Python) |
| B. Upload JSON file | Existing TestRunReport files from writeTestReport |
| C. curl / REST API | Custom scripts, non-Snapline tools producing compatible JSON |
Minute 3 — Push from Snapline (recommended)
Option A: Node.js
If you have the Snapline Node.js repo cloned:
cd snapline
npm install
SNAPLINE_HUB_URL=http://localhost:3847 npm run demo
The demo runner executes 21 integration scenarios and pushes an aggregate report labeled Full integration demo.
Option B: Python
cd snapline-python
uv sync
SNAPLINE_HUB_URL=http://localhost:3847 uv run demo
Option C: Minimal push from your own test
Node.js:
import { testSuite, buildReport, pushTestReportToHub } from '@vaagatech/snapline-core';
const result = await testSuite('My first test', {
baseUrl: 'https://api.example.com',
api: {
endpoint: '/users/me',
method: 'GET',
expectedFile: './fixtures/expected.json',
},
});
const report = buildReport([result], { durationMs: 500 });
await pushTestReportToHub(report, {
hubUrl: 'http://localhost:3847',
label: 'My first Hub push',
});
Python:
import asyncio
from snapline.core import test_suite, build_report, push_test_report_to_hub
async def main():
result = await test_suite("My first test", {
"baseUrl": "https://api.example.com",
"api": {
"endpoint": "/users/me",
"method": "GET",
"expectedFile": "fixtures/expected.json",
},
})
report = build_report([result], {"durationMs": 500})
push_test_report_to_hub(report, hub_url="http://localhost:3847", label="My first Hub push")
asyncio.run(main())
Minute 4 — View in the dashboard
- Refresh the Hub dashboard at http://localhost:5173
- You should see Total Runs increment and a new row under Recent Runs
- Click the run name to open the Run Detail page
- Expand any suite to see individual steps
- Failed steps show a diff block with
path,actual, andexpected
Minute 5 — Upload an existing JSON report
If you already have a Snapline JSON report file:
- Generate one:
REPORT_FORMAT=json REPORT_OUTPUT=./reports/run.json npm run demo(Node.js) - In Hub, go to Upload Report in the sidebar
- Drag
run.jsononto the drop zone (or click to browse) - Hub validates the JSON, stores it, and navigates to the run detail page
Upload via curl
curl -X POST http://localhost:3847/api/reports \
-H 'Content-Type: application/json' \
-d @reports/run.json
Response:
{ "id": "a1b2c3d4-...", "url": "/reports/a1b2c3d4-..." }
What you should see
A successful TestRunReport in Hub contains:
| Section | Example |
|---|---|
| Summary | 3 suites, 2 passed, 1 failed, 1200ms duration |
| Framework | @vaagatech/snapline-engine or snapline-engine |
| Environment | baseUrl, reportFormat, custom keys from your meta |
| Suites | One card per testSuite or fixture scenario |
| Steps | Per-case directory names (fixtures) or step names (auth, api, etc.) |
Next steps:
Read the User Guide for dashboard features and
Snapline Integration for CI and environment variable setup.