Replies: 1 comment
-
hi @TimY2016 👋 For (2) you can use a CSV file or a bit of custom JS to generate those IDs. There's an example using a CSV file for dynamic values here: https://github.com/artilleryio/artillery-examples/tree/main/browser-load-testing-playwright - see For (1) - can you explain a bit more what you mean by correlation? Are there sets of dynamic values that need to be used together rather than mixed freely? (e.g. username + password pairs) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am new to Artillery. We have used Neoload and we are trying to replace Neoload with Artillery. I have question regarding using artillery-engine-playwright to test the web app.
The webapp has launch page, Login page and other number of pages calling different microservices. For our need, we need to navigate through each parent and children pages and see the response time under load.
here is the sample script generated from Playwright: ( launch, login , clicking clients page and clicking one client from list).
`import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
// Go to https://launchpageurl.net/ => Launch Page
await page.goto('https://launchpageurl.net/');
// Go to https://dummyendpoint.us-east-1.amazoncognito.com/login => Login page
await page.goto('https://dummyendpoint.us-east-1.amazoncognito.com/login');
// Click [placeholder="Username"] >> nth=1
await page.locator('[placeholder="Username"]').nth(1).click();
// Fill [placeholder="Username"] >> nth=1
await page.locator('[placeholder="Username"]').nth(1).fill('user_name');
// Click [placeholder="Password"] >> nth=1
await page.locator('[placeholder="Password"]').nth(1).click();
// Fill [placeholder="Password"] >> nth=1
await page.locator('[placeholder="Password"]').nth(1).fill('pass_word');
// Click [aria-label="submit"] >> nth=1
await Promise.all([
page.waitForNavigation(/{ url: 'https://launchpageurl.net/dashboard' }/),
page.locator('[aria-label="submit"]').nth(1).click()
]);
// Click nav[role="navigation"] i
await page.locator('nav[role="navigation"] i').click();
// Click text=Clients => Click a client in the list
await Promise.all([
page.waitForNavigation(/{ url: 'https://launchpageurl.net/clients' }/),
page.locator('text=Clients').click()
]);
// Click text=SampleClientabc
await Promise.all([
page.waitForNavigation(/{ url: 'https://launchpageurl.net/clients/534d54a7-f3b0-47a7-9d31-2f456f3430be' }/),
page.locator('text=SampleClientabc').click()
]);
// Click text=sample
await Promise.all([
page.waitForNavigation(/{ url: 'https://launchpageurl.net/clients/534d54a7-f3b0-47a7-9d31-2f456f3430be /sample' }/),
page.locator('text=sample').click()
]);
});`
Thank You.
Beta Was this translation helpful? Give feedback.
All reactions