Hi
When I have one test in scenario, I get a lot of lock errors when browser restarts:
ERRO[0084] cleaning up the user data directory: remove C:\Users\mobj\AppData\Local\Temp\xk6-browser-data-81919410\lockfile: The process cannot access the file because it is being used by another process. category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0084] cleaning up the user data directory: remove C:\Users\mobj\AppData\Local\Temp\xk6-browser-data-1788123074\lockfile: The process cannot access the file because it is being used by another process. category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0084] cleaning up the user data directory: remove C:\Users\mobj\AppData\Local\Temp\xk6-browser-data-389242499\lockfile: The process cannot access the file because it is being used by another process. category="Browser:Close" elapsed="0 ms" source=browser
But if I do a for loop of random users inside the scenario so the scenario never finishes and do not close and restart the browser performance is way way higher:
Both have vus=5
So you should start up the browsers instance you need up front and never restart them.