Skip to main content
@qawolf/testkit is a small helper library for flow code and runner wiring. Use it when a test needs something outside normal browser or mobile automation:
  • generate an OTP code
  • decode a QR code from the page
  • mount a CIFS share
  • start OpenVPN
  • save a baseline screenshot

Pick The Import

import { otp, saveBaselineScreenshot, startOpenVpn } from "@qawolf/testkit";

Generate An OTP

import { otp } from "@qawolf/testkit";

const code = otp.fromUri(process.env["OTP_URI"]!);

await page.getByLabel("Verification code").fill(code);

Read A QR Code

import { readQRCode } from "@qawolf/testkit/web";

const qrValue = await readQRCode(page, "[data-testid='qr-code']");

if (!qrValue) throw new Error("QR code was not visible");

Use Runner-Backed Helpers

Some helpers call a client configured by the runner.
import { startOpenVpn } from "@qawolf/testkit";

const pid = await startOpenVpn({
  configPath: "/tmp/client.ovpn",
});
If the runner has not configured a client, these helpers fail fast with a setup error. That is intentional: flow code should not guess how to reach runner-only services.

Next Steps

Last modified on April 24, 2026