Generated banner for Testing
Generated logo for Testing

Testing

Grafana LabsOfficialPublished by Grafana Labs

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • Low risk

From the author

Probe, load-test, and instrument frontends from Grafana Cloud. Covers Synthetic Monitoring (HTTP / DNS / TCP / Ping / Traceroute / Multihttp / k6-browser scripted checks from 20+ global probes, alert on `probe_success` + TLS-cert expiry), Grafana Cloud k6 (distributed load tests across AWS load-zones, scenarios, `http_req_duration` thresholds, CI integration via `grafana/k6-action`), and Frontend Observability with Faro Web SDK (RUM, Core Web Vitals, custom events, `pushError`, distributed-trace correlation). Use when checking website / API uptime from multiple regions, gating a release on a load test, watching for TLS-cert renewal, instrumenting a React/Vue app, tracking Core Web Vitals, or correlating frontend errors to backend traces — even when the user says "is my login flow up?", "monitor my API", "ping our endpoint every minute", "release-gate load test", "browser performance monitoring", "session replay", or "RUM" without naming Synthetic Monitoring / k6 / Faro.
— the description by Grafana Labs

From the skill’s files

Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.

Probe, load-test, and instrument frontends from Grafana Cloud. Covers Synthetic Monitoring (HTTP / DNS / TCP / Ping / Traceroute / Multihttp / k6-browser scripted checks from 20+ global probes, alert on probe_success + TLS-cert expiry), Grafana Cloud k6 (distributed load tests across AWS load-zones, scenarios, http_req_duration thresholds, CI integration via grafana/k6-action), and Frontend Observability with Faro Web SDK (RUM, Core Web Vitals, custom events, pushError, distributed-trace correlation). Use when checking website / API uptime from multiple regions, gating a release on a load test, watching for TLS-cert renewal, instrumenting a React/Vue app, tracking Core Web Vitals, or correlating frontend errors to backend traces — even when the user says "is my login flow up?", "monitor my API", "ping our endpoint every minute", "release-gate load test", "browser performance…

What it does

  • Prerequisites
  • Common Workflows
  • Troubleshooting

When to use it

  • Use when checking website / API uptime from multiple regions, gating a release on a load test, watching for TLS-cert renewal, instrumenting a React/Vue app, tracking Core Web Vitals, or correlating…

Advantages

The skill’s files do not state this.

Usage examples

The skill’s files do not state this.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/grafana/testing/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip testing.zip -d .agents/skills

Documentation by Grafana Labs

Grafana Cloud Testing

Docs: https://grafana.com/docs/grafana-cloud/testing/

Three pillars: external probing (Synthetic Monitoring), load testing (k6 Cloud), real-user monitoring (Faro).

Prerequisites

  • Grafana Cloud stack

  • Synthetic Monitoring: SM access token (sm:write)

  • k6 Cloud: a Grafana Cloud k6 token + projectID

  • Faro: a Faro app + write-token from Frontend Observability → Apps

Common Workflows

1. Create + verify a Synthetic HTTP check
# 1. Create the check (full payload in references/synthetic.md)
curl -X POST https://synthetic-monitoring-api.grafana.net/sm/checks \
  -H "Authorization: Bearer <sm-token>" -H "Content-Type: application/json" \
  -d '{"job":"website","target":"https://example.com","frequency":60000,"timeout":15000,
       "enabled":true,"probes":[1,5,10],
       "settings":{"http":{"method":"GET","validStatusCodes":[200]}}}'

# 2. List checks — confirm it exists and is enabled
curl -s https://synthetic-monitoring-api.grafana.net/sm/checks \
  -H "Authorization: Bearer <sm-token>" | jq '.[] | select(.job=="website")'

# 3. Verify probe_success arrived (wait ~60s for the first run)
#    In Grafana Explore on the synthetic metrics datasource:
#      probe_success{job="website"}
#    Expect 1 from each probe in `probes:[1,5,10]`.
#
# Rollback: DELETE /sm/checks/<id> or set `"enabled": false`.

See references/synthetic.md for all check types, PromQL queries, and alert rules.

2. Run a k6 cloud load test
# 1. Authenticate once
k6 cloud login --token <grafana-cloud-k6-token>

# 2. Validate the script locally first (smoke run, no cloud cost)
k6 run --vus 1 --duration 30s script.js

# 3. Launch in cloud
k6 cloud script.js
# → URL of the run; thresholds (p95<500ms, error<1%) decide pass/fail.

# 4. Verify in CI — exit code 0 = thresholds passed, 99 = threshold failed.
echo $?

Full script + scenarios + CI YAML: references/k6-and-faro.md.

3. Instrument a frontend with Faro
# 1. Install
npm install @grafana/faro-web-sdk @grafana/faro-web-tracing
// 2. initializeFaro({ url, apiKey, app, instrumentations }) — see references/k6-and-faro.md
// 3. Push a test event so we have something to look for:
faro.api.pushEvent('faro_smoketest', { ts: Date.now().toString() });
# 4. Verify the collector accepted it (browser DevTools → Network)
#    POST to /collect should return 202. If 401 — apiKey mismatch.

# 5. Verify in Grafana
#    - Frontend Observability → your app → Sessions: should show your session
#    - Explore on Loki: `{kind="event"} |= "faro_smoketest"`
#    - For traces: filter by `service.name="my-frontend"` in Tempo

Troubleshooting

  • Synthetic check stuck at probe_success=0 → check probe_*_duration_seconds for the failing stage; the probe-region label tells you which prober errored

  • k6 cloud run "ABORTED_THRESHOLD" → a threshold tripped; inspect the run page to see which one

  • Faro events not landing → check the browser network call to /collect returns 202; common cause is wrong apiKey or url (must match the FE Observability app)

References

  • For deep authoring of Synthetic Monitoring scripted (k6) and browser checks — execution model, assertions, secrets, API/Terraform payloads — see the synthetic-monitoring-checks skill

  • references/synthetic.md — Synthetic Monitoring essentials: check types, key PromQL metrics, alert rules

  • references/synthetic-monitoring.md — deep dive: full API for check CRUD, probe selection, scripted (k6) checks, multi-step browser checks

  • references/k6-and-faro.md — k6 cloud script + Faro Web SDK init snippets for end-to-end testing

  • references/k6-cloud.md — deep dive: k6 cloud config (project + load zones + thresholds), CI integration, run analysis

Resources

Files

references/k6-and-faro.md

k6 Cloud + Faro RUM — full snippets

k6 cloud script

import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  cloud: {
    projectID: 3456789,
    name: 'API Load Test - Release v2.0',
    distribution: {
      loadZone1: { loadZone: 'amazon:us:ashburn', percent: 50 },
      loadZone2: { loadZone: 'amazon:eu:dublin',  percent: 30 },
      loadZone3: { loadZone: 'amazon:ap:tokyo',   percent: 20 },
    },
  },
  scenarios: {
    load: {
      executor: 'ramping-vus',
      startVUs: 0,
      stages: [
        { duration: '2m',  target: 100 },
        { duration: '10m', target: 100 },
        { duration: '2m',  target: 0 },
      ],
    },
  },
  thresholds: {
    http_req_duration: ['p(95)<500'],
    http_req_failed:   ['rate<0.01'],
  },
};

export default function () {
  const res = http.get('https://api.example.com/users');
  check(res, {
    'status 200': (r) => r.status === 200,
    'fast':       (r) => r.timings.duration < 500,
  });
  sleep(1);
}

k6 Cloud commands

# Authenticate
k6 cloud login --token <your-grafana-cloud-token>

# Run in cloud
k6 cloud script.js

# Run locally, stream results to cloud
k6 run --out cloud script.js

k6 Cloud API

# List test runs
curl https://api.k6.io/v3/projects/{projectId}/test-runs -H "Authorization: Token <token>"

# Get test run results
curl https://api.k6.io/v3/runs/{runId} -H "Authorization: Token <token>"

# Stop a running test
curl -X POST https://api.k6.io/v3/runs/{runId}/stop -H "Authorization: Token <token>"

GitHub Actions

- name: Run k6 Load Test
  uses: grafana/[email protected]
  with:
    filename: tests/load.js
    cloud: true
    token: ${{ secrets.K6_CLOUD_TOKEN }}
    flags: --out cloud

Faro / Frontend Observability

npm install @grafana/faro-web-sdk @grafana/faro-web-tracing
import { initializeFaro, getWebInstrumentations } from '@grafana/faro-web-sdk';
import { TracingInstrumentation } from '@grafana/faro-web-tracing';

const faro = initializeFaro({
  url: 'https://faro-collector-prod-xx.grafana.net/collect',
  apiKey: 'your-faro-api-key',
  app: { name: 'my-frontend', version: '1.0.0', environment: 'production' },
  instrumentations: [
    ...getWebInstrumentations({ captureConsole: true, captureConsoleDisabledLevels: [] }),
    new TracingInstrumentation(),
  ],
});

// Custom events / measurements / errors
faro.api.pushEvent('checkout_completed', { cart_value: '99.99' });
faro.api.pushMeasurement({ type: 'api_latency', values: { ms: 234 } });
faro.api.pushError(new Error('Payment failed'));

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs network access, Needs Node.js

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Grafana Labs
Publisher
Grafana Labs (Official)
Source
grafana/skills · skills/grafana-cloud/testing · commit 8fb72a5
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Grafana Labs or Grafana Labs.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download testing.zip