We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I encountered the following panic:
ERRO[0031] unexpected k6 panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: runtime/debug.Stack() runtime/debug/stack.go:24 +0x5e go.k6.io/k6/cmd.(*rootCommand).execute.func2() go.k6.io/[email protected]/cmd/root.go:100 +0x67 panic({0x1af4c00?, 0xc000a120c0?}) runtime/panic.go:770 +0x132 sm.targetMetricsCollection.Write(0x2f41400?, {0x1f75640, 0xc000148468}) [email protected]/output.go:388 +0x1246 sm.(*Output).Stop(0xc0005cb3e0) [email protected]/output.go:178 +0x432 go.k6.io/k6/output.(*Manager).stopOutputs(0xc000429200, {0x0, 0x0}, 0x3) go.k6.io/[email protected]/output/manager.go:112 +0x143 go.k6.io/k6/output.(*Manager).Start.func3({0x0, 0x0}) go.k6.io/[email protected]/output/manager.go:80 +0x45 go.k6.io/k6/cmd.(*cmdRun).run.func9() go.k6.io/[email protected]/cmd/run.go:238 +0x8a go.k6.io/k6/cmd.(*cmdRun).run(0xc00012e5d0, 0xc0002de2c8, {0xc00034bc20, 0x1, 0x3}) go.k6.io/[email protected]/cmd/run.go:434 +0x184b github.com/spf13/cobra.(*Command).execute(0xc0002de2c8, {0xc00034bbf0, 0x3, 0x3}) github.com/spf13/[email protected]/command.go:856 +0x69d github.com/spf13/cobra.(*Command).ExecuteC(0xc000163348) github.com/spf13/[email protected]/command.go:974 +0x38d github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/[email protected]/command.go:902 go.k6.io/k6/cmd.(*rootCommand).execute(0xc0000d1620) go.k6.io/[email protected]/cmd/root.go:108 +0x125 go.k6.io/k6/cmd.Execute() go.k6.io/[email protected]/cmd/root.go:130 +0x2f main.main() k6/main.go:12 +0xf
Which seems to stem from this unchecked slice indexing:
xk6-sm/output.go
Line 388 in 18cbb7b
We should revisit these assumptions and if-guard them if needed.
import { browser } from 'k6/browser'; import { check } from 'https://jslib.k6.io/k6-utils/1.5.0/index.js'; export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium', }, }, }, }, thresholds: { checks: ['rate==1.0'], }, }; export default async function () { const context = await browser.newContext(); const page = await context.newPage(); try { await page.goto("https://www.amazon.es"); await page.locator('input[name="login"]').type("admin"); await page.locator('input[name="password"]').type("123"); await Promise.all([ page.waitForNavigation(), page.locator('input[type="submit"]').click(), ]); await check(page.locator("h2"), { 'header': async h2 => await h2.textContent() == "Welcome, admin!" }); } finally { await page.close(); } }
The text was updated successfully, but these errors were encountered:
This seems to be exactly what #3 addresses.
Sorry, something went wrong.
No branches or pull requests
I encountered the following panic:
Which seems to stem from this unchecked slice indexing:
xk6-sm/output.go
Line 388 in 18cbb7b
We should revisit these assumptions and if-guard them if needed.
The text was updated successfully, but these errors were encountered: