I get the process shutdown unexpected error only when I run the below script in Alpine container with the latest k6 version (0.46.0) everything works as expected on mac. Do you have a sample dockerfile based on alpine image that is working?
// Frontend performance test simulating user interactions in a browser context
export async function frontendPerformanceTest() {
const page = browser.newPage();
try {
// Navigate to the login page
await page.goto(LOGIN_PAGE);
// Fill in the login form
page.locator('input[name="ctl00$Content$Login1$UserName"]').type('BroadL');
page.locator('input[name="ctl00$Content$Login1$Password"]').type('password');
const submitButton = page.locator('input[type="submit"]');
// Submit the form and wait for navigation
await Promise.all([page.waitForNavigation(), submitButton.click()]);
// Check the title of the resulting page
check(page, {
'titleCheck': p => p.title() == 'Dr. 1101 Broad - 459032965 - ServiceB',
});
} catch (error) {
console.error(“Error in frontendPerformanceTest:”, error.message);
} finally {
// Close the browser context
page.close();
}
}