Documentation Index
Fetch the complete documentation index at: https://docs.qawolf.com/llms.txt
Use this file to discover all available pages before exploring further.
This helper requires runner support. In QA Wolf-managed runs, the runner configures this automatically. If you’re building a custom runner, see the Client Reference.
Examples
Start an OpenVPN tunnel
import { startOpenVpn } from "@qawolf/testkit";
const pid = await startOpenVpn({
configPath: "/tmp/client.ovpn",
});
Limit routing to specific hosts
import { startOpenVpn } from "@qawolf/testkit";
const pid = await startOpenVpn({
configPath: "/tmp/client.ovpn",
routeHosts: ["internal.example.com", "api.staging.io"],
});
When to use
- Your web app connects to internal or staging services that aren’t publicly accessible.
- Your flow needs to reach an API behind a corporate firewall.
- You need to test against a staging environment that requires VPN access.
Full example
import { flow } from "@qawolf/flows/web";
import { startOpenVpn } from "@qawolf/testkit";
export default flow(
"Test internal API",
{ target: "Web - Chrome", launch: true },
async ({ page, test }) => {
await test("connect to VPN", async () => {
await startOpenVpn({
configPath: "/tmp/client.ovpn",
routeHosts: ["internal.example.com"],
});
});
await test("navigate to internal service", async () => {
await page.goto(process.env["INTERNAL_URL"]!);
await expect(page).toHaveURL(/internal/);
});
},
);