Skip to content

Instantly share code, notes, and snippets.

View VikaCep's full-sized avatar

Virginia Cepeda VikaCep

  • Grafana Labs
  • Argentina
View GitHub Profile
@VikaCep
VikaCep / index.js
Created April 30, 2026 19:31
k6-jslib-sm-screenshots test bundle v2
// src/capture.ts
async function captureScreenshot(page, options) {
const { caption = "", fullPage = false, store } = options;
const buffer = await page.screenshot({ fullPage });
const uuid = crypto.randomUUID();
await store.upload(buffer, uuid, caption);
}
// src/stores/loki.ts
import encoding from "k6/encoding";