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:

MethodBest for
A. Push from SnaplineActive test runners (Node.js or Python)
B. Upload JSON fileExisting TestRunReport files from writeTestReport
C. curl / REST APICustom 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

  1. Refresh the Hub dashboard at http://localhost:5173
  2. You should see Total Runs increment and a new row under Recent Runs
  3. Click the run name to open the Run Detail page
  4. Expand any suite to see individual steps
  5. Failed steps show a diff block with path, actual, and expected

Minute 5 — Upload an existing JSON report

If you already have a Snapline JSON report file:

  1. Generate one: REPORT_FORMAT=json REPORT_OUTPUT=./reports/run.json npm run demo (Node.js)
  2. In Hub, go to Upload Report in the sidebar
  3. Drag run.json onto the drop zone (or click to browse)
  4. 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:

SectionExample
Summary3 suites, 2 passed, 1 failed, 1200ms duration
Framework@vaagatech/snapline-engine or snapline-engine
EnvironmentbaseUrl, reportFormat, custom keys from your meta
SuitesOne card per testSuite or fixture scenario
StepsPer-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.