-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Labels
Description
Brief summary
If we run the following test:
import { browser } from 'k6/browser';
export const options = {
scenarios: {
ui: {
executor: 'shared-iterations',
options: {
browser: {
type: 'chromium',
},
},
},
},
};
export default async function () {
const page = await browser.newPage();
try {
await page.goto("https://blah.madeupurl.com");
console.log("test")
} finally {
await page.close();
}
}
It should fail on the page.goto
since the DNS cannot be resolved, and therefore we shouldn't see "test"
being logged to the console.
At the moment we're not capturing the error text correctly here. We should be checking to see if it is not empty and fail the navigation if it is not empty.
k6 version
NA
OS
NA
Docker version and image (if applicable)
No response
Steps to reproduce the problem
NA
Expected behaviour
Test should fail on page.goto
.
Actual behaviour
Test continues on assuming that the page loaded correctly.