← Back to Discord Forum

Project dependency with shards

Ashish Vishnoiposted in #help-playwright
Open in Discord
Ashish Vishnoi
Ashish Vishnoi

Can someone please help me to understand how shards work with project dependency?

I have a globalSetup.spec.ts added as setup project and another projects are dependent on the setup project.

I want to run another projects with shards, but setup project only once during the execution.

Does fullyParallel:true has any role here in playwright.config.ts file? <#1054804523652231198>

This thread is trying to answer question "How do shards work with project dependency in Playwright, and how can data be passed between separate 'npx playwright test' commands?"

3 replies

If you want to execute setup once no matter the sharding then you'll need to run it in a separate npx playwright test command, remove it as depedency from the projects and then run those projects.

Ashish Vishnoi
Ashish Vishnoi

@skorp32 Thanks for response, how do we run npx playwright test twice? If I run that once and wants to pass the generated data to next run how should that be handled? Will I have to store in some file and read in next run?

Yeap, store it in a file

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.