Is k6-operator able to execute a test case that contains k6 browser module? I see this error msg from the pod:
"error building browser on IterStart: finding browser executable: k6 couldn't detect google chrome or a chromium-supported browser on this system at file:///test/browser.js:20:15(0)"
The test script:
import { browser } from "k6/experimental/browser";
import { check } from "k6";
export const options = {
scenarios: {
ui: {
executor: "shared-iterations",
options: {
browser: {
type: "chromium",
},
},
},
},
thresholds: {
checks: ["rate==1.0"],
},
};
export default async function () {
const page = browser.newPage();
try {
await page.goto("https://test.k6.io/my_messages.php");
page.locator('input[name="login"]').type("admin");
page.locator('input[name="password"]').type("123");
const submitButton = page.locator('input[type="submit"]');
await Promise.all([page.waitForNavigation(), submitButton.click()]);
check(page, {
header: (p) => p.locator("h2").textContent() == "Welcome, admin!",
});
} finally {
page.close();
}
}
The trigger file:
apiVersion: k6.io/v1alpha1
kind: TestRun
metadata:
name: run-k6
spec:
parallelism: 1
script:
configMap:
name: browser
file: browser.js