Open aupadhyay-coursera opened 3 days ago
Hi @aupadhyay-coursera !
To be able to figure out what and why is happening there, we need more details/context.
Would it be possible to share your script without revealing your business insights? Which output/configurations do you use? Would it be possible to increase verbosity (-v
) and collect more logs?
Output configuration:
K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=html-report.html K6_BROWSER_ARGS='no-sandbox,use-gl=swiftshader,disable-web-security,enable-unsafe-swiftshader,disable-webgl,disable-dev-shm-usage,ignore-certificate-errors' K6_BROWSER_HEADLESS=false k6 run
Here is test snippets
const startIndex = parseInt(__ENV.START_INDEX) || 0;
const endIndex = parseInt(__ENV.END_INDEX) || loginAccounts.length;
const assignedAccounts = loginAccounts.slice(startIndex, endIndex);
const iterationsPassed = new Counter('iterations_passed');
const iterationsFailed = new Counter('iterations_failed');
export const options = {
scenarios: {
ui: {
executor: 'per-vu-iterations',
vus: assignedAccounts.length, // Number of VUs is equal to the number of users
iterations: 1, // Each user runs once
maxDuration: '10m', // Max duration
options: {
browser: {
type: 'chromium',
},
},
},
},
};
export default async function () {
const user = assignedAccounts[__VU - 1];
/**
* Performing user operations here
*/
// Increment the passed iterations counter
iterationsPassed.add(1);
}
catch (error) {
console.error(`Test failed for user ${user.email} at operation :`, error.message);
iterationsFailed.add(1);
await page.screenshot({ path: `screenshot.png` });
} finally {
await page.close();
}
}
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data), //the default data object
};
}
Okay, so the script uses the browser module, and it's k6 v0.53.
I believe we saw such issues and there were a couple of fixes, that landed in recent k6 versions:
Please try running the latest k6 v0.55 and see if the issue remains there.
Brief summary
I am running K6 on an AWS Fargate cluster via a Jenkins pipeline. I have noticed that, more often than not, the K6 process does not terminate keeps on running even after running all the iterations. This issue halts the execution on the agent and prevents the agent from progressing to the next stage in the pipeline.
k6 version
0.53.0
OS
Arch Linux
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Expected behaviour
It Should move to next stage.
Actual behaviour
It keeps the agent in the same phase without exiting succesfully.