Skip to content
New issue

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

Can a CSV payload file be setup to process once for each line in the csv with playwright? #3447

Open
chrisjean opened this issue Jan 10, 2025 · 1 comment

Comments

@chrisjean
Copy link

I am trying to run the playwright script one time for each item in the CSV payload file. Can the test be setup to run once per entry and exit? I have two entries in the csv and have setup the arrivalCount to 2.

config:
target: "{{$env.TARGET_MAIN}}"
engines:
playwright:
launchOptions:
headless: false
defaultNavigationTimeout: 6
useSeparateBrowserPerVU: false
aggregateByName: true
processor: "./load-test.spec.js"
payload:
- path: "./1st-Shift-Operators.txt"
order: sequence
fields:
- username
phases:
- arrivalCount: 2
maxVusers: "{{$env.MAX_VUSERS_DEFAULT}}"
scenarios:

  • name: "Time In Employees"
    engine: playwright
    weight: 1
    flowFunction: "timeInEmployees"
@hassy
Copy link
Member

hassy commented Jan 10, 2025

yep, it's possible - we have a relevant example here: https://github.com/artilleryio/artillery/blob/main/examples/browser-load-testing-playwright/browser-smoke-test.yml

The example uses loadAll: true to read all rows in the CSV file as pageChecks context variable. The Playwright function then does something with each row here: https://github.com/artilleryio/artillery/blob/main/examples/browser-load-testing-playwright/flows.js#L42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants